How to compile DOCK: Difference between revisions
(12 intermediate revisions by 2 users not shown) | |||
Line 9: | Line 9: | ||
=== gfortran instructions === | === gfortran instructions === | ||
'''Note:''' in search.f and search_multi_cluster.f you need to (1) uncomment the lines that are commented with "for gfortran" and (2) comment out the lines that are commented with "for portland group". | |||
gfortran is a widely available compiler that is preinstalled on all lab machines. In order to compile with gfortran, start from the base directory of DOCK and follow these instructions: | gfortran is a widely available compiler that is preinstalled on all lab machines. In order to compile with gfortran, start from the base directory of DOCK and follow these instructions: | ||
cd | cd dock3/src/libfgz | ||
COMPILER=gfortran make | COMPILER=gfortran make | ||
cd ../i386 | cd ../i386 | ||
Line 20: | Line 22: | ||
If you mistakenly compile something (wrong compiler or the like) you can clean up the files produced from compilation with "make clean". Don't worry about the error messages you may get from this, something is a little fishy with our makefile. | If you mistakenly compile something (wrong compiler or the like) you can clean up the files produced from compilation with "make clean". Don't worry about the error messages you may get from this, something is a little fishy with our makefile. | ||
It may be necessary to run make twice due to an odd error with the version.f file. | |||
=== pgf instructions === | === pgf instructions === | ||
'''Note:''' in search.f and search_multi_cluster.f you need to (1) comment out the lines that are commented with "for gfortran" and (2) uncomment the lines that are commented with "for portland group". | |||
PGF or the Portland Group compiler is the premium option for fortran compilation. In order to compile with pgf you must log onto the psi machine, where the license and installation is located. | PGF or the Portland Group compiler is the premium option for fortran compilation. In order to compile with pgf you must log onto the psi machine, where the license and installation is located. | ||
Line 36: | Line 42: | ||
The instructions to compile are identical to those for gfortran, the only difference being you need to set COMPILER=pgf, e.g | The instructions to compile are identical to those for gfortran, the only difference being you need to set COMPILER=pgf, e.g | ||
cd | cd dock3/src/libfgz | ||
COMPILER=pgf make | COMPILER=pgf make | ||
cd ../i386 | cd ../i386 | ||
Line 43: | Line 49: | ||
You can add DEBUG, SIZE etc. options just like gfortran. | You can add DEBUG, SIZE etc. options just like gfortran. | ||
It may | It may be necessary to run make twice due to an odd error with the version.f file. | ||
==== PGF License Error ==== | |||
Sometimes while compiling with PGF on our psi machine, you may see this error: | |||
<nowiki>pgi-f95-lin64: LICENSE MANAGER PROBLEM: Failed to checkout license</nowiki> | |||
To fix, log in as root and run: | |||
<nowiki>service lmgrd restart</nowiki> | |||
== compiling dock3.7 == | == compiling dock3.7 == |
Latest revision as of 17:05, 8 April 2023
compiling dock3.8
Note- not every machine will have the prerequisite development libraries installed to compile DOCK fortran code. It is best to log into our "psi" machine, which is known to have the prerequisite libraries. Note: git will not work from psi, so you will need to have the code you would like to compile accessible via the NFS.
ssh $USER@psi
Wynton development nodes are also a good place to compile with gfortran. For PGF you will always need to log into our psi machine.
gfortran instructions
Note: in search.f and search_multi_cluster.f you need to (1) uncomment the lines that are commented with "for gfortran" and (2) comment out the lines that are commented with "for portland group".
gfortran is a widely available compiler that is preinstalled on all lab machines. In order to compile with gfortran, start from the base directory of DOCK and follow these instructions:
cd dock3/src/libfgz COMPILER=gfortran make cd ../i386 COMPILER=gfortran make
You should now have a bunch of .o object files as well as a dock64 executable in the i386 directory. If you want to compile a debug build add DEBUG=1 before make, and if you want to compile for a different architecture prefix make with SIZE=[32|64]
If you mistakenly compile something (wrong compiler or the like) you can clean up the files produced from compilation with "make clean". Don't worry about the error messages you may get from this, something is a little fishy with our makefile.
It may be necessary to run make twice due to an odd error with the version.f file.
pgf instructions
Note: in search.f and search_multi_cluster.f you need to (1) comment out the lines that are commented with "for gfortran" and (2) uncomment the lines that are commented with "for portland group".
PGF or the Portland Group compiler is the premium option for fortran compilation. In order to compile with pgf you must log onto the psi machine, where the license and installation is located.
ssh $USER@psi
Set up the compilation environment through the following script:
bash # if you are not already on bash export PATH=/nfs/soft/pgi/current/linux86-64/12.10/bin:$PATH source /nfs/home/tbalius/zzz.virtualenvs/virtualenv-1.9.1/myVEonGimel/bin/activate source /nfs/soft/pgi/env.sh
The instructions to compile are identical to those for gfortran, the only difference being you need to set COMPILER=pgf, e.g
cd dock3/src/libfgz COMPILER=pgf make cd ../i386 COMPILER=pgf make
You can add DEBUG, SIZE etc. options just like gfortran.
It may be necessary to run make twice due to an odd error with the version.f file.
PGF License Error
Sometimes while compiling with PGF on our psi machine, you may see this error:
pgi-f95-lin64: LICENSE MANAGER PROBLEM: Failed to checkout license
To fix, log in as root and run:
service lmgrd restart
compiling dock3.7
1. log into psi (portland fortran compiler is on psi) 2. export PATH=/nfs/soft/pgi/current/linux86-64/12.10/bin:$PATH 3. source Trent's virual environment (source /nfs/home/tbalius/zzz.virtualenvs/virtualenv-1.9.1/myVEonGimel/bin/activate) 4. source /nfs/soft/pgi/env.csh
DOCK 3.7
Frist you need the source code:
- lab members and other developers may check out dock from Github
- others can request the distrabution here [1]
compiling dock
To compile DOCK go to path/DOCK/src/i386
make make DEBUG=1 make SIZE=32 [64] make clean
Note:
- To compile with portland group compilers
- go to a machine were pgf linsence is installed (sgehead1 or psi).
- To add a file for compilation, add the xxxx.f file to path/DOCK/src/ and add xxxx.o to i386/Makefile object list.
debuging dock
Debugging :
pgdbg path/DOCK/src/i386/dock_prof64
profiling dock
Profiling:
make pgprofile less pgprof.out pgprof - opens a GUI profiler that interprets pgprof.out !
you may also do the following:
make dock_prof64 cd /dir/test /dockdir/dock_prof64 INDOCK less pgprof.out
make gmon.out less gmon.out
make gprofile less gprofile.txt
DOCK 3.5.54
This is for the Shoichet Lab local version of DOCK 3.5.54 trunk.
Checking out the source files
Commands:
csh mkdir /where/to/put cd /where/to/put svn checkout file:///raid4/svn/dock svn checkout file:///raid4/svn/libfgz
Compiling the program on our cluster
First, you need to set the path to the PGF compiler by adding this line to your .login file (at the end):
setenv DOCK_BASE ~xyz/dockenv echo DOCK_BASE set to $DOCK_BASE. source $DOCK_BASE/etc/login
When you login to sgehead now, you should see the "Enabling pgf compiler" message
Commands:
ssh sgehead cd /where/to/put/libfgz/trunk make
Since we still have some 32bit computers, you'll also want to do
make SIZE=32
before leaving the libfgz branch and going to DOCK:
cd ../../dock/trunk/i386 make
This makes the 64 bit version. Some options:
make SIZE=32
Makes the 32bit version, useful for running on the cluster since some machines are older.
make DEBUG=1
Makes a debug version that will report line numbers of errors and is usable with pgdbg (the Portland Group Debugger), which is useful when writing code but is 10x (or more) slower.
Compiling the program on the shared QB3 cluster
On one of the compilation nodes on the shared QB3 cluster (optint1 or optint2):
ssh optint2 cd /where/to/put/libfgz/trunk cp Makefile Makefile.old modify Makefile: uncomment the following: FC = ifort -O3 CC = icc -O3 make cd ../../dock/trunk/i386 cp Makefile Makefile.old modify Makefile uncomment the following: F77 = ifort FFLAGS = -O3 -convert big_endian make dock