README FOR CODE_ASTER INSTALLATION

If you want to install a qualified for EDF studies, you should read README_Calibre.

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 10.2, numpy is required (in replacement of Numeric). You must install the python-numpy package from your distribution or compile it from sources. You may need to set PYTHONPATH to make setup able to import numpy.

License and packaging

Code_Aster is distributed under the terms of the GNU General Public License. The text is available at : http://www.code-aster.org/telechargement_doc/GPL.txt

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.

  • Note about compilers

    setup.py tries now to find automatically your compilers. By default it searches GNU compilers. After searching it writes found values. Check them before continue. You can always set them using the setup.cfg configuration file. You can also use PATH and LD_LIBRARY_PATH environment variables to help setup.py to find the compiler you prefer.

  • Note about gcc / gfortran

    If your distribution comes with gfortran instead of g77 you should install g77 (only on 32 bits platforms, not on 64 bits ones). Performance is also about twice better with g77 than gfortran. So we recommend to use g77 on 32 bits platforms.

  • Note about Intel Compilers

    Its recommended to use Intel compilers for aster, mumps and metis and to let GNU compilers for the other products. To do that just edit setup.cfg and uncomment these lines

    PREFER_COMPILER_aster = 'Intel'
    PREFER_COMPILER_mumps = PREFER_COMPILER_aster
    PREFER_COMPILER_metis = PREFER_COMPILER_aster
    PREFER_COMPILER_metis_edf = PREFER_COMPILER_aster
    

    You can "source" the compiler environment script, iccvars.sh, ifortvars.sh and mklvarsXX.sh to set environment variables for Intel Compilers to help setup.py to find your compilers. For example

    source /opt/intel/cc/*/bin/iccvars.sh
    source /opt/intel/fc/*/bin/ifortvars.sh
    source /opt/intel/mkl/*/tools/environment/mklvars32.sh
    python setup.py install --prefix=/opt/aster
    ...
    

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 10.3.0,
    • astk 1.8.4 (Code_Aster study manager),
    • eficas 2.1.1 (Code_Aster commands file editor),
    • mumps 4.9.2 (direct solver library),
    • med 2.3.6 (Data Exchange Model),
    • hdf5 1.6.9 (platform independent file format),
    • metis-edf 4.1 (reordering tool with specific changes for Code_Aster),
    • metis 4.0 (official release),
    • scotch 4.0 (partitioning tool),
    • omniORB 4.1.4 (CORBA implementation for Code_Aster-Salomé link),
    • omniORBpy 3.4 (omniORB python module),
    • pylotage 2.0.5 (minimal plugin to exchange with Salomé),
    • grace 5.1.21 (plotting of 2D graph),
    • homard 9.8 (refine/unrefine meshes), [binary 32/64 bits]
    • gmsh 2.4.2 (mesh generator, med support), [binary]
    • gibi 2000 (mesh generator). [binary]

Important note :

homard, gmsh and gibi are provided here as precompiled for Linux. When installing this product 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.4, <3.0) with Python headers (provided in python-dev package or similar) with the numpy module (provided in python-numpy or similar) 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 Tkinter or Qt4 support. After installation, you will have eficasTk and eficasQt. Note that next releases will only come with Qt interface. So it is recommended to use eficasQt.
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 nedit, gedit, kwrite, xemacs, emacs, xedit or vi).

Note for developpers :

You can install this Code_Aster version to make development and follow weekly updates. Just edit setup.cfg file and add a line as

ASTER_VERSION='NEW10'

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 optionnal 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. Two Code_Aster executables are built : with and without debugging informations.

    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...

Two kinds of errors can occur : installation or built problem.
  1. 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).

  2. If an error occurs during the built of Code_Aster both configuration and installation should have been well done.

    So you have probably to adjust config.txt file (under the version directory) to correct the error and to rerun the built using as_run.

    Rerun the built

      cd /opt/aster/STA10.3
      make
    or
      /opt/aster/bin/as_run --make
    

    (replace /opt/aster by ASTER_ROOT, the main directory you chose)

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

    • Change to your ASTER_ROOT directory and enter in ASTER_VERSION directory

      cd /opt/aster/STA10.3
      
    • Start the small example

      /opt/aster/bin/as_run forma01a.export
      
  2. Run a list of test cases

    • Change to your ASTER_ROOT directory and enter in ASTER_VERSION directory

      cd /opt/aster/STA10.3
      
    • Start the complete test suite

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

    By default astout.export runs about the all 2000 testcases (liste_internet list), but you can select the liste_etude list to run only about 30 tests.