UCL-RITS / rcps-buildscripts

Scripts to automate package builds on RC Platforms
MIT License
39 stars 26 forks source link

Install Request: Install NONMEM 7.5 if the UCL license allows [IN06144843] #549

Open balston opened 10 months ago

balston commented 10 months ago

Request to install NONMEM 7.5 on Myriad and Kathleen.

Commercial software supplied by Icon Inc from the USA. https://www.iconplc.com/solutions/technologies/nonmem/

UCL license owned by the School of Pharmacy.

Need to check how and if we can get the new version from Icon Inc.

balston commented 9 months ago

I've emailed Icon asking about getting hold of the NONMEM 7.5 installer archive.

balston commented 9 months ago

Looks like I have the install and download instructions for NONMEM 7.5. I will look further into it on Monday.

balston commented 9 months ago

I now have the NONMEM751.zip installer archive and the password necessary to unzip it.

balston commented 9 months ago

I've uploaded it to ~ccaabaa/Scratch/NONMEM/ on both Myriad and Kathleen.

balston commented 9 months ago

The Linux unzip command can handle the password protected zip archive so the NONMEM 7.5.1 installer is now in:

/home/ccspapp/Scratch/Software/NONMEM/nm751CD

on both Myriad and Kathleen.

balston commented 9 months ago

The original build of NONMEM was documented here https://github.com/UCL-RITS/research-computing/issues/376

balston commented 9 months ago

Myriad

First attempt. Install NONMEM using the default Intel compilers and MPI. So looking at the current installation instructions and how we did the old version trying as ccspapp:

module load compilers/intel/2018/update3
module load mpi/intel/2018/update3/intel
cd Scratch/Software/NONMEM/nm751CD
cp /shared/ucl/apps/NONMEM/nm730_Intel/nonmem.lic  .
./SETUP75 /home/ccspapp/Scratch/Software/NONMEM/nm751CD /shared/ucl/apps/NONMEM/nm751_Intel ifort y ar same rec i unzip nonmem75e.zip nonmem75r.zip
balston commented 9 months ago

I ran the install twice because the first time it didn't have a valid license file so the build test failed. The second time seems to have worked:

Building NONMEM Executable
Starting nonmem execution ...
License Registered to: University College London RITS
Expiration Date:    14 MAR 2024
Current Date:       20 SEP 2023
Days until program expires : 179

 First Order
 MONITORING OF SEARCH:

0ITERATION NO.:    0    OBJECTIVE VALUE:   110.244033888713        NO. OF FUNC. EVALS.:   6
 CUMULATIVE NO. OF FUNC. EVALS.:        6
 NPARAMETR:  3.0000E+00  8.0000E-02  4.0000E-02  6.0000E+00  5.0000E-03  3.0000E-01  2.0000E-04  6.0000E-03  4.0000E-01  4.0000E-01

 PARAMETER:  1.0000E-01  1.0000E-01  1.0000E-01  1.0000E-01  1.0000E-01  1.0000E-01  1.0000E-01  1.0000E-01  1.0000E-01  1.0000E-01

 GRADIENT:   1.4640E+01 -1.6691E+01  5.6460E+01 -9.4129E+00 -1.1699E+01  1.0623E+01 -6.3485E-01 -4.7803E+01 -9.6457E+00  5.2414E+00

0ITERATION NO.:    5    OBJECTIVE VALUE:   105.453693542211        NO. OF FUNC. EVALS.:  39
 CUMULATIVE NO. OF FUNC. EVALS.:       45
 NPARAMETR:  2.8166E+00  8.0433E-02  3.8563E-02  6.6123E+00  9.7862E-03 -3.9509E-02  2.3438E-04  8.1375E-03  4.9657E-01  4.0346E-01

 PARAMETER: -5.3055E-02  1.0703E-01  5.7598E-02  1.4858E-01  1.8644E-01 -1.2545E-02  1.5794E-01  1.3452E-01  3.7714E-02  1.0431E-01

 GRADIENT:   3.5103E-01 -1.3214E+01  2.8003E+01  1.1115E+00  1.9193E+00 -5.3252E+00  7.1534E-02 -2.2091E+01 -1.4424E+00  8.2329E+00

