hitoricae.com-code_aster 146 parallel version with PETSc
hitoricae.com-code_aster 146 parallel version with PETSc
2020年10月31日
After installing Linux, we recommend that you start building CodeAster before installing
any other apps.
0.preparation
Preparation is same as the case of CodeAster 14.6.
Some packages are installed as follows.
1.OpenBLAS
To get source code from author’s HP. Then execute following procedure.
$ cd aster-full-src-14.6.0
$ sed -i "s:PREFER_COMPILER\ =\ 'GNU':PREFER_COMPILER\
=\'GNU_without_MATH'\nMATHLIB=\ '/opt/OpenBLAS/lib/libopenblas.a':g" setup.cfg
And
After the build complete, to make host file for parallel calculation.
1/4
$ echo "$HOSTNAME cpu=$(cat /proc/cpuinfo | grep processor | wc -l)" >
/opt/aster/etc/codeaster/mpi_hostfile
3.ScaLAPACK
Over.
4.Parmetis
Get source code and unpack it. Integer size is 8 byte in this work.
#define IDXTYPEWIDTH 64″ and “#define REALTYPEWIDTH 32” is written in
~/parmetis-4.0.3/metis/include/metis.h. or add followings to metis.h
#ifdef INTSIZE32
#define IDXTYPEWIDTH 32
#else
#define IDXTYPEWIDTH 64
#endif
then
Next, checking.
$ cd Graphs
$ mpirun -np 8 ptest rotor.graph rotor.graph.xyz
$ make install
$ cd /opt/scotch-6.0.4/src
Makefile.inc is here
$ make check
$ make ptcheck
2/4
This part is finised.
6.MUMPS
Pick mumps-5.1.2-aster6.tar.gz from the package of code_aster out and unpack it. The
name of folder is changed to mumps-5.1.2_mob.
$ cd /opt/mumps-5.1.2_mob
Makefile.inc is.here.
$ make all
7.Petsc
petsc-3.9.4.tar.gz is downloaded from author’s HP. Then unpack it in /opt. First , a few
line (line 43 to 48) is commented out metis.py in /opt/petsc-
3.9.4/config/BuildSystem/config/packages.
def configureLibrary(self):
config.package.Package.configureLibrary(self)
oldFlags = self.compilers.CPPFLAGS
self.compilers.CPPFLAGS += ' '+self.headers.toString(self.include)
# if not self.checkCompile('#include "metis.h"', '#if (IDXTYPEWIDTH != '+
str(self.getDefaultIndexSize())+')\n#error incompatible IDXTYPEWIDTH\n#endif'):
# if self.defaultIndexSize == 64:
# msg= '--with-64-bit-indices option requires a metis build with
IDXTYPEWIDTH=64.\n'
# else:
# msg= 'IDXTYPEWIDTH=64 metis build appears to be specified for a default 32-bit-
indices build of PETSc.\n'
# raise RuntimeError('Metis specified is incompatible!\n'+msg+'Suggest using --
download-metis for a compatible metis')
$ export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/openmpi/lib/:$LD_LIBRARY_PATH
Now the link for HYPRE is not work. Then HYPRE is downloaded
hypre_2.14.0.orig.tar.gz from https://launchpad.net/ubuntu/+source/hypre/2.14.0-
5build1.
In this case, hypre_2.14.0.orig.tar.gz is put under /opt.
3/4
and “make”
$ cd ~/Install_Files
$ cd aster-full-src-14.6.0/SRC
$ tar xfvz aster-14.6.0.tgz
$ cd aster-14.6.0
$ export ASTER_ROOT=/opt/aster
$ export PYTHONPATH=/$ASTER_ROOT/lib/python3.6/site-packages/:$PYTHONPATH
$ ./waf configure --use-config-dir=$ASTER_ROOT/14.6/share/aster --use-
config=Ubuntu_gnu_mpi --prefix=$ASTER_ROOT/PAR14.6MUPT
$ ./waf install -p --jobs=1
# Code_Aster versions
# versions can be absolute paths or relative to ASTER_ROOT
# examples : NEW11, /usr/lib/codeaster/NEW11
# available versions
# DO NOT EDIT FOLLOWING LINE !
#?vers : VVV?
vers : stable:/opt/aster/14.6/share/aster
vers : 14.6MUPT:/opt/aster/PAR14.6MUPT/share/aster
4/4