We have tried to make the compilation step as smooth as possible, but needless to say, some architectures, and some compilers, still present a lot of problems. That means that sometimes you have to intervene directly on the configure command or in the Makefile (the reference Makefile is always src/Makefile), in order to get the correct executable. We try here to give a short list of known problems we have encountered so far and, of course, suggestions on how to get rid of them.
This is a list of known configure script command line, with different architectures and compilers.
These configures are supposed to generate (through the Makefile) big-endian executables (when applicable).
./configure F90=ifort F90FLAGS="-O3 -openmp" --with-fftw3="/path/to/fftw3/" \ --with-blas="-L/path/to/blas/lib -lblas" --with-lapack="-L/path/to/lapack/lib -llapack" \ LDFLAGS="-nofor_main" --enable-openmp
./configure F90=xlf90 F90FLAGS="-O3 -qsuffix=f=f90 -q64" --with-fftw3=/path/to/fftw3/ \ --with-blas="-L/path/to/blas/lib -lblas" --with-lapack="-L/path/to/lapack/lib -llapack" \ FORPRE='-traditional-cpp' --enable-mpi
./configure F90=gfortran F90FLAGS="-O3" --with-fftw3=/path/to/fftw// \ --with-blas="-L/path/to/blas/lib -lblas" --with-lapack="-L/path/to/lapack/lib -llapack" \ --with-gfortran-endianness=big
./configure F90=g95 F90FLAGS="-O3 -fno-second-underscore -i4" --with-fftw3="/path/to/fftw3/" \ --with-blas="-L/path/to/blas/lib -lblas" --with-lapack="-L/path/to/lapack/lib -llapack"
./configure F90=f90 F90FLAGS="-O3 -xfilebyteorder=big16:%all -m64" --with-fftw3=/path/to/fftw3/ \ --with-blas="-L/path/to/blas/lib -lblas" --with-lapack="-L/path/to/lapack/lib -llapack"
./configure F90=pgf90 F90FLAGS="-O3 -byteswapio" --with-fftw3=/path/to/fftw3/ \ --with-blas="-L/path/to/blas/lib -lblas" --with-lapack="-L/path/to/lapack/lib -llapack" \ LDFLAGS_SPECIAL="-Mnomain"
./configure F90="pathf90" F90FLAGS="-O3 -fno-second-underscore" --with-fftw3=/path/to/fftw3/ \ --with-blas="-L/path/to/blas/lib -lblas" --with-lapack="-L/path/to/lapack/lib -llapack"
blas (or lapack) not found (or not linked)
The blas library, as well as the lapack, is a mandatory library for the EXC code. If the library is not in a standard directory, the ./configure will not find it. Use the option
--with-blas="/dir/where/the/blas/are/installed/"
However there's an important thing to know:
when linking libraries to fortran code is MUCH RECOMMENDED to compile all libraries with the same compiler (and version) you use to compile EXC.
The endianness issue is one of the most common problems when running codes that, like DP, needs (also) a binary input file. DP relying on a qplda or a kss file (of course this problem doesn't occur if the ETSF_IO interface is used), which are binary files, the endianness of the input file and the endianness of the compiler/environment have to be the same. If you try to read a big-endian file with a little-endian compiled executable, it won't work.
Fortunately most of the machines host compilers that permit to change the endianness either at compilation time or, even better, at runtime. Notable exception are IBM machines and NEC (these are the only ones I know for sure) where the intrinsic big-endian format cannot be changed (this is the reason why the binary files given into the tests directory are big-endian).
Here there's a list of known FLAGS or ENV variable to change the endianness for several compilers
-xfilebyteorder=big16:\%all
'' to F90FLAGS
-byteswapio
'' to F90FLAGS
-convert big-endian
'' to F90FLAGS
export F_UFMTENDIAN=big
''
export G95_ENDIAN=BIG
''
export FILENV=.filenv
'', where .filenv is a file containingassign -F f77.mips -N mips g:su assign -F f77.mips -N mips g:du
--with-gfortran-endianness=big
at your configure command to impose the big endianness.