MAGiC  V5.0
Mailleurs Automatiques de Géometries intégrés à la Cao
Calcul parallèle dans Code ASTER

Référence: Parallel Code_Aster 12.4

Version
OS:Ubuntu 14.04
Code_Aster : ver.12.4
--------------------------------------------------------—

Telecharger des fichiers
Les fichier sont enregistrés dans: ~/Install_Files
Ils sont installé dans : /opt and /opt/aster

Télécharger les fichier suivant:
aster-full-src-12.4.0-1.noarch.tar.gz (Code_Aster)
OpenBLAS-0.2.15.tar.gz (OpenBLAS)
scalapack_installer.tgz (ScaLAPACK)
petsc-3.4.5.tar.gz (PETSc)

Modifier le propriétaire d'installation par: $ sudo chown username /opt/
Installez les bibliothèques pour Code_Aster par:
$ sudo apt-get install gfortran g++ python-dev python-qt4 python-numpy liblapack-dev libblas-dev tcl tk zlib1g-dev bison flex checkinstall openmpi-bin libopenmpi-dev libx11-dev cmake qt4-dev-tools libmotif-dev
--------------------------------------------------------—

Compiler OpenBLAS (Math LIbrary pour Code_Aster)
$ cd ~/Install_Files/
$ tar xfvz OpenBLAS-0.2.15..tar.gz
$ cd OpenBLAS-0.2.15
$ make NO_AFFINITY=1 USE_OPENMP=1
$ make PREFIX=/opt/OpenBLAS install
$ echo /opt/OpenBLAS/lib | sudo tee -a /etc/ld.so.conf.d/openblas.conf
$ sudo ldconfig
--------------------------------------------------------—

Compiler Code_Aster (séquentiel) avec OpenBLAS.
$ cd ~/Install_Files
$ tar xfvz aster-full-src-12.4.0-1.noarch.tar.gz
$ cd aster-full-src-12.4.0/
$ sed -i "s:PREFER_COMPILER\ =\ 'GNU':PREFER_COMPILER\ =\'GNU_without_MATH'\nMATHLIB=\ '/opt/OpenBLAS/lib/libopenblas.a':g" setup.cfg
$ python setup.py install
Faire host-file pour calcul parallèle par:
$ echo "$HOSTNAME cpu=$(cat /proc/cpuinfo | grep processor | wc -l)" > /opt/aster/etc/codeaster/mpi_hostfile
--------------------------------------------------------—

Compiler ScaLAPACK
$ cd ~/Install_Files
$ tar xfvz scalapack_installer.tgz
$ cd scalapack_installer_1.0.2
$ ./setup.py –lapacklib=/opt/OpenBLAS/lib/libopenblas.a –mpicc=mpicc –mpif90=mpif90 –mpiincdir=/usr/lib/openmpi/include –ldflags_c=-fopenmp –ldflags_fc=-fopenmp –prefix=/opt/scalapack
Une message d'erreur "BLACS: error running BLACS test routines xCbtest" apparaîtra après la compilation, mais vous réussissez, s'il existe le fichier dans "/opt/scalapack/lib/libscalapack.a"
--------------------------------------------------------—

Compiler MUMPS
Copier mumps-4.10.0 dans fichiers source de Code_Aster dans '/opt.
Compiler par mpi-compiler
$ cp ~/Install_Files/aster-full-src-12.4.0/SRC/mumps-4.10.0-aster3.tar.gz /opt/
$ cd /opt
$ tar xfvz mumps-4.10.0-aster3.tar.gz
$ mv mumps-4.10.0 mumps-4.10.0_mpi
$ cd mumps-4.10.0_mpi/
Changer 'Makefile.inc.in' pour MUMPS4.10.0 Makefile.inc
$ make all
--------------------------------------------------------—

Compiler PETSc avec HYPRE et ML
$ cp ~/Install_Files/petsc-3.4.5.tar.gz /opt
$ cd /opt
$ tar xfvz petsc-3.4.5.tar.gz
$ cd petsc-3.4.5
$ ./config/configure.py –with-mpi-dir=/usr/lib/openmpi –with-blas-lapack-lib=/opt/OpenBLAS/lib/libopenblas.a –download-hypre=yes –download-ml=yes –with-debugging=0 COPTFLAGS=-O1 CXXOPTFLAGS=-O1 FOPTFLAGS=-O1 –configModules=PETSc.Configure –optionsModule=PETSc.compilerOptions –with-x=0 –with-shared-libraries=0
$ make PETSC_DIR=/opt/petsc-3.4.5 PETSC_ARCH=arch-linux2-c-opt all
$ make PETSC_DIR=/opt/petsc-3.4.5 PETSC_ARCH=arch-linux2-c-opt test
--------------------------------------------------------—

Compiler Code_Aster (parallèle)
Changer un partie de 'mpi_get_procid_cmd' de '/opt/aster/etc/codeaster/asrun' par:
mpi_get_procid_cmd : echo $OMPI_COMM_WORLD_RANK
Changer 32 a 64 pour les processeur 64 bit:
batch_mpi_nbpmax : 32 (ou 64)
interactif_mpi_nbpmax : 32 (ou 64)
Décompresser Code_Aster
$ cd ~/Install_Files
$ cd aster-full-src-12.4.0/SRC
$ tar xfvz aster-12.4.0.tgz
$ cd aster-12.4.0
Mettre les fichiers de configuration pour calcul parallèle: Ubuntu_gnu_mpi.py et Ubuntu_gnu.py dans cette dossier et compiler Code_Aster.
$ export ASTER_ROOT=/opt/aster
$ ./waf configure –use-config-dir=$ASTER_ROOT/12.4/share/aster –use-config=Ubuntu_gnu_mpi –prefix=$ASTER_ROOT/PAR12.4
$ ./waf install -p
Ajouter 'vers : PAR12.4:/opt/aster/PAR12.4/share/aster' en dessous de 'vers : testing' in '/opt/aster/etc/codeaster/aster' et puis 'PAR12.4' est enregistré dans ASTK.