1. Nicolas Chauvat
  2. libaster-src

Overview

libaster installation manual

In this manual, we assume that the working directory corresponds to the LibAster source folder (cd path/to/libaster/src) and the test-cases are places in path/to/libaster/tests/astest.

Installing non free or legacy dependencies (optional)

In case you want to pass all the test cases, some dependencies are required. Their source can be found in the main aster package [1]. The examples are given with the following installation tools directory as an example: /opt/users/dede/outils For installing the EDF metis version, the steps are:

$ tar xzf metis-edf-4.1-2.noarch.tar.gz
$ cd metis-edf-4.1/
$ FFLAGS='-O2 -fdefault-double-8  -fdefault-integer-8  -fdefault-real-8' \
CFLAGS='-O2' make
$ cp onmetis.exe onmetis kmetis /opt/users/dede/outils

For installing Homard, the steps are:

$ tar xzf homard-9.8-1.all.tar.gz
$ cd homard-9.8
$ echo "PYTHON | python | 2.4 | /usr/bin/python2.6" > config.txt
$ echo "REPOUT | exec   | 04  | /opt/users/dede/outils" >> config.txt
$ echo $PWD/config.txt | python setup_homard.py
$ rm config.txt

XMgrace is a package available on Debian (called grace), however the command must be found in the tools directory:

$ ln -s /usr/bin/xmgrace /opt/users/dede/outils
$ ln -s /usr/bin/gracebat /opt/users/dede/outils

For installing Astk, still used by some macro commands written in Python, the steps are:

$ tar xzf astk-1.8.4.tar.gz
$ cd astk-1.8.4
$ python setup.py install --prefix=/opt/users/dede/outils

For installing Gibi, the steps are:

$ tar xzf gibi-2000-6.i686.tar.gz
$ mv gibi-2000 /opt/users/dede/outils/
$ sed -i 's:?HOME_GIBI?:/opt/users/dede/outils/gibi-2000:' \
/opt/users/dede/outils/gibi-2000/gibi_aster.py
$ sed -i 's:?PYTHON_EXE?:/usr/bin/python:' \
/opt/users/dede/outils/gibi-2000/gibi_aster.py
$ ln -s /opt/users/dede/outils/gibi-2000/gibi_aster.py  \
/opt/users/dede/outils/gibi

Gmsh is a package available on Debian, the command just needs to be found in the tools directory:

$ ln -s /usr/bin/gmsh /opt/users/dede/outils

Building libaster with waf

Building sequential production version on Debian:

$ INCLUDES="/usr/include/mpi" ./waf configure \
--mumps-libs="dmumps_seq zmumps_seq smumps_seq cmumps_seq \
              mumps_common_seq pord_seq mpiseq_seq"
$ ./waf build -j3 -p

Building sequential debugging version on Debian:

$ INCLUDES="/usr/include/mpi" ./waf configure -o dbg-build --debug \
--mumps-libs="dmumps_seq zmumps_seq smumps_seq cmumps_seq \
              mumps_common_seq pord_seq mpiseq_seq"
$ ./waf build -j3 -p

For more build examples, have a look at the appendix.

Running validation tests

As an example for running tests by using 2 threads with the debug version (the working directory will be in RAM):

$ PYTHONPATH=. ASTER_ROOT_DIR=$PWD/build ASTER_ROOT=/opt/users/dede/outils \
./bin/aster-run-tests -p 2 -w /dev/shm/ \
-T /opt/users/dede/outils ../tests/astest/liste_short

Those tests are removed from the internet list:

  • zmat008a, zmat007a: Z-MAT license issue, see [2]
  • zzzz159b, zzzz159f, sdls121a, sdls121b: requires legacy code (ASTK/as_run)

Tests specific to a parallel version:

  • petsc01a, petsc01b, petsc01c (need to be run with mpirun)
  • petsc01d, petsc01e, petsc01f, petsc01g (can be run without mpirun)

Tests which require user action:

  • umat001a, umat002a: the umat libraries must be compiled before performing the tests. To do so:

    $ mkdir umatlibs
    $ cp ../tests/astest/umat001a.22 umatlibs/umat001a.22.f
    $ cp ../tests/astest/umat002a.22 umatlibs/umat002a.22.f
    $ cp ../tests/astest/umat002a.23 umatlibs/umat002a.23.f
    $ cd umatlibs
    $ gfortran -shared -fPIC -o libumat.so umat001a.22.f
    $ gfortran -shared -fPIC -o libumat1.so umat002a.22.f
    $ gfortran -shared -fPIC -o libumat2.so umat002a.23.f
    $ cd ..
    

    Then run the tests with:

    $ LD_LIBRARY_PATH=$PWD/umatlibs:$LD_LIBRARY_PATH bin/aster-run-study \
    -T /opt/users/dede/outils/ -M ../tests/astest/umat001a.mail \
    -I "../tests/astest/umat001a.44:44 ../tests/astest/umat001a.mgib:19" \
    ../tests/astest/umat001a.comm
    $ LD_LIBRARY_PATH=$PWD/umatlibs:$LD_LIBRARY_PATH bin/aster-run-study
    -T /opt/users/dede/outils/ \
    -I "../tests/astest/umat002a.44:44 ../tests/astest/umat002a.46:46 ../tests/astest/umat002a.93:93 \
    ../tests/astest/umat002a.91:91" ../tests/astest/umat002a.comm
    

Running a single test case

Running the forma01a study from a command file and mesh file:

$ PYTHONPATH=. ASTER_ROOT_DIR=$PWD/build \
./bin/aster-run-study -T /opt/users/dede/outils \
 -M ../tests/astest/forma01a.mmed ../tests/astest/forma01a.comm

Running forma01a study from a Python script:

$ PYTHONPATH=. ASTER_ROOT_DIR=$PWD/build \
python doc/examples/forma01a.py -T /opt/users/dede/outils

Appendix: running tests with ASTK for comparing results

Running test in a dev machine:

$ cp dbg-build/aster /usr/lib/codeaster/STA10.3/asteru_py2.6
$ sed -i back -e 's:\(.*liste_internet.*\):#\1:' \
-e 's:#\(.*liste_short_without_homard.*\):\1:' \
/usr/lib/codeaster/STA10.3/astout.export
$ as_run --run /usr/lib/codeaster/STA10.3/astout.export

Appendix: building libaster with different configurations

Building sequential debugging version on Debian with aster as shared librairies:

$ INCLUDES="/usr/include/mpi" ./waf configure -o dbg-shared-build \
--debug --shared \
--mumps-libs="dmumps_seq zmumps_seq smumps_seq cmumps_seq \
              mumps_common_seq pord_seq mpiseq_seq"
$ ./waf build -j3 -p

Building sequential shared libaster containing debug flags on ArchLinux with python2.7 installed and without med, scotch and mumps:

$ INCLUDES='/usr/include/mpi
/usr/lib/python2.7/site-packages/numpy/core/include' \
PYTHON=/usr/bin/python2 \
python2 waf configure \
--disable-med --disable-scotch --disable-mumps \
--shared -o build --debug
$ python2 waf build -j 3 -p

Building parallel version on Debian with petsc support:

$ INCLUDES="/usr/include/mpi" ./waf configure --parallel \
--maths-libs='scalapack-openmpi blacs-openmpi' --enable-petsc
$ ./waf build -j3 -p

Building sequential production version on Debian with Python2.5:

$ INCLUDES="/usr/include/mpi" PYTHON="python2.5" \
./waf configure -o py2.5-build \
--mumps-libs="dmumps_seq zmumps_seq smumps_seq cmumps_seq \
              mumps_common_seq pord_seq mpiseq_seq"
$ ./waf build -j3 -p

[1] You can get them at the address: http://www.code-aster.org/V2/UPLOAD/DOC/Telechargement/aster-full-src-10.3.0-3.noarch.tar.gz [2] http://www.code-aster.org/V2/doc/default/man_u/u2/u2.10.01.pdf