Skip to content

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.

  1. A lot of errors along the lines of Vars is not a template or qualified name not allowed or error: 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.
  2. 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 to syslibflags in $CHOMBO_HOME/mk/Make.defs.local does the trick.
  3. undefined reference to for_write_seq_lis etc. This has previously arisen with intel compilers and has been solved by adding -lifcore to the syslibflags in $CHOMBO_HOME/mk/Make.defs.local.
  4. 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.
  5. If running make all in the GRChombo base directory works for the examples but gives you GRChombo/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 in mk/compiler/Make.defs.Intel. It seems that -lsvml is the problematic one, but that it can sometimes be safely removed without causing other errors.
  6. If compiling on a laptop with linux, note that csh is not usually installed on Ubuntu 16.04.
  7. 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.
  8. 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).
  9. 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 the -traditional flag to the Fortran compiler (Special thanks to Jon Wakelin for spotting this one). This should have been solved by #8.
  10. 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.
  11. If using the apparent horizon finder you may have issues with PETSc. See Use and install PETSc for some helpful guidance.
Clone this wiki locally