gfortran work-around for PDx-Pop and NONMEM for Ubuntu

1 messages 1 people Latest: Dec 01, 2008
As of Ubuntu 8.10, g77 does not appear to be available in the Ubuntu database. However, "gfortran" is available and can can be downloaded and installed using "sudo apt-get install gfortran" from the Linux command line. Versions of gfortran after version 4.1 are based on g95 but not a direct substitution for versions of g95 previously used with NONMEM and PDx-Pop. I was able to find a workaround for my system that hopefully will also work for others. I downloaded gfortran and then "tricked" NONMEM and PDx-Pop into thinking it was g95: 1. I created a symbolic link for gfortran to "g95": sudo ln -s /usr/bin/gfortran /usr/bin/g95 2. I installed a fresh copy of NONMEM VI level 2.0 using the PDx-Pop 3.0 NMInstaller with the following settings: - NONMEM VI Level 2.0 - /media/NONMEMVI2.0 - /home/bill/nm6g95 (not previously existing) - GNU g95 - -O (not -O -fsloppy-char which would generate gfortran errors) - New Install - Intel There were NUMEROUS Hollerith Warnings in the Installation Output window and it seemed to take longer than usual but it eventually finished with "End of Installation" in the window. I exited the NMInstaller and returned to PDx-Pop. 3. I edited line 505 of the file /home/bill/pdxpop3/Go5pkg.pm by removing "-fsloppy-char" from the line. "nonmem -O -fsloppy-char" --> "nonmem -O " 4. In PDx-Pop, I used Tools > Edit Configuration, to change NonMemDir, FortranFlag and Foptions to /home/bill/nm6g95, G95 and -O, respectively, and saved the configuration and closed the configuration editor. PDx-Pop then ran as expected with G95 (actually gfortran) including NONMEM output in the Output Window. Note: No changes to the source code other than those automatcally made by the PDx-Pop NONMEM Installer are necessary. Previous posts regarding the BLKDAT.f file recommended changing the second and third instances of /dev/null to /dev/tty and JUNK for NONMEM. The values used by PDx-Pop for NONMEM are /dev/stdout and /dev/null, respectively. For those running and/or installing NONMEM from the Linux command prompt on Ubuntu, the SETUP c-shell script included on the NONMEM distribution CD-ROM can be used to install NONMEM after downloading gfortran. The c-shell is not the default shell and may not have been installed by Ubuntu. You can download and install the c-shell using "sudo apt-get install csh". You don't have to use the c-shell to run SETUP or nmfe6, but, they must be installed on your system for these scripts to work. 1. I created a symbolic link for gfortran to "g95": sudo ln -s /usr/bin/gfortran /usr/bin/g95 2. Run setup from the /media/NONMEMVI2.0 directory with appropriate arguments: ./SETUP /media/NONMEMVI2.0/ /home/bill/nm62gf g95 -O /usr/bin/ar Intel n 3. At Step. 5 of SETUP when it stops to allow modification of NONMEM source files, I edited line 28 of BLKDAT.f as follows: 1/'/dev/null','/dev/stdout','PRDERR','INTER','/dev/null'/ and then allowed the SETUP script to finish. 4. I tested the installation by changing to the /home/bill/nm62gf directory and running CONTROL5: [EMAIL PROTECTED]:~/nm62gf/run$ ./nmfe6 CONTROL5 report5.txt WARNINGS AND ERRORS (IF ANY) FOR PROBLEM 1 (WARNING 2) NM-TRAN INFERS THAT THE DATA ARE POPULATION. (WARNING 43) THE $PK BLOCK REQUESTS "CALL ONCE PER INDIVIDUAL RECORD", BUT DATA ITEMS ARE USED IN THE $PK BLOCK. VALUES OF THESE DATA ITEMS SUBSEQUENT TO THOSE FROM THE FIRST EVENT RECORD WILL BE IGNORED. IF THIS IS NOT APPROPRIATE, THE CALL DATA ITEM CAN BE USED TO OBTAIN ADDITIONAL CALLS, OR $PK'S CALLING PROTOCOL SHOULD BE CHANGED. /usr/bin/ld: Warning: alignment 16 of symbol `cm41_' in /home/bill/nm62gf/nm/BLKDAT.o is smaller than 32 in /home/bill/nm62gf/nm/nonmem.a(INITL.o) Starting nonmem execution ... Note the alignment warning (that can be ignored) and lack of NONMEM output to the console. However the run completed successfully and correctly. William J. Bachman, Ph.D. Director, Pharmacometrics R&D Icon Development Solutions 6031 University Blvd., Suite 300 Ellicott City, MD 21043 Office 215-616-8699 Cell 301-467-8635 [EMAIL PROTECTED]