-
Notifications
You must be signed in to change notification settings - Fork 54
Compilation FAQ
K Clough edited this page Aug 9, 2023
·
35 revisions
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 template
orqualified name not allowed
orerror: 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-lblas
and-llapack
tosyslibflags
in$CHOMBO_HOME/mk/Make.defs.local
does the trick. - undefined reference to
for_write_seq_lis
etc. This has previously arisen with intel compilers and has been solved by adding-lifcore
to thesyslibflags
in$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-55
to something higher. Normally 55 should be enough though. - If running
make all
in 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-lsvml
is the problematic one, but that it can sometimes be safely removed without causing other errors. - If compiling on a laptop with linux, note that
csh
is not usually installed on Ubuntu 16.04. - The error
error: identifier "H5Pset_fapl_mpio" is undefined
means 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.-traditional
flag 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.
Copyright GRChombo 2018. Contact us for further details.