Open huanglangwen opened 4 years ago
dont we have to use this: https://scicomp.ethz.ch/wiki/Using_the_batch_system
Yes, but before we submit jobs to the batch system, we need to compile the program :)
I found a good way to manage dependencies on clusters (including euler!): spack
. With spack, it would be a piece of cake to handle our dependencies including C++17 compiler, openmpi, cmake and possibly HDF5 (with the chosen mpi). All we have to do is:
#module load python/3.6.0 #maybe have to update python
git clone https://github.com/spack/spack.git
cd spack/bin
./spack env activate myproject #bring installed packages into context, or manually load them using `./spack load <package>`
./spack install gcc@9.2.0
./spack install openmpi%gcc
./spack install hdf5%gcc
Spack will take a lot of time for compiling, but it should be all automatic.
I have successfully built our program on the Leonhard cluster, here’s some note on how to successfully build it:
-flto
flag in CMakeLists.txt because gcc 8 can’t recognize it@hanyao8 @spaceben @kosta777