README FOR CODE_ASTER INSTALLATION

If you want to install a qualified for EDF studies, you should download Salome-Meca.

Summary

For further informations visit http://www.code-aster.org. Please report installation problems using Installation forum at http://www.code-aster.org.

Read carefully this README or at least help message given by

python setup.py --help

Prerequisites change

Starting with Code_Aster 12.0, the minimal version of Python is 2.7. You must install the python-devel package from your distribution or compile it from sources. Python header files are required.

License and packaging

Code_Aster is distributed under the terms of the GNU General Public License. The text is available at : http://code-aster.org/spip.php?article306

IMPORTANT NOTICE:
Code_Aster is a free software but not aster-full package ! The aster-full archive does not contain only open-source softwares : gibi and homard are not open-source but they can be freely distributed with Code_Aster.

Why this kind of package (the big archive aster-full) ? Why "apt-get install codeaster" does not work (yet) ? Some answers at http://www.code-aster.org/forum2/viewtopic.php?id=13292

For really impatient

If you have a recent Linux distribution you may try direclty (just modify ASTER_ROOT in setup.cfg if you don't have write access to /opt/aster or use --prefix option)

python setup.py install --prefix=/opt/aster

Jump to FULL INSTALLATION step for more details.

Distribution

The package "aster-xxx.tar" contains :

  • setup.py (and others .py) : setup scripts

  • setup.cfg : configuration file to adjust according to your configuration.

  • SRC/ : archives of Code_Aster and its prerequisites :

    • Code_Aster 13.1.0,
    • astk 1.13.7 (Code_Aster study manager),
    • eficas 2015.2 (Code_Aster commands file editor),
    • mumps 5.0.1 (direct solver library),
    • med 3.0.8 (Data Exchange Model),
    • hdf5 1.8.10 (platform independent file format),
    • metis 4.0 (official release),
    • scotch 5.1.11_esmumps (partitioning tool),
    • grace 5.1.21 (plotting of 2D graph),
    • homard 11.4 (refine/unrefine meshes), [binary 32/64 bits]
    • gmsh 2.8.3 (mesh generator, med support). [binary]

Important note :

homard, gmsh and gibi are provided here as precompiled for Linux. When installing these products on another platform type they must be disabled (see INSTALLATION WITH PRODUCTS SELECTION section). Binaries for some other platforms may be available from http://www.code-aster.org, or directly from their editor.

Required products

All you need is a recent Python installation (>=2.7, <3.0) with Python headers (provided in python-dev package or similar) with the numpy module (provided in python-numpy or similar, and its header files) and tcl/tk.

All python modules are now installed into $ASTER_ROOT/public/lib/pythonX.Y/...

Note :
To use eficas Python must have been installed with Qt4 support.
Note :
Python shared libraries are sometimes required ("--enable-shared" option in configure of Python setup).

Preferences

The setup will automatically search for basic components in standard directories (in this order)

/usr/local/bin, /usr/bin, /bin, /usr/X11R6/bin,
/usr/bin/X11 (Tru64 specific),
/usr/openwin/bin (Solaris specific).

(analog paths are used to search for libraries and includes)

You can set BINDIR (or LIBDIR, INCLUDEDIR) to force the script to search also in your own directories. Edit setup.cfg and for example

BINDIR=['/home/aster/public/bin', '/opt/bin']

Note :

Following common tools are automatically searched during the setup : shell interpreter (one choosen between bash, ksh or zsh), terminal (on choosen between xterm -recommended-, gnome-terminal, konsole), text editor (one choosen between gedit, kwrite, xemacs, emacs, xedit or vi).

Note for developpers :

If you want to install a Code_Aster version to make development, following these steps:

  • install this "testing" version and its prerequisites:

    ASTER_ROOT=/opt/aster
    python setup.py install --prefix=$ASTER_ROOT
    
  • clone the source repository and read the Tutorial on Bitbucket (see https://bitbucket.org/code_aster/codeaster-src/wiki/Tutorial):

    mkdir -p $HOME/dev/codeaster && cd $HOME/dev/codeaster
    hg clone https://bitbucket.org/code_aster/codeaster-src src
    
  • configure the build using the prerequisites generated by setup.py:

    cd $HOME/dev/codeaster/src
    ./waf configure --use-config-dir=$ASTER_ROOT/13.1/share/aster \
                    --use-config=aster_full_config --prefix=../install/std
    ./waf install -p
    
  • continue with the Tutorial to add your development version in astk...

Full installation

Using this mode you wish install all products included in the package.

Note :
Read carefully setup.cfg comments to customize your installation.
  1. Complete setup.cfg file to adjust it regarding your configuration. Only ASTER_ROOT is necessary. Read carefully comments describing the optional parameters.

    Note :

    you can also use --prefix=$ASTER_ROOT option of setup.py to change ASTER_ROOT destination directory (equivalent to --aster_root).

  2. Run setup script (with the right Python interpreter)

    python setup.py install [--prefix=...]
    

    The built of Code_Aster takes about 10-15 min and the built of the prerequisites takes about 15-20 min. The real time depends on your configuration.

    Note :

    python setup.py --help prints informations about available options and products selection.

Installation with products selection

You have two possibilities to select which products you will install : giving the list of products to install (see 1.) or specify the products you don't want to install (see 2.).

  1. You can give the name of the products to install (space separated)

    python setup.py install --prefix=... product1 [products2 [...]]
    
  2. You can disable a product installation by adding lines to setup.cfg

    _install_PRODUCT_NAME = False
    

If an error occurs...

Error during installation of a product (for example : the compilation of med failed). There isn't yet way to customize configuration or built of a product through setup.cfg option. So you have to configure, build and install the product by hand (source archive is in SRC directory), and set variables which are normally set by product setup by adding lines into setup.cfg file. It isn't always simple to know what variables must be set... so ask the forum on www.code-aster.org ! When the product is installed add a _install_XXX=False line to setup.cfg (see EXAMPLES section).

Log output

If an error occurs it's better to attach all the traceback if you ask any questions to Code_Aster forum. All output informations are saved into the 'setup.log.*' files. Save all output informations into an archive

tar cvjf install_problem.tar.bz2 setup.log.* setup.dbg.*

Warning: the size limit of attachments is 2 MB.

Test your installation

Following steps suppose installation (python setup.py install...) ended with a correct diagnostic

--- DIAGNOSTIC JOB : OK
  1. Run a simple test case

    /opt/aster/bin/as_run --vers=13.1 --test forma01a
    
  2. Run a list of test cases

    • Change to your ASTER_ROOT directory and enter in ASTER_VERSION directory

      cd /opt/aster/13.1
      
    • Build the list of testcases to run:

      /opt/aster/bin/as_run --list --all --vers=13.1 \
            --filter='"parallel" not in testlist' \
            -o /tmp/list_seq
      

      For a parallel installation, use the filter: --filter='"parallel" in testlist'

    • Run the testlist from astk or create an export file:

      cd /opt/aster/13.1/share/aster
      
      cat << EOF > astout.export
      # parameters
      P actions astout
      P version 13.1
      P debug nodebug
      P mode interactif
      P ncpus 1
      P nbmaxnook 500
      P cpresok RESOK
      P facmtps 3
      P tpsjob 300
      
      # list of the test to run
      F list /tmp/list_seq D 0
      
      # results destination
      R resu_test /tmp/resu_test R 0
      EOF
      
    • Start the complete test suite

      /opt/aster/bin/as_run astout.export
      
    Note :

    By default astout.export takes the list of testcases from /tmp/list_seq (about 3000 testcases). Just edit it to run less testcases.