Difference between revisions of "Documents"

From salmon
Jump to: navigation, search
Line 111: Line 111:
 
If the build is successful, you will get a file <code>salmon.cpu</code> at the directory <code>./bin</code>. If you specify many-core archtechtures, <code>intel-knl</code> or <code>intel-knc</code>, you find a file <code>salmon.mic</code> or both files <code>salmon.cpu</code> and <code>salmon.mic</code>.
 
If the build is successful, you will get a file <code>salmon.cpu</code> at the directory <code>./bin</code>. If you specify many-core archtechtures, <code>intel-knl</code> or <code>intel-knc</code>, you find a file <code>salmon.mic</code> or both files <code>salmon.cpu</code> and <code>salmon.mic</code>.
  
<!===== Build using CMake manually =====
+
<!--===== Build using CMake manually =====
 
<!
 
<!
 
<!In executing <code>configure.py</code>, you may manually specify compiler and environment variables instead of specifying the architecture, for example:
 
<!In executing <code>configure.py</code>, you may manually specify compiler and environment variables instead of specifying the architecture, for example:

Revision as of 10:48, 10 June 2017

Installation

Prerequisites

In this guide, it is assumed that readers have a basic knowledge on Unix. In the following, most works will be done in the command-line interface of Unix. For the installation of SALMON, following packages are required.

  • Fortran90/C compiler with MPI support. Our package assumes users have one of the following compilers:
    • GCC (Gnu Compiler Collection)
    • Intel Fortran/C Compiler
    • Fujitsu Compiler (at FX100 / K-Computer)
  • One of the following library packages for linear algebra:
    • BLAS/LAPACK
    • Intel Math Kernel Library (MKL)
    • Fujitsu Scientific Subroutine Library 2 (SSL-II)
  • One of the following build tools.
    • CMake
    • Gnu Make

If you use other compilers, you may need to change build scripts (CMake, Makefile). If no numerical library is installed in your computer system, you may need to install BLAS/LAPACK by yourself. See Installation of BLAS/LAPACK.


Download

Newest version of the SALMON can be downloaded from Download. To extract files from the downloaded file salmon-x.y.z.tar.gz, type the following command in the command-line,

tar –zxvf ./salmon-xx.xx.xx.tar.gz

After the extraction, the following directories will be created.

SALMON
 |- ARTED      Source codes related to periodic systems
 |- GCEED      Source codes related to isolated systems
 |- src        Source codes of core modules
 |- main       Source codes of the main routines
 |- example    Samples
 |- Makefile   Files related to building


Build

To compile SALMON to create executable binary files, two options are prepared, CMake and Gnu Make. If CMake works in your environment, we recommend to use it. If CMake fails in your environment, consider to use Gnu Make.

Build using CMake

First examine whether CMake is usable in your environment or not. If CMake is installed in your system, you can check the version of the CMake typing in the command-line as

$ cmake --version

If CMake is not installed in your system, error message such as cmake: command not found will appear. If CMake is installed in your system, version number will be shown. To build SALMON, CMake of version 3.0.2 or later is required. If CMake is not installed or CMake of older version is installed in your system, you need to install the new version by yourself.

A detailed description how to install the CMake is given in Installation of CMake. We here describe a simple method to use the binary distribution of CMake. First download the binary distribution file appropriate for your system from https://cmake.org/download/. The filename of the downloaded file will be cmake-<VERSION_PLATFORM>.tar.gz. In standard Unix environment, files for the platform of Linux x86_64 will be appropriate. Next extract the binary executable file of CMake, typing in the command-line as

$ tar xvfz cmake-<VERSION_PLATFORM>.tar.gz

Then you will have the cmake binary file in bin directory. For the cmake binary file to be usable, you need to modify the Unix environmental variable $PATH appropriately.

Need to add how to modify the $PATH

To confirm that CMake of the new version is usable in your environment, type cmake --version in the command-line.

Build using CMake specifying archtechture

Confirming that CMake of version 3.0.2 or later can be usable in your system, proceed the following steps. We assume that you are in the directory SALMON.

  • Create a new temporary directory `build` and move to the directory,
$ mkdir build
$ cd build
  • Execute the python script configure.py and then make,
$ python ../configure.py –arch=ARCHTECTURE
$ make

Here ARCHTECTURE specifies the architecture of the CPU in your computer system such as intel-avx. You need to choose ARCHTECUTRE from the following options:

arch Detail Compiler Numerical Library
intel-knl Intel Knights Landing Intel Compiler Intel MKL
intel-knc Intel Knights Corner Intel Compiler Intel MKL
intel-avx Intel Processer (Ivy-, Sandy-Bridge) Intel Compiler Intel MKL
intel-avx2 Intel Processer (Haswell, Broadwell ..) Intel Compiler Intel MKL
fujitsu-fx100 FX100 Su Fujitsu Compiler SSL-II
fujitsu-k Fujitsu FX100 / K-computer Fujitsu Compiler SSL-II

If the build is successful, you will get a file salmon.cpu at the directory ./bin. If you specify many-core archtechtures, intel-knl or intel-knc, you find a file salmon.mic or both files salmon.cpu and salmon.mic.