MAIA bb96820c
Multiphysics at AIA
|
Git is a distributed version control system. Distributed means, that there is not only one single central repository containing and providing all revisions, but also ones cloned/copied by the users and existing on local devices for example. GitLab serves as the main central repository. That is, each developer has to update its repository to get changes from the central one, and has to push the changes from its repository to update the central one. Each repository (cloned or not) consists of different branches. It is possible that branches exist only in one repository.
SSH
E-Mail
m-AIA access
We can check our git settings by using:
Afterwards we may need to change our user name and e-mail address:
This e-mail address will be used as default for our commits. Hence, it should agree with one e-mail specified before in your GitLab account. We may want to set a default core editor such as vim or emacs:
http://ldap2.aia.rwth-aachen.de/mediawiki-1.22.1/index.php5/ZFS:GIT-Transition#Git_in_details https://docs.gitlab.com/ee/tutorials/make_your_first_git_commit.html
There are several ways to access the m-AIA source code. If you intend to be an developer, you are recommended to clone the repository.
Cloning
Following successful cloning, an individual copy of the whole remote repository has been created on your local device.
Python3.x and CMAke
m-AIA requires Python 3 to compile and run the Python scripts. Make sure you have the python3 executables set up correctly in your environment.CMAke is used to control the compilation process, and version restriction is CMAke >= 2.8.
Compilers
The following compilers with version are currently supported and tested:
Packages
Those software packages are required for installation:
The automatic configuration files are provided for some hosts, including:
First the configure.py
script prepares the compilation process for your specific host and desired compiler settings. This assumes that the necessary information for your system is available, which is the case for the afore-mentioned hosts. New hosts are allowed to be added following the instructions here:~/Solver/auxiliary/hosts/README
. You can also find a file named Host.cmake.in whick is a reference for new hosts' <HOST_NAME>.cmake. After getting all configuration files, the configuration can be continued.
To check for all available compilers and build types on your current host, run ./configure.py
. You can then choose one by running, e.g.
or
which will set up the Makefile for compilation with GNU compiler in debug mode. Furthermore, ./configure.py -h
can be used to check for other optional arguments which will be helpful if you have special needs. For instance, ./configure.py 1 1 --without-hdf5
indicates this configuration does not link against HDF5 library and disables HDF5-related code.
Calling the configure.py script with the arguments COMPILER
and BUILDTYPE
will then create a new directory of the format build_COMPILER_BUILDTYPE/
, which contains all the files needed for building MAIA. Compilation is initiated via the Makefile in the MAIA root directory, by calling
and supplying optional arguments like -j NO_NODES
. Since a separate directory is created for each build configuration, multiple instances of MAIA (say GNU/debug and GNU/production) can be maintained at the same time. Calling make with no targets (which defaults to all
) or with a valid target, that is not a directory (like all
, coverage
, depend
, what
etc...), each applicable build directory will be treated with the target supplied via the command line. Individual configurations, e.g. build_gnu_production
, can be targeted via make build_gnu_production/TARGET
(with TARGET
being a valid target for the build configuration, like all
, clean
, coverage
, what
). Additionally, a new target link
is available, which calls for each previously configured build config make
with the target all
and then symlinks the executables of each build config to the maia root directory in the form maia_COMPILER_BUILDTYPE
. If it is called directly on an individual build directory via e.g. make build_gnu_production/link
, it only creates a link to that executable in the MAIA root dir and names it maia
and keeps the original name. This way one can maintain one default or main version of the solver. Even more customization is possible by the new optional argument --build-dir-name BUILDDIRNAME
in the configure.py script. This way, compilation settings like --with-cantera
or --without-hdf5
can be distinguished even if compiler and build type chosen are the same. For cleanup, use make distclean
to restore the pre-configuration state.
Libraries installation
On Hosts outside the AIA, you will have to provide additional external libraries. You can use module spider fftw
to check if this module already exists. Then you can module load fftw
to load the library. If there is not, then you have to install it manually. It is recommended to locate your libraries in the directory $HOME/libraries/ and use folder names without version numbers ( like $HOME/libraries/netcdf/ ). You can also use a link pointing to that directory, if you like, for example, if you have installed different versions of an external library. For example, to install the libraries FFTW, Parallel-Netcdf and Netcdf
After configuring successfully, then to start compiling, run:
where <np> is the number of cores used to compile the code.
when you get executable file maia in folder called src , you can use maia -h
to get a full list of command line options like:
This indicates that the compilation has ended successfully, m-AIA is ready to use.