From TurboGAP
Revision as of 10:07, 19 July 2021 by Miguel Caro (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

TurboGAP is a code in constant development, and the easiest way to install it is via its Github repository. Since it relies on the soap_turbo module, you need to either clone the repo recursively:

1 cd /turbogap/installation/directory # change this to your preferred location
2 git clone --recursive
3 cd turbogap

or you need to clone the repos independently:

1 cd /turbogap/installation/directory # change this to your preferred location
2 git clone
3 cd turbogap
4 git clone src/soap_turbo

After that, edit the Makefile to suit your system. If you have an MPI installation in your system, then use mpif90 as compiler to be able to run parallel jobs, otherwise you can use gfortran. The Intel Fortran compiler should also work, and you may be able to squeeze some extra performance compared to gfortran, but we have not tested it extensively. TurboGAP requires the use of BLAS/LAPACK linear algebra routines. We have tested TurboGAP to work reliably with the regular Netlib BLAS/LAPACK libraries, as well as OpenBLAS and Intel MKL. The relevant variables you may want to modify in the Makefile are:

 1 F90=gfortran # This is the Fortran compiler
 2 MPIF90=mpif90 # This is an MPI-aware Fortran compiler; it takes priority over F90, comment out if you don't want MPI
 4 # ...
 6 LAPACK_LIB_DIR= # You need to set this if your LAPACK library is not in a standard location
 8 # ....
10 LIBS=-llapack -lblas # This is how your BLAS and LAPACK libraries are called
11 # LIBS=-L$(LAPACK_LIB_DIR) -lmkl_gf_lp64 -lmkl_sequential -lmkl_core # if you're using Intel MKL you can use something like this instead

Once you have edited you Makefile, build the code (deepclean will clear the directory tree in case of previous attempts at building the code):

1 make deepclean; make

The TurboGAP binary will be built in the bin/ directory. You need to add this directory to your PATH, e.g., by doing

1 echo "export PATH=/turbogap/installation/directory/bin:$PATH" >> ~/.bashrc
2 source ~/.bashrc

Now, you can run TurboGAP by doing one of these things:

1 turbogap md # performs molecular dynamics
2 turbogap predict # performs single point calculations; compatible with multiple images in the same XYZ file
3 mpirun -np 8 turbogap md # runs turbogap md on 8 CPU cores with MPI support
4 mpirun -np 8 turbogap predict # runs turbogap predict on 8 CPU cores with MPI support

You can obviously change the number of CPU cores to the desired number if you're using MPI support. Note that, to run, TurboGAP will need an input file, a gap_files directory with GAP files inside, and an XYZ file. Check out the documentation for more info.