Compilation issues on the Odin machine at MPA
Some colleagues at MPA tried to compile and tun SWIFT on their machine (Odin). They ran into troubles with their GCC+MPI implementation that does not support multi-threading. However, with the Intel toolstack it seems to work. Here is a summary of what they had to do:
I had to set CC=mpiicc and MPICC=mpiicc just to use the intel compiler. It seems that mpigcc mpicc in our version does not > really use the mt_mpi but tries to use the lmpich flag. It might be an issue with the gcc part. I'm not completely sure. To include the HDF5 header I had to include them by:
export CFLAGS='-I
(HDF5_HOME)/include' CPPFLAGS='-I(HDF5_HOME)/include' LDFLAGS='-L$(HDF5_HOME)/lib'which I thought was done by the module file.
After I set the both flags above I was able to compile the git version. I really think that we experienced some issues with the gcc version we are running on Odin. Since I'm using also the anaconda package for python I had to tweak a bit more since it also comes with the compilers and > mpi executables. The only other thing was to set the path prefix, but that is a normal procedure.
For the hdf5 failure I think the make file does not add the HDF5_CFLAGS to the normal CFLAGS of the compiler.
Let me summarise this. First we have to export the path to the hdf5 header and libs by export CFLAGS='-I
(HDF5_HOME)/include' CPPFLAGS='-I(HDF5_HOME)/include' LDFLAGS='-L$(HDF5_HOME)/lib' then we also have to change the compiler to the intel one, since gcc is also standard on an unix system and is always
found, by export CC=mpiicc, MPICC=mpiicc
Those two steps lead to an successful compilation of the code, even the compiler flags can not be added by the configure script. A small readme or needed versions of programs would be good. But I suppose that is coming with a later version of the code.
My suspicion with the first bug is that their module script is not setting the right environment variables when they switch to the MPI compiler. Do you think this is a valid assumption ?
Regarding the HDF5 problem, I was wondering whether that specific search path for the libraries should/could be added to the autotools ? Or maybe it is also something fishy going on with their modules... ?
Thanks for your input !