e-eight / chime

Two body matrix elements of chiral EFT operators in 3DHO basis.
MIT License
2 stars 2 forks source link

Compilation failure on certain systems #4

Closed basilirob closed 5 years ago

basilirob commented 5 years ago

Compiling ChiME failed in:

  1. WSL on windows 10 (laptop)
    • error seems to be a failure to recognize certain gsl variables
  2. CORI at NERSC
    • fails to find gsl library (because NERSC stores it in a more expanded version folders system)
  3. lf2 (ISU private node)
    • because by default the correct modules aren't loaded
    • lf2, the problem is solved by using 'module load' on gsl, eigen, and gcc/7.2.0 (default gcc doesn't work).

We should consider generalizing the makefile and use config files for particular systems.

e-eight commented 5 years ago

The thing to note here is that the code uses features of (C++11 and) C++14, so it is important to use a compiler that supports C++14. The first version of GCC that had full support for C++14 was 6.1. So it important to use GCC 6.1+. Earlier versions of GCC will not be able to compile it. Though the code can be modified such that it can be compiled GCC 4.8, that seems to be an unnecessary backward step since most systems have GCC 6.1 or above available. I will add this version information to the README file.

That being said, I have updated the Makefile to make it more general. I think it will now run on CORI and lf2, as long as we load an appropriate version of GCC. Please test it on WSL and let me know if it works. Alternatively for compilation on Windows, one can try Cygwin.

Adding a config file would be a good step forward. I am currently busy with getting the code ready for the E2 and GT operators. Feel free to look in to the matter of the config file.

e-eight commented 5 years ago

I have added cmake files to automate and generalize the makefile generation process. This should work on most systems, as long as one has cmake (at least version 3.1). I am closing this issue for now. Feel free to reopen it if you think the problem has not been solved.