0ITERATION NO.:   10    OBJECTIVE VALUE:   104.747694492991        NO. OF FUNC. EVALS.:  35
 CUMULATIVE NO. OF FUNC. EVALS.:       80
 NPARAMETR:  2.7362E+00  7.6935E-02  3.5982E-02  5.7362E+00  1.0840E-03 -2.9208E-01  2.3701E-04  9.4013E-03  5.1805E-01  3.8850E-01

 PARAMETER: -1.1928E-01  4.9234E-02 -2.3022E-02  7.7517E-02  2.2173E-02 -9.9574E-02  1.9498E-01  1.4956E-01 -1.7173E-01  8.5414E-02

 GRADIENT:  -1.3933E+00 -7.4632E+00  9.3144E+00  1.0280E+00  9.6395E-01 -3.1313E+00  1.0212E+00 -5.3784E+00 -2.0828E+00 -9.1477E-01

0ITERATION NO.:   15    OBJECTIVE VALUE:   104.561085415242        NO. OF FUNC. EVALS.:  36
 CUMULATIVE NO. OF FUNC. EVALS.:      116
 NPARAMETR:  2.7735E+00  7.8097E-02  3.6292E-02  5.5466E+00  5.1735E-03 -1.2911E-01  2.3941E-04  9.0947E-03  5.1461E-01  3.8752E-01

 PARAMETER: -8.8567E-02  6.8686E-02 -1.2994E-02  6.0711E-02  1.0762E-01 -4.4762E-02  1.9028E-01  1.4643E-01 -8.4016E-02  8.4157E-02

 GRADIENT:   7.7937E-03  5.7189E-03  3.0426E-02 -5.1648E-03 -1.2939E-02  1.4490E-02  7.4602E-04 -2.5227E-02 -3.1443E-03  1.5799E-02

0ITERATION NO.:   19    OBJECTIVE VALUE:   104.561066311468        NO. OF FUNC. EVALS.:  33
 CUMULATIVE NO. OF FUNC. EVALS.:      149
 NPARAMETR:  2.7739E+00  7.8129E-02  3.6307E-02  5.5498E+00  5.2393E-03 -1.2767E-01  2.3985E-04  9.1064E-03  5.1521E-01  3.8750E-01

 PARAMETER: -8.8304E-02  6.9219E-02 -1.2510E-02  6.0998E-02  1.0895E-01 -4.4249E-02  1.9095E-01  1.4652E-01 -8.3269E-02  8.4127E-02

 GRADIENT:   1.2144E-04 -1.4882E-04 -6.6266E-06 -7.5745E-05 -1.6157E-05  1.1307E-04  6.4128E-05  1.1193E-04 -1.7655E-05  4.2678E-05

 Elapsed estimation  time in seconds:     0.07
 Elapsed covariance  time in seconds:     0.04
 Elapsed postprocess time in seconds:     0.02
 Elapsed finaloutput time in seconds:     0.04
Done with nonmem execution

You should now compare REPORT5.txt vs. REPORT5IDS.txt
Values should be similar.
E.g., the following should be identical:
grep #OBJV: REPORT5.txt
 #OBJV:********************************************      104.561       **************************************************
grep #OBJV: REPORT5IDS.txt
 #OBJV:********************************************      104.561       **************************************************
The following path was selected for ifort: /shared/ucl/apps/intel/2018.Update3/compilers_and_libraries_2018.3.222/linux/bin/intel64/
The following path was selected for link: /usr/bin/
balston commented 9 months ago

Need to use the parafile.sh from the NONMEM 7.3 installation for parallel runs using Grid Engine and possibly some of the other set up files.

balston commented 9 months ago

There are three files that need changing/adding to the util or run directories. util:

mpiloc-setup
nmfe75

and run:

nmfe75
parafile.sh
balston commented 9 months ago

As ccspapp:

cd /shared/ucl/apps/NONMEM/nm751_Intel/util
cp ~ccaabaa/Scratch/Software/NONMEM/mpiloc-setup .
cp ~ccaabaa/Scratch/Software/NONMEM/nmfe75 .
cd ../run
cp ~ccaabaa/Scratch/Software/NONMEM/nmfe75 .
cp ~ccaabaa/Scratch/Software/NONMEM/parafile.sh .
balston commented 9 months ago

Now to try running a test parallel job.

balston commented 9 months ago

Forgot something - need a module file.

balston commented 9 months ago

Module file done and test job submitted:

job-ID  prior   name       user         state submit/start at     queue                          slots ja-task-ID
-----------------------------------------------------------------------------------------------------------------
 464106 0.00000 NONMEM_Int ccaabaa      qw    09/27/2023 17:33:45                                   12
balston commented 9 months ago

I made a mistake in the module file prereqs which I think I've fixed. Test job resubmitted.

balston commented 9 months ago

Test job has worked using a job script like this:

#!/bin/bash -l

# Batch script to run a MPI NONMEM job on Myriad

# NONMEM Version 7.5.1 Intel Fortran Compiler with Intel MPI 2018 Update 3

# 1. Force bash as the executing shell.
#$ -S /bin/bash

# 2. Request ten minutes of wallclock time (format hours:minutes:seconds).
#    Change this to suit your requirements.
#$ -l h_rt=0:10:0

# 3. Request 1 gigabyte of RAM. Change this to suit your requirements.
#$ -l mem=1G

# 3a. Request 15 gigabyte of TMPDIR space (default is 10 GB)
#$ -l tmpfs=15G

# 4. Set the name of the job. You can change this if you wish. Also set the 
# project on the OS Upgrade dev cluster.
#$ -N NONMEM_Intel_MPI_job_12

# 5. Select the MPI parallel environment and 12 processes.
#$ -pe mpi 12

# 6. Set the working directory to somewhere in your scratch space.  This is
# a necessary step with the upgraded software stack as compute nodes cannot
# write to your $HOME.
#
# NOTE: this directory must exist.
#
# Replace "<your_UCL_id>" with your UCL user ID :)
#$ -wd /home/<your_UCL_id>/Scratch/NONMEM_examples

# 7. Setup unique directory for this job
jobDir=example1_parallel_$JOB_ID
mkdir $jobDir

# 8. Copy control and datafiles to jobDir
cp foce_parallel.ctl $jobDir
cp example1b.csv $jobDir
cd $jobDir

# 9. Run your NONMEM program.

# Load modules - currently need 2018 Intel modules which are the default
module load nonmem/7.5.1/intel-2018-update3

# 10. Create parafile for job using $TMPDIR/machines
parafile.sh $TMPDIR/machines > example1.pnm

#11. Run NONMEM
nmfe75 foce_parallel.ctl example1.res -parafile=example1.pnm -background -maxlim=2 > example1.log
balston commented 9 months ago

Kathleen

As ccspapp:

module load compilers/intel/2018/update3
module load mpi/intel/2018/update3/intel
cd ~/Scratch/Software/NONMEM/nm751CD
cp /shared/ucl/apps/NONMEM/nm730_Intel/nonmem.lic  .
./SETUP75 /home/ccspapp/Scratch/Software/NONMEM/nm751CD /shared/ucl/apps/NONMEM/nm751_Intel ifort y ar same rec i unzip nonmem75e.zip nonmem75r.zip
balston commented 9 months ago

Installation completed and serial test worked.

Now updating set up files (same as on Myriad):

cd /shared/ucl/apps/NONMEM/nm751_Intel/util
cp ~ccaabaa/Scratch/Software/NONMEM/mpiloc-setup .
cp ~ccaabaa/Scratch/Software/NONMEM/nmfe75 .
cd ../run
cp ~ccaabaa/Scratch/Software/NONMEM/nmfe75 .
cp ~ccaabaa/Scratch/Software/NONMEM/parafile.sh .
balston commented 9 months ago

Test 2 node (80 core) job submitted.

balston commented 9 months ago

80 core test job worked.

balston commented 9 months ago

user informed about Kathleen installation.