-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Welcome to the ogs5-egs wiki!
To setup OGS-PETSc, please first get PETSc codes (v3.4) from the below link if you haven't installed it yet
http://www.mcs.anl.gov/petsc/download/index.html
and compile it with commands like
export PETSC_DIR=/home/me/foo/petsc-3.4.3
./configure PETSC_ARCH=linux-gnu --download-f2cblaslapack=1 -with-debugging=0 --download-superlu_dist --download-hypre=1 --download-ml=1 --download-parmetis --download-metis --prefix=/usr/lib/petsc
make install
where --prefix= is the target directory, where PETSc is installed.
To compile OGS with PETSc,
mkdir build
cd build
cmake ../sources/ -DOGS_FEM_PETSC=ON -DPETSC_DIR=/usr/lib/petsc -DPETSC_ARCH=linux-gnu -DOGS_ONLY_TH=ON
make
you may add -DPETSC_EXECUTABLE_RUNS=YES
if multi-pass check with PETSc fails. If all compilation works well, you can test an attached example with the
following command
mpirun -np 4 ./ogs t3d &> ogs.log
In case you have already prepared a mesh, the next step is partitioning the mesh for parallelization. To do that, you need to install metis and partmesh. Metis can be downloaded from
http://glaros.dtc.umn.edu/gkhome/metis/metis/download
For partmesh, please get source codes from the below repository
https://github.com/norihiro-w/mesh_partition
and compile it as
mkdir build & cd build
cmake ../sources
make
you will find "partmesh" in build/bin.
Assuming you have foo.msh, a partitioned mesh for 8 CUPs can be created by the following commands
partmesh --ogs2metis foo
mpmetis foo.mesh 8
partmesh --metis2ogs -np 8 -n foo
At the end, foo_partitioned_8.msh will be generated. You need to rename it to foo_partitioned.msh for simulations. For mechanical simulations, you need to add "-q" option to partmesh to prepare a partitioned mesh with quadratic nodes.