Source Code
Choose a version: and click here to download.
Or you can download through our github page.
Prerequisite
TNSG uses many features of the Fortran 2003 standard, and can be successfully compiled by GNU fortran compiler later than 5.4.0 version.
TNSG uses MPI for parallel programming. A popular choice is Openmpi.
TNSG uses Lapack and Blas as math library. Or you may use Intel Math Kernel Library which integrets Lapack and Blas.
Debian/Unbuntu
In Debian/Unbuntu, the prerequisites can be installed by
apt-get install gfortran apt-get install libopenmpi-dev apt-get install libblas-dev liblapack-dev
CentOS
In CentOS, the prerequisites can be installed by
yum install gcc yum install openmpi openmpi-devel yum install blas blas-devel lapack lapack-devel
One may also need to load the module for openmpi
module add name_of_openmpi
Mac Os
In Mac Os, it would be conveniet to use a pack manager such as Homebrew. Then the prerequisites can be installed by
brew install gcc brew install openmpi brew install openblas lapack
Installation Guide
TNSG can be installed with make. Configuration have to be set in the make.inc file. A make.inc for a Linux or Mac OS running GNU compilers is given in the main directory. Then the user can run "make.sh" in the current directory to build the standard library "output/TNSG_x"(x for version), and do "make test" to run the test PEPS program.
Using TNSG in Your Program
Before using TNSG, the module should be used
use mod_name
To use the TNSG in your code, you should use the following option when compiling your code
-I$(TNSG)/TNSG_x/include
and the following option to link your code with the TNSP
-L$(TNSG)/TNSG_x/lib -lib_name
, where $(TNSG) is the TNSG directory and x is the version. And make sure you have linked TNSG with the math library.
For avaliable mod_name and lib_name, please visit our document page.