-
-
Notifications
You must be signed in to change notification settings - Fork 4
Installation instructions for Code_Aster
This guide is meant for those who are not yet familiar with Code_Aster. It will give a brief overview of the installation procedure for a working Code_Aster solver.
There are two possible ways to install the Code_Aster solver on your system.
- The easiest and most intuitive way, is to install Salome-Meca. This is a user-friendly Code_Aster implementation, that also provides pre- and post-processing software. It can be used to create the mesh and model, and it also provides the post-processing software ParaVis.
- The second method to install Code_Aster on your system is to download a package containing the Code_Aster source code. This grants the possibility to run the Code_Aster solver from a script, but brings about some additional complexities during installation. This implementation of Code_Aster is supported for coupling with PreCICE.
To install Code_Aster, download the full package on code-aster.org, under DOWNLOAD. It is recommended to install a stable version of Code_Aster. For this guideline, version 14.4 will be installed.
The Code_Aster package includes the tools that are called by Code_Aster. However, some elementary tools are required on your system. Make sure you have the following dependencies:
- bison
- cmake
- flex
- g++
- gcc
- gfortran
- grace
- liblapack-dev
- libblas-dev, libblas-dev or libopenblas-dev
- libboost-numpy-dev
- libboost-python-dev
- make
- python3
- python3-dev
- python3-numpy
- tk
- zlib1g-dev
You can check whether you have a dependency installed by using e.g. synaptic.
Extract the package. Inside it you will find a folder \SRC\ which contains the source code for Code_Aster, and all the tools that it calls.
In the setup.cfg file you can set the root of the Code_Aster directory, the preferred compiler, and some root directories to dependencies. The latter can be useful when the installation of Code_Aster fails. For this guide the setup.cfg is left unchanged.
To initiate the installation of Code_Aster, redirect the terminal to the location of the setup.py file, and run the following command.
python3 setup.py install --prefix=$ASTER_ROOT
For the root it is recommended to use a path different from /opt/aster (e.g. ~/Desktop to install it on the desktop).
The terminal will now output information about the configurations of the installation. It should be made sure that none of the dependencies listed are missing, and that there are no unexpected messages. It can happen that some dependencies (such as nedit, geany or gvim) are not found. This is not a problem, since these are not relevant for the installation. Once it has been confirmed that everything is correct, you can go ahead and tell the terminal to continue the installation.
Code_Aster and the included tools will now be built. This can take a while.
After the installation is done, check that all tools have been installed correctly. If a tool was not installed correctly, one should go through the log file, and try to run the installation again. Alternatively, a tool can be installed manually, and its home directory can be set in setup.cfg. In this case, make sure that the required version of the tool is installed. For Code_Aster 14.4 the versions are listed below:
- hdf5 1.10.3
- med 4.0.0
- gmsh 3.0.6
- scotch 6.0.4
- astk 2019.0
- metis 5.1.0
- tfel 3.2.1
- mumps 5.1.2
- homard 11.12
Once the solver has been installed successfully, add the following line to the bashrc (run gedit ~/.bashrc):
source $ASTER_ROOT/etc/codeaster/profile.sh
This line will make sure that once the user runs the solver with the as_run command, Code_Aster will initiate. DO NOT install the code-aster-run package which may be suggested by some systems. This is an older package of Code_Aster, and should be removed if it has been installed. For $ASTER_ROOT use the same path, that was used as prefix for installing Code_Aster.
Once the as_run command works, we can test the installation by running a test with the following command:
as_run --vers=14.4 --test forma01a
For a correct installation of the Code_Aster solver, the output should be --- DIAGNOSTIC JOB : OK.
If anything fails, please have a look at the Code_Aster documentation, and feel free to post any question here.
More information on precice.org. Subscribe to the preCICE mailing list.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. Please use "precice.org" for the attribution.
We moved these pages to the preCICE website: https://www.precice.org/adapter-code_aster.html
