Difference between revisions of "CamCASP/Compilation"
import>Ajs1 m |
import>Ajs1 |
||
Line 29: | Line 29: | ||
mymake='make COMPILER=gfortran MACHINE=tati ' |
mymake='make COMPILER=gfortran MACHINE=tati ' |
||
− | ${mymake} |
+ | ${mymake} clean |
− | ${mymake} |
+ | ${mymake} all |
− | ${mymake} NAME=cluster |
||
− | ${mymake} NAME=process |
||
− | ${mymake} NAME=pfit |
||
− | ${mymake} NAME=casimir |
||
exit |
exit |
||
</pre> |
</pre> |
||
− | These are really simple scripts. After compilation (when '''makeall''' exits) the default GCC flags will be set. So your experimental version of GCC doesn't affect |
+ | These are really simple scripts. After compilation (when '''makeall''' exits) the default GCC flags will be set. So your experimental version of GCC doesn't affect anything else. |
+ | |||
+ | * '''Compiling on Mac OS X''' |
||
+ | |||
+ | 1. Install Fink and FinkCommander. See http://finkcommander.sourceforge.net. |
||
+ | |||
+ | 2. Make sure you get the latest version of gfortran, from http://gcc.gnu.org/wiki/GFortranBinaries. |
||
+ | |||
+ | 3. You need the full ATLAS lapack library. |
||
+ | |||
+ | 4. The CamCASP programs should compile without any problems using the scripts above. |
||
+ | |||
+ | 5. The Dalton compilation falls over with old versions of gfortran. More to follow. |
||
+ | |||
+ | 6. Building SAPT is troublesome, because the SAPT bin directory contains a shell script called SAPT which gets confused under Mac OS X with the SAPT executable, called sapt. This can be worked around by renaming the SAPT script, e.g. as doSAPT, and commenting out the lines (around line 348) in Compall that change the first line of SAPT. (It doesn't need to be changed for Mac OS.) This must be done before attempting to run Compall. Line 329 of Compall also needs to be changed to provide for the gfortran option. |
Revision as of 11:12, 26 December 2008
CamCASP => Compilation
Notes on compiling CamCASP
- Gfortran
There seem to be problems with gfortran versions earlier than 4.3. I think it is because the preprocessor is not automatically used (even if -cpp is used, because only with version 4.4 is this option recognised). It may be possible to get around this, but for now, I've found it easier to download my own copy of GCC 4.4.
GCC 4.4 will reside in its own directory. Do not install it in with the other GCC compilers as it is still under development. Because it will reside in a non-standard location, you need to set some environment scripts to get the compilation going. I use the following scripts.
1. gcc_4.4.env
#!/bin/bash gcc44="tmp/gcc-trunk" export LD_RUN_PATH=${HOME}/$gcc44/lib64 echo $LD_RUN_PATH export LD_LIBRARY_PATH=${HOME}/$gcc44/lib64:$LD_LIBRARY_PATH export PATH=${HOME}/$gcc44/bin:$PATH
2. makeall
#!/bin/bash source ./gcc_4.4.env echo $LD_RUN_PATH echo $LD_LIBRARY_PATH gfortran -v mymake='make COMPILER=gfortran MACHINE=tati ' ${mymake} clean ${mymake} all exit
These are really simple scripts. After compilation (when makeall exits) the default GCC flags will be set. So your experimental version of GCC doesn't affect anything else.
- Compiling on Mac OS X
1. Install Fink and FinkCommander. See http://finkcommander.sourceforge.net.
2. Make sure you get the latest version of gfortran, from http://gcc.gnu.org/wiki/GFortranBinaries.
3. You need the full ATLAS lapack library.
4. The CamCASP programs should compile without any problems using the scripts above.
5. The Dalton compilation falls over with old versions of gfortran. More to follow.
6. Building SAPT is troublesome, because the SAPT bin directory contains a shell script called SAPT which gets confused under Mac OS X with the SAPT executable, called sapt. This can be worked around by renaming the SAPT script, e.g. as doSAPT, and commenting out the lines (around line 348) in Compall that change the first line of SAPT. (It doesn't need to be changed for Mac OS.) This must be done before attempting to run Compall. Line 329 of Compall also needs to be changed to provide for the gfortran option.