richard-evans / vampire

Atomistic simulator for magnetic materials
GNU General Public License v2.0
122 stars 92 forks source link

problem when using make parallel in develop branch #54

Closed HuangXiaoKai closed 2 years ago

HuangXiaoKai commented 3 years ago

I tried to compire parallel from source for both master and develop branch.

I installed them in a school server so the environments are all loaded by module as shown below:

module load compiler/intel/15
module load intel-mkl/15
module load openmpi/1.10

master branch has no problem with make parallel

However, in develop branch make parallel gives:

/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/basic_string.h:2610: note:                 std::string std::to_string(long long unsigned int)
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/basic_string.h:2616: note:                 std::string std::to_string(long double)
make: *** [obj/statistics/energy_mpi.o] Error 1

and then stops.

Can anyone fix this?

richard-evans commented 3 years ago

Intel compilers are not recommended (slower), but I think you need to add the -std=c++11 to the compile options as that file uses some newer features. Also the openmpi version you are using is really old, and the 3.xx versions might be a bit more performant.

HuangXiaoKai commented 3 years ago

Thank you. Problem solved.


Just for reference: Now my environment is:

Currently Loaded Modules:
  1) intel-mkl/15   2) compiler/gcc/9.1   3) openmpi/4.0

Also, I modified the makefile:

#===================================================================
#
#                               Makefile for VAMPIRE
#
#===================================================================

# Specify compiler for MPI compilation with openmpi
export OMPI_CXX=g++ -std=c++11

...