Common Problems

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.

Known configure commands

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).

  • Intel Fortran Compiler - parallel openmp
     ./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
  • IBM with xlf - parallel mpi
    ./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
  • Gfortran - sequential
    ./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" \
  • G95 - sequential
    ./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" 
  • SUN Compiler - sequential
    ./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"
  • Portland Compiler - sequential
    ./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" \
  • Pathscale - sequential
    ./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"

Configure Problems

  • 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


    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.

Endianness Issues

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

  • Endianness change at compilation time
    • SUNSTUDIO: add ``-xfilebyteorder=big16:\%all'' to F90FLAGS
    • PGI: add ``-byteswapio'' to F90FLAGS
    • Compaq f90: add ``-convert big-endian'' to F90FLAGS

  • Endianness change at runtime
    • Ifort: ``export F_UFMTENDIAN=big''
    • G95: ``export G95_ENDIAN=BIG''
    • Pathscale: ``export FILENV=.filenv'', where .filenv is a file containing
      assign -F f77.mips -N mips g:su
      assign -F f77.mips -N mips g:du
    • Open64: same as Pathscale

  • Endianness change at configure time
    • gfortran: add --with-gfortran-endianness=big at your configure command to impose the big endianness.