Compilation FAQ - GRTLCollaboration/GRChombo GitHub Wiki
This is an informal collection of common compilation problems and their solutions. Please add your solutions whenever you encounter a problem so that other people do not have to reinvent the wheel.
- A lot of errors along the lines of
Vars is not a templateorqualified name not allowedorerror: namespace "std" has no member "xxx". Check whether you compile with the c++14 standard (-std=c++14) and that your compiler is recent enough to support the option you have chosen (e.g. Intel compilers later than 16.0). If using the Intel compiler, make sure you have also loaded a new enough version of GCC (e.g. GCC 5 or greater) as the Intel compiler uses the GCC standard library header files. - undefined reference to
dgemm_etc. This is a very common error and usually means that BLAS and LAPACK aren't linked correctly. Usually, adding-lblasand-llapacktosyslibflagsin$CHOMBO_HOME/mk/Make.defs.localdoes the trick. - undefined reference to
for_write_seq_lisetc. This has previously arisen with intel compilers and has been solved by adding-lifcoreto thesyslibflagsin$CHOMBO_HOME/mk/Make.defs.local. - Errors complaining that
template instantiation depth exceeds maximum of 55, which can be solved by changing the line in the file mk/compiler/Make.defs.GNU from-ftemplate-depth-55to something higher. Normally 55 should be enough though. - If running
make allin the GRChombo base directory works for the examples but gives youGRChombo/Source/AMRInterpolator/AMRInterpolator.impl.hpp:426: Assertion points_found == query.m_num_points failed. !!!this has previously been found to be related to the setting for the flibflags inmk/compiler/Make.defs.Intel. It seems that-lsvmlis the problematic one, but that it can sometimes be safely removed without causing other errors. - If compiling on a laptop with linux, note that
cshis not usually installed on Ubuntu 16.04. - The error
error: identifier "H5Pset_fapl_mpio" is undefinedmeans that the hdf5 library has not been built in parallel. Try "module avail hdf5" to see if there is a parallel version available. If not you may need to speak to your systems admin. - A Chombo Make.defs.local file specifically for Ubuntu is available in the InstallNotes/MakeDefsExamples folder . One can install all the packages listed in this file, and then proceed to follow the instructions in Compiling Chombo and Compiling GRChombo. Alternatively, an older guide to installing Chombo and GRChombo on ubuntu can be downloaded here (with thanks to Leonard Werneck for sharing it).
Compiling for newer intel compiler (v19): Higher version add information about the licensing and we use C++ compiler to pre-process fortran files. This causes pre-processed fortran-files having a comments on top in C-style, which can be solved by passing theThis should have been solved by #8.-traditionalflag to the Fortran compiler (Special thanks to Jon Wakelin for spotting this one).- If anaconda is installed in your user directory, it may relink some libraries to their enviroment (e.g. hdf5, mpic++) which could break the compilation. For recent versions of conda (>4.0), you can temporaly deactivate it (via
conda deactivate) prior the compilation. - If using the apparent horizon finder you may have issues with PETSc. See Use and install PETSc for some helpful guidance.