Difference between revisions of "Install and Run-v.1.0.0"

From salmon
Jump to: navigation, search
(Build using CMake)
 
(46 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
== Prerequisites ==
 
== Prerequisites ==
  
In this guide, it is assumed that readers have a basic knowledge of 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.
+
In this guide, it is assumed that readers have a basic knowledge of Unix and its command line operations.  
 +
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:
+
* Fortran90/C compiler. Our package assumes users have one of the following compilers:
 
** GCC (Gnu Compiler Collection)
 
** GCC (Gnu Compiler Collection)
 
** Intel Fortran/C Compiler
 
** Intel Fortran/C Compiler
Line 13: Line 14:
 
** Fujitsu Scientific Subroutine Library 2 (SSL-II)
 
** Fujitsu Scientific Subroutine Library 2 (SSL-II)
  
* One of the following build tools.
+
* Build tools.
 
** CMake
 
** CMake
** Gnu Make
 
  
If you use other compilers, you may need to change build scripts (CMake, Makefile). If no numerical library is installed on your computer system, you may need to install BLAS/LAPACK by yourself. See Tips for Installation.
+
If you use other compilers, you may need to change build scripts (CMake). See [[#Additional options in configure.py script]].
 +
If no numerical library is installed on your computer system, you may need to install BLAS/LAPACK by yourself.
 +
See [[Troubleshooting of the Installation Process]].
 +
 
 +
For the installation of SALMON, we adopt the CMake tools as the first option.
 +
If there were any problems to use CMake tools in your environment, you may use the GNU make tools.
 
See [[Troubleshooting of the Installation Process]].
 
See [[Troubleshooting of the Installation Process]].
  
 
== Download ==
 
== Download ==
  
The newest version of the SALMON can be downloaded from [[Download]].
+
The newest version of SALMON can be downloaded from [[Download]].
 
To extract files from the downloaded file ''salmon-<VERSION>.tar.gz'', type the following command in the command-line,
 
To extract files from the downloaded file ''salmon-<VERSION>.tar.gz'', type the following command in the command-line,
  
Line 30: Line 35:
  
 
  SALMON
 
  SALMON
  |- ARTED      Source codes related to periodic systems
+
   |- src        Source codes
  |- GCEED      Source codes related to isolated systems
 
   |- src        Source codes of core modules
 
  |- main      Source codes of the main routines
 
 
   |- example    Samples
 
   |- example    Samples
   |- Makefile   Files related to building
+
   |- makefiles   GNU Makefiles for building
 +
  |- cmakefiles  CMake related files
 +
  |- makefiles  GNU Makefiles for building
  
 
== Build ==
 
== Build ==
  
To compile SALMON to create executable binary files, two options are prepared, CMake and Gnu Make.  
+
To compile SALMON to create executable the binary files, we adopt to use CMake tools as the first option.
If CMake works in your environment, we recommend to use it.
+
In case you fail to build SALMON using CMake in your environment, we may use Gnu Make. See [[Install_and_Run-v.1.0.0#Build_with_GNU_Makefile]].
If CMake fails in your environment, consider using Gnu Make.
 
  
=== Build using CMake ===
+
=== Checking CMake availability ===
  
 
First, examine whether CMake is usable in your environment or not.
 
First, examine whether CMake is usable in your environment or not.
Line 53: Line 56:
 
If CMake is installed on your system, the version number will be shown.
 
If CMake is installed on your system, the version number will be shown.
 
To build SALMON, CMake of version 3.0.2 or later is required.  
 
To build SALMON, CMake of version 3.0.2 or later is required.  
If CMake is not installed or CMake of the older version is installed in your system, you need to install the new version by yourself.  
+
If you confirm that Came of version 3.0.2 or later is installed in your system, proceed to [[#Build using CMake]].
 +
However, we realize that old versions of CMake are installed in many systems.
 +
If CMake is not installed or CMake of older versions is installed in your system, you need to install the new version by yourself.
 +
It is a simple procedure and explained below.  
  
The installation of the CMake is simple.
+
=== Installation of CMake ===
A detailed description of the installation is given in [[Tips_for_Installation#Installation_of_CMake | Installation of CMake]].
 
Here we 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
+
[https://cmake.org/|CMake CMake] is a cross-platform build tool.
 +
The simplest way to make CMake usable in your environment is to get the binary distribution of CMake from the [https://cmake.org/download/ download page]. The file name of the binary distribution will be <code>cmake-<VERSION>-<PLATFORM>.tar.gz</code>). In standard Unix environment, a file for the platform of Linux x86_64 will be appropriate.
  
Then you will have the cmake binary file in ''bin'' directory.
+
To download the file, proceed as follows: We assume that you are in the directory that you extracted files from the downloaded file of SALMON,
For the CMake binary file to be usable, you need to modify the Unix environmental variable ''$PATH'' appropriately.
+
and that you will use the version 3.8.2. First get the URL of the download link from your browser, and use <code>wget</code> command in your Unix command-line.
 +
<pre>
 +
$ wget https://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.tar.gz
 +
</pre>
 +
Next, unpack the archive by
 +
<pre>
 +
$ tar -zxvf cmake-3.8.2-Linux-x86_64.tar.gz
 +
</pre>
 +
and you will have the binary <code>make-3.8.2-Linux-x86_64/bin/cmake</code> in your directory.
  
'''''Description how to modify the $PATH should come here'''''
+
To make the <code>cmake</code> command usable in your command-line, you need to modify the environment variable <code>$PATH</code> so that the executable of CMake are settled inside the directory specified in your <code>$PATH</code>.
 +
If you use the bash shell, you need to modify the file <code>~/.bashrc</code> that specifies the <code>$PATH</code> variable. It can be done by typing the following command in your login directory,
 +
<pre>
 +
$ export PATH=<SALMON_INSTALLATION_DIRECTORY>/cmake-3.8.2-Linux-x86_64/bin:$PATH
 +
</pre>
 +
and then reload the configuration by typing:
 +
<pre>
 +
$ source ~/.bashrc
 +
</pre>
  
To confirm that CMake of the new version is usable in your environment, type <code>cmake --version</code> in the command-line.
+
=== Build using CMake ===
 
 
==== Build using CMake specifying archtechture ====
 
  
Confirming that CMake of version 3.0.2 or later can be usable on your system, proceed the following steps.  
+
Confirming that CMake of version 3.0.2 or later can be usable in your environment, proceed the following steps.  
 
We assume that you are in the directory SALMON.
 
We assume that you are in the directory SALMON.
 
* Create a new temporary directory ''build'' and move to the directory,
 
* Create a new temporary directory ''build'' and move to the directory,
Line 86: Line 101:
 
  $ make
 
  $ make
  
Here ''ARCHITECTURE'' specifies the architecture of the CPU in your computer system such as ''intel-avx''.  
+
In executing the python script, you need to specify ''ARCHITECTURE'' that indicates the architecture of the CPU in your computer system such as ''intel-avx''. The options of the ''ARCHTECUTRE'' are as follows:
You need to choose ''ARCHTECUTRE'' from the following options:
 
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 100: Line 114:
 
| intel-avx2 || Intel Processer (Haswell, Broadwell ..) || Intel Compiler || Intel MKL  
 
| intel-avx2 || Intel Processer (Haswell, Broadwell ..) || Intel Compiler || Intel MKL  
 
|-
 
|-
| fujitsu-fx100 || FX100 Su || Fujitsu Compiler || SSL-II  
+
| fujitsu-fx100 || FX100 Supercomputer || Fujitsu Compiler || SSL-II  
 
|-
 
|-
 
| fujitsu-k || Fujitsu FX100 / K-computer || 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 ''.salmon/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''.
+
If the build is successful, you will get a file ''salmon.cpu'' at the directory ''salmon/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''.
  
<!--
+
=== Build for single process calculations ===
===== 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 default, the python script assumes parallel execution.
 +
If you use a single processor machine, specify <code>--disable-mpi</code> in executing the python script:
  
$ python ../configure.py FC=mpiifort CC=mpiicc FFLAGS="-xAVX" CFLAGS="-restrict -xAVX"
+
  $ python ../configure.py --arch=<ARCHITECTURE> --disable-mpi
$ make
 
 
 
A list of the environmental variables is given below:
 
(Table)
 
-->
 
  
 
== Files necessary to run SALMON ==
 
== Files necessary to run SALMON ==
  
 
To run SALMON, at least two kinds of files are required for any calculations.  
 
To run SALMON, at least two kinds of files are required for any calculations.  
One is an input file, with the filename extension of ''*.inp*'', to be read from the standard input, ''stdin''.  
+
One is an input file with the filename extension ''*.inp*'' that should be read from the standard input ''stdin''.  
It should be prepared in the Fortran90 namelist format.  
+
This file should be prepared in the Fortran90 namelist format.  
 
Pseudopotential files of relevant elements are also required.  
 
Pseudopotential files of relevant elements are also required.  
 
Depending on your purpose, some other files may also be necessary.  
 
Depending on your purpose, some other files may also be necessary.  
For example, coordinates of atomic positions of the target material may either be written in the input file or prepared as a separate file.
+
For example, coordinates of atomic positions of the target material may be either written in the input file or prepared as a separate file.
  
 
=== Pseudopotentials ===
 
=== Pseudopotentials ===
  
 
SALMON utilizes norm-conserving pseudpotentials.  
 
SALMON utilizes norm-conserving pseudpotentials.  
You may find pseudopotentials of some elements in [[Samples]].  
+
You may find pseudopotentials of some elements in the samples prepared in [[Tutorial-v.1.0.0]].  
SALMON allows using several formats of pseudopotentials that can be easily obtained from websites listed below.
+
In SALMON, several formats of pseudopotentials may be usable. Pseudopotentials with an extension ''.cpi'' that can be obtained from the website listed below.
  
  
Line 141: Line 151:
 
|}
 
|}
  
In the input file, you need to write the filename of the pseudopotential.
+
Filenames of the pseudopotentials should be written in the input file.
Use exactly the same filename as that downloaded from the website or that in the [[Samples]].
 
  
 
=== input file ===
 
=== input file ===
  
SALMON describes electron dynamics in systems with both isolated and periodic boundary conditions.
+
Input files are composed of several blocks of namelists,
The boundary condition is specified by the variable ''iperiodic'' in the namelist ''&system''.
 
Calculations are achieved in two steps; first, the ground state calculation is carried out and then electron dynamics calculations in real time are achieved.
 
Choice of the calculation mode is specified by the variable ''calc_mode'' in the namelist ''&calculation''.
 
For isolated systems, the ground state and the electron dynamics calculations should be carried out in two steps.
 
First the ground state calculation is achieved specifying ''calc_mode = 'GS' ''.
 
Then the real-time electron dynamics calculation is achieved specifying ''calc_mode = 'RT' ''.
 
For periodic systems, two calculations can also be carried out in one step specifying ''calc_mode = 'GS_RT' ''.
 
For the isolated systems, ’GS-RT’ is not implemented. However, their calculations are done at once if
 
users prepare appropriate shell scripts.
 
 
 
There are about 20 groups of main namelists listed below.
 
A list of variables in each namelist is provided in the file ''???'' included in the source-file distribution.
 
 
 
{| class="wikitable"
 
| name of namelist || description
 
|-
 
| &calculation || specify calculation modes
 
|-
 
| &control  || parameters related to general conditions for the calculation
 
|-
 
| &units        || specify units of input and output files
 
|-
 
| &parallel      || parameters related to parallelization
 
|-
 
| &system      || information related to the system
 
|-
 
| &pseudo      || information related to pseudopotentials
 
|-
 
| &functional || specify density functional to be used
 
|-
 
| &rgrid        || parameters related to real space grid 
 
|-
 
| &kgird      || parameters related to k-points for periodic systems
 
|-
 
| &tgrid      || parameters related to time evolution
 
|-
 
| &propagation || specify a choice of the propagation method
 
|-
 
| &scf          || parameters related to ground state calculation
 
|-
 
| &emfield  || parameters of electric fields applied to the system
 
|-
 
| &linear_response || magnitude of the distortion for linear response
 
|-
 
| &multiscale || parameters related to coupled multiscale calculations of electron dynamics and light propagations
 
|-
 
| &analysis || parameters related to output files
 
|-
 
| &hartree      || parameters related to Hartree potential calculation of isolated systems
 
|-
 
| &ewald  || parameters related to Ewald sum that appears in the ground state calculation of periodic systems
 
|-
 
| &atomic_coor || Atomic coordinates can be written here
 
|}
 
 
 
There are 5 groups of additional namelists listed below. In a future version of SALMON,
 
variables in these namelists may be added to main namelists, be combined to them, and be removed.
 
 
 
{| class="wikitable"
 
| name of namelist || description
 
|-
 
| &group_fundamental || parameters related to fundamental variables for the isolated systems 
 
|-
 
| &group_parallel || parameters related to parallelization for the isolated systems     
 
|-
 
| &group_hartree || parameters related to Hartree otential calculation of isolated systems
 
|-
 
| &group_file || parameters related to intermediate files for isolated systems
 
|-
 
| &group_others || other parameters for isolated systems
 
|}
 
 
 
In [[Samples]], we prepare six samples that cover typical calculations feasible by using SALMON.
 
We prepare explanations for the input files that will help to prepare input files of your own interests.
 
 
 
Here we briefly explain the format of the namelist.
 
  
 
  &namelist1
 
  &namelist1
Line 234: Line 167:
  
 
A block of namelists starts with ''&namelist'' line and ends with ''/'' line.  
 
A block of namelists starts with ''&namelist'' line and ends with ''/'' line.  
Between two lines, descriptions of variables and their values appear.  
+
The blocks may appear in any order.
 +
 
 +
Between two lines of ''&namelist'' and ''/'', descriptions of variables and their values appear.  
 
Note that many variables have their default values so that it is not necessary to give values for all variables.  
 
Note that many variables have their default values so that it is not necessary to give values for all variables.  
The description of the variables may appear at any position if they are between ''&namelist'' and ''/''.
+
Descriptions of the variables may appear at any position if they are between ''&namelist'' and ''/''.
Input files constitute of several blocks of namelists.
+
 
The blocks can appear in any order.
+
SALMON describes electron dynamics in systems with both isolated and periodic boundary conditions.
 +
The boundary condition is specified by the variable ''iperiodic'' in the namelist ''&system''.
 +
 
 +
Calculations are usually achieved in two steps; first, the ground state calculation is carried out and then electron dynamics calculations in real time is carried out. A choice of the calculation mode is specified by the variable ''calc_mode'' in the namelist ''&calculation''.
 +
For isolated systems, the ground state and the electron dynamics calculations should be carried out as two separate executions.
 +
First the ground state calculation is carried out specifying ''calc_mode = 'GS' ''.
 +
Then the real-time electron dynamics calculation is carried out specifying ''calc_mode = 'RT' ''.
 +
For periodic systems, two calculations should be carried out as a single execution specifying ''calc_mode = 'GS_RT' ''.
 +
 
 +
In [[Tutorial-v.1.0.0]], we prepare six tutorials that cover typical calculations feasible by SALMON.
 +
We prepare explanations of the input files of the tutorials that will help to prepare input files of your own interests.
 +
 
 +
There are more than 20 groups of namelists. A complete list of namelist variables is given in the file ''SALMON/manual/input_variables.md''.
 +
Namelist variables that are used in our tutorials are explained at [[Tutorial-v.1.0.0#Namelists and their values]].
  
 
== Run SALMON ==
 
== Run SALMON ==
  
To run SALMON, the executable file of ''salmon.cpu'' (and ''salmon.mic'' if your system is the many-core machine) should be built from the source file of SALMON as described above. An input file ''inputfile.inp'' and pseudopotential files should also be prepared as mentioned above.
+
Before running SALMON, the following preparations are required as described above: The executable file of ''salmon.cpu'' (and ''salmon.mic'' if your system is the many-core machine) should be built from the source file of SALMON. An input file ''inputfile.inp'' and pseudopotential files should also be prepared.  
In order to execute the calculation, for the single process environment, type the following command:
+
 
 +
The execution of the calculation can be done as follows: In single process environment, type the following command:
  
 
  $ salmon.cpu < inputfile.inp > fileout.out
 
  $ salmon.cpu < inputfile.inp > fileout.out
  
For the multiprocess environment, If the command to execute calculations using MPI is ''mpiexec', the calculation will start
+
In multiprocess environment in which the command to execute parallel calculations using MPI is ''mpiexec', type the following command:
  
 
  $ mpiexec -n NPROC salmon.cpu < inputfile.inp > fileout.out
 
  $ mpiexec -n NPROC salmon.cpu < inputfile.inp > fileout.out
  
where NPROC is the number of MPI processes you want to use.
+
where NPROC is the number of MPI processes that you will use.
For the many-core processor (e.g. intel-knl)  environment, the execution command is
+
In many-core processor (e.g. intel-knl)  environment, the execution command is
  
 
  $ mpiexec.hydra -n NPROC salmon.mic < inputfile.inp > fileout.out
 
  $ mpiexec.hydra -n NPROC salmon.mic < inputfile.inp > fileout.out
  
The execution command and the job submission procedure depends much on the local environment.
+
The execution command and the job submission procedure depends much on local environment. We summarize general conditions to execute SALMON:
We just summarize the general conditions to execute SALMON:
 
  
* salmon runs in parallel environment using MPI.
+
* salmon runs in both single-process and multi-process environments using MPI.
 
* executable files are prepared as ''/salmon/bin/salmon.cpu'' and/or ''/salmon/bin/salmon.mic'' in the standard build procedure.
 
* executable files are prepared as ''/salmon/bin/salmon.cpu'' and/or ''/salmon/bin/salmon.mic'' in the standard build procedure.
 
* to start calculations, ''inputfile.inp'' should be read through ''stdin''.
 
* to start calculations, ''inputfile.inp'' should be read through ''stdin''.
 +
 +
=  Appendix  =
 +
 +
== Additional options in configure.py script ==
 +
 +
=== Manual specifications of compiler and environment variables ===
 +
 +
In executing <code>configure.py</code>, you may manually specify compiler and environment variables instead of specifying the architecture, for example:
 +
 +
$ python ../configure.py FC=mpiifort CC=mpiicc FFLAGS="-xAVX" CFLAGS="-restrict -xAVX"
 +
 +
The major options of <code>configure.py</code> are as follows:
 +
{| class="wikitable"
 +
| Commandline switch      || Detail                       
 +
|-
 +
| -a ARCH, --arch=ARCH || Target architecture 
 +
|-
 +
| --enable-mpi, --disable-mpi  ||  enable/disable MPI parallelization.
 +
|-
 +
| ---enable-scalapack, --disable-scalapack  ||  enable/disable computations with ScaLAPACK library
 +
|-
 +
| FC, FFLAGS  ||  User-defined Fortran Compiler, and the compiler options
 +
|-
 +
| CC, CFLAGS  ||  User-defined C Compiler, and the compiler options
 +
|}
 +
 +
 +
=== Build for single process calculations ===
 +
 +
If you use a single processor machine, specify <code>--disable-mpi</code> in executing the python script:
 +
 +
  $ python ../configure.py --arch=<ARCHITECTURE> --disable-mpi
 +
 +
=== Build in GCC/GFortran environemnt ===
 +
 +
If you use GCC/GFortran compiler, specify the following flags in executing the python script:
 +
 +
$ python ../configure.py FC=gfortran CC=gcc FFLAG=-O3 CFLAG=-O3
 +
 +
== Build using GNU Makefile ==
 +
 +
If CMake build fails in your environment, we recommend you to try to use Gnu Make for the build process.
 +
First, enter the directory ''makefiles'':
 +
 +
$ cd SALMON/makefiles
 +
 +
In the directory, ''Makefile'' files are prepared for several architectures:
 +
* fujitsu
 +
* gnu
 +
* gnu-without-mpi
 +
* intel
 +
* intel-avx
 +
* intel-avx2
 +
* intel-knc
 +
* intel-knl
 +
* intel-without-mpi
 +
 +
''Makefile'' files with <code>-without-mpi</code> indicate that they are for single processor environment.
 +
Choose ''Makefile'' appropriate for your environment, and execute the make command:
 +
 +
$ make -f Makefile.PLATFORM
 +
 +
If the make proceeds successful, a binary file is created in the directory <code>SALMON/bin/</code>.

Latest revision as of 14:19, 22 November 2017

Prerequisites

In this guide, it is assumed that readers have a basic knowledge of Unix and its command line operations. For the installation of SALMON, following packages are required.

  • Fortran90/C compiler. 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)
  • Build tools.
    • CMake

If you use other compilers, you may need to change build scripts (CMake). See #Additional options in configure.py script. If no numerical library is installed on your computer system, you may need to install BLAS/LAPACK by yourself. See Troubleshooting of the Installation Process.

For the installation of SALMON, we adopt the CMake tools as the first option. If there were any problems to use CMake tools in your environment, you may use the GNU make tools. See Troubleshooting of the Installation Process.

Download

The newest version of SALMON can be downloaded from Download. To extract files from the downloaded file salmon-<VERSION>.tar.gz, type the following command in the command-line,

$ tar –zxvf ./salmon-<VERSION>.tar.gz

After the extraction, the following directories will be created.

SALMON
 |- src        Source codes
 |- example    Samples
 |- makefiles   GNU Makefiles for building
 |- cmakefiles   CMake related files
 |- makefiles   GNU Makefiles for building

Build

To compile SALMON to create executable the binary files, we adopt to use CMake tools as the first option. In case you fail to build SALMON using CMake in your environment, we may use Gnu Make. See Install_and_Run-v.1.0.0#Build_with_GNU_Makefile.

Checking CMake availability

First, examine whether CMake is usable in your environment or not. Type the following in Unix command-line:

$ cmake --version

If CMake is not installed in your system, an error message such as cmake: command not found will appear. If CMake is installed on your system, the version number will be shown. To build SALMON, CMake of version 3.0.2 or later is required. If you confirm that Came of version 3.0.2 or later is installed in your system, proceed to #Build using CMake. However, we realize that old versions of CMake are installed in many systems. If CMake is not installed or CMake of older versions is installed in your system, you need to install the new version by yourself. It is a simple procedure and explained below.

Installation of CMake

CMake is a cross-platform build tool. The simplest way to make CMake usable in your environment is to get the binary distribution of CMake from the download page. The file name of the binary distribution will be cmake-<VERSION>-<PLATFORM>.tar.gz). In standard Unix environment, a file for the platform of Linux x86_64 will be appropriate.

To download the file, proceed as follows: We assume that you are in the directory that you extracted files from the downloaded file of SALMON, and that you will use the version 3.8.2. First get the URL of the download link from your browser, and use wget command in your Unix command-line.

$ wget https://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.tar.gz

Next, unpack the archive by

$ tar -zxvf cmake-3.8.2-Linux-x86_64.tar.gz

and you will have the binary make-3.8.2-Linux-x86_64/bin/cmake in your directory.

To make the cmake command usable in your command-line, you need to modify the environment variable $PATH so that the executable of CMake are settled inside the directory specified in your $PATH. If you use the bash shell, you need to modify the file ~/.bashrc that specifies the $PATH variable. It can be done by typing the following command in your login directory,

$ export PATH=<SALMON_INSTALLATION_DIRECTORY>/cmake-3.8.2-Linux-x86_64/bin:$PATH

and then reload the configuration by typing:

$ source ~/.bashrc

Build using CMake

Confirming that CMake of version 3.0.2 or later can be usable in your environment, 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

In executing the python script, you need to specify ARCHITECTURE that indicates the architecture of the CPU in your computer system such as intel-avx. The options of the ARCHTECUTRE are as follows:

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 Supercomputer 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 salmon/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.

Build for single process calculations

In default, the python script assumes parallel execution. If you use a single processor machine, specify --disable-mpi in executing the python script:

 $ python ../configure.py --arch=<ARCHITECTURE> --disable-mpi

Files necessary to run SALMON

To run SALMON, at least two kinds of files are required for any calculations. One is an input file with the filename extension *.inp* that should be read from the standard input stdin. This file should be prepared in the Fortran90 namelist format. Pseudopotential files of relevant elements are also required. Depending on your purpose, some other files may also be necessary. For example, coordinates of atomic positions of the target material may be either written in the input file or prepared as a separate file.

Pseudopotentials

SALMON utilizes norm-conserving pseudpotentials. You may find pseudopotentials of some elements in the samples prepared in Tutorial-v.1.0.0. In SALMON, several formats of pseudopotentials may be usable. Pseudopotentials with an extension .cpi that can be obtained from the website listed below.


pseudopotential website
Ab-init FHI http://www.ab-init

Filenames of the pseudopotentials should be written in the input file.

input file

Input files are composed of several blocks of namelists,

&namelist1
  variable1 = int_value
  variable2 = 'char_value'
 /
&namelist2
  variable1 = real8_value
  variable2 = int_value1, int_value2, int_value3
/

A block of namelists starts with &namelist line and ends with / line. The blocks may appear in any order.

Between two lines of &namelist and /, descriptions of variables and their values appear. Note that many variables have their default values so that it is not necessary to give values for all variables. Descriptions of the variables may appear at any position if they are between &namelist and /.

SALMON describes electron dynamics in systems with both isolated and periodic boundary conditions. The boundary condition is specified by the variable iperiodic in the namelist &system.

Calculations are usually achieved in two steps; first, the ground state calculation is carried out and then electron dynamics calculations in real time is carried out. A choice of the calculation mode is specified by the variable calc_mode in the namelist &calculation. For isolated systems, the ground state and the electron dynamics calculations should be carried out as two separate executions. First the ground state calculation is carried out specifying calc_mode = 'GS' . Then the real-time electron dynamics calculation is carried out specifying calc_mode = 'RT' . For periodic systems, two calculations should be carried out as a single execution specifying calc_mode = 'GS_RT' .

In Tutorial-v.1.0.0, we prepare six tutorials that cover typical calculations feasible by SALMON. We prepare explanations of the input files of the tutorials that will help to prepare input files of your own interests.

There are more than 20 groups of namelists. A complete list of namelist variables is given in the file SALMON/manual/input_variables.md. Namelist variables that are used in our tutorials are explained at Tutorial-v.1.0.0#Namelists and their values.

Run SALMON

Before running SALMON, the following preparations are required as described above: The executable file of salmon.cpu (and salmon.mic if your system is the many-core machine) should be built from the source file of SALMON. An input file inputfile.inp and pseudopotential files should also be prepared.

The execution of the calculation can be done as follows: In single process environment, type the following command:

$ salmon.cpu < inputfile.inp > fileout.out

In multiprocess environment in which the command to execute parallel calculations using MPI is mpiexec', type the following command:

$ mpiexec -n NPROC salmon.cpu < inputfile.inp > fileout.out

where NPROC is the number of MPI processes that you will use. In many-core processor (e.g. intel-knl) environment, the execution command is

$ mpiexec.hydra -n NPROC salmon.mic < inputfile.inp > fileout.out

The execution command and the job submission procedure depends much on local environment. We summarize general conditions to execute SALMON:

  • salmon runs in both single-process and multi-process environments using MPI.
  • executable files are prepared as /salmon/bin/salmon.cpu and/or /salmon/bin/salmon.mic in the standard build procedure.
  • to start calculations, inputfile.inp should be read through stdin.

Appendix

Additional options in configure.py script

Manual specifications of compiler and environment variables

In executing configure.py, you may manually specify compiler and environment variables instead of specifying the architecture, for example:

$ python ../configure.py FC=mpiifort CC=mpiicc FFLAGS="-xAVX" CFLAGS="-restrict -xAVX"

The major options of configure.py are as follows:

Commandline switch Detail
-a ARCH, --arch=ARCH Target architecture
--enable-mpi, --disable-mpi enable/disable MPI parallelization.
---enable-scalapack, --disable-scalapack enable/disable computations with ScaLAPACK library
FC, FFLAGS User-defined Fortran Compiler, and the compiler options
CC, CFLAGS User-defined C Compiler, and the compiler options


Build for single process calculations

If you use a single processor machine, specify --disable-mpi in executing the python script:

 $ python ../configure.py --arch=<ARCHITECTURE> --disable-mpi

Build in GCC/GFortran environemnt

If you use GCC/GFortran compiler, specify the following flags in executing the python script:

$ python ../configure.py FC=gfortran CC=gcc FFLAG=-O3 CFLAG=-O3

Build using GNU Makefile

If CMake build fails in your environment, we recommend you to try to use Gnu Make for the build process. First, enter the directory makefiles:

$ cd SALMON/makefiles

In the directory, Makefile files are prepared for several architectures:

  • fujitsu
  • gnu
  • gnu-without-mpi
  • intel
  • intel-avx
  • intel-avx2
  • intel-knc
  • intel-knl
  • intel-without-mpi

Makefile files with -without-mpi indicate that they are for single processor environment. Choose Makefile appropriate for your environment, and execute the make command:

$ make -f Makefile.PLATFORM

If the make proceeds successful, a binary file is created in the directory SALMON/bin/.