Before installing Smilei, you need to install a few dependencies:
A C++11 compiler, optionally implementing openMP version > 4.5 (gcc users: v6.0 or newer recommended)
an MPI library (by default a version supporting
MPI_THREAD_MULTIPLEis required: v4.0 or newer recommended)
an HDF5 library compatible with your versions of C++ and MPI
Python 2.7 or Python 3+ (with header files)
Optional dependencies are:
Python modules: sphinx, h5py, numpy, matplotlib, pint
Install the dependencies¶
There are various ways to install all dependencies, depending on the platform:
make help can give you some information about your environment.
If you have successfully installed these dependencies on other platforms, please contact us and share!
Download and compile¶
Clone the latest Smilei version from Github:
cd /path/of/your/choice/ git clone https://github.com/SmileiPIC/Smilei.git
If you do not have
git, you can dowload a tarball here and extract it in a new folder.
In a terminal, go to that location and compile:
cd Smilei make
If the compilation is successful, you should now have a new
The next step is to write a namelist.
Advanced compilation options¶
Compile with several processors (fast compilation)
make -j 4
Compilation configuration with keyword “config”
make config=debug # With debugging output (slow execution) make config=noopenmp # Without OpenMP support make config=no_mpi_tm # Without a MPI library which supports MPI_THREAD_MULTIPLE make config=scalasca # For the Scalasca profiler make config=advisor # For Intel Advisor make config=vtune # For Intel Vtune make config=inspector # For Intel Inspector make config=detailed_timers # More detailed timers, but somewhat slower execution
It is possible to combine arguments above within quotes, for instance:
make config="debug noopenmp" # With debugging output, without OpenMP
Obtain some information about the compilation
make print-XXX # Prints the value of makefile variable XXX make env # Prints the values of all makefile variables make help # Gets some help on compilation
Each machine may require a specific configuration (environment variables,
modules, etc.). These instructions may be included in a file of your choice,
my_machine_file is a file, located in
scripts/compile_tools/machine, containing the lines of command to be
executed before compilation. If you successfully write such a file for
a common supercomputer, please share it with developpers so that it can
be included in the next release of Smilei.
Environment variables for compilation¶
Several environment variables may be required, depending on your setup.
SMILEICXX: the MPI-C++ compiler. Defaults to
HDF5_ROOT_DIR: the folder for the HDF5 library. Defaults to
BUILD_DIR: the folder where the compilation should occur. Defaults to
PYTHONEXE: the python executable to use in smilei. Defaults to
PICSAR: set to
TRUEto enable the PSATD solver from picsar. Defaults to
LDFLAGS can also be used to pass other
arguments to the compiler and linker.
Options for SIMD vectorization¶
The SIMD vectorization of Smilei
#pragma omp simd.
To be enabled, you must provide appropriate options to your compiler through
the environment variable
For instance, Smilei has been tested on Intel processors (Skylake 8168) with an Intel environment. The following flags provide a good performance:
-xCOMMON-AVX512 -ip -ipo -inline-factor=1000 -D__INTEL_SKYLAKE_8168
The vectorization must also be activated in the namelist.
Create the documentation¶
If you have installed the python module
sphinx, you can create the
documentation (which you are currently reading) with:
This creates a local html website accessible in your
Install the happi module¶
A python module,
happi, is provided to view, extract and post-process
data from all the diagnostics.
There are several ways to load this module in python.
This has to be done only once, unless you move the smilei directory elsewhere. This command creates a small file in the Python user-site directory that tells python where to find the module. To remove it use the command
The module will directly be accessible from python:>>> import happi
Alternative: Execute the
Diagnostics.pyscript from python
Adding a new python module is not always possible. Instead, we provide the script
Diagnostics.pywhich is able to find the
happimodule and import it into python.
You may add the following command in your own python script:>>> execfile("/path/to/Smilei/scripts/Diagnostics.py")
Generation of the tables is handled by an external tools. A full documentation is available on the dedicated page.