Installation - WatsonGroupTCD/J2suscep GitHub Wiki
For compilation, a FORTRAN compiler, and BLAS and LAPACK libraries are required. To install the code, specify the compiler, the relevant compiler specific options and the path to BLAS and LAPACK libraries in the file 'makefile.include' present in the src directory. The relevant options for the GNU and Intel FORTRAN compilers are provided in the 'arch' subdirectory.
Note: If you are using the GNU fortran compiler, then ensure that you have version 7.3.1 or newer.
For a fresh installation, use the following command:
make
This should compile the ej_calc and suscep codes and place the generated executables (ej_calc_form, ej_calc_spin, suscep) in the 'bin' directory outside the 'src' directory.
For a clean installation, use the following commands:
make clean make
Once the installation is complete, either copy/move the contents of the bin folder to a directory in your pathway (the 'PATH' environment variable) or add the bin to the pathway.
In bash, the bin can be added to the pathway by adding the path to the ~/.bashrc or ~/.bash_profile file:
export PATH="$PATH:/path_to_J2suscep_directory/bin"
To load this change, either restart the terminal or use the 'source' command:
source ~/.bashrc
or
source ~/.bash_profile
To make sure that the path has been added to the PATH variable, use the following command and check if the correct path has been added to the PATH variable.
echo $PATH
The 'test' directory contains tests to verify the proper compilation of the code. To run the basic tests, use the following command:
make
This will run the basic tests. Depending upon the machine and whether the compiler specific optimisations have been included in the compilation of the code, the execution of these tests may take from seconds to minutes. For most purposes, these tests are sufficient to verify the validity of the code.
To run the comprehensive tests, use the following command:
make large
This will run the longer tests. Depending upon the machine and whether the compiler specific optimisations have been included in the compilation of the code, the execution of these tests may take anytime between a few hours to a day.
To run the short and comprehensive tests together, use the following command:
make all
One can also test each executable individually by using one of the following commands depending upon which code needs to be tested:
make test_ej_calc_form make test_ej_calc_spin make test_suscep