Skip to content

Commit

Permalink
test MPI parallelization
Browse files Browse the repository at this point in the history
  • Loading branch information
dangla committed Dec 20, 2023
1 parent 75904ef commit fcbfa11
Show file tree
Hide file tree
Showing 177 changed files with 4,498 additions and 295,731 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@
*.cold
*.hold

# Specific Bil files
*.sto
*.cont
*.conti

# Specific headers
BilConfig.h
BilInfo.h
BilLib.h
BilPath.h
Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ endif()
project(bil LANGUAGES C CXX Fortran)


option(ENABLE_OPENMP "Enable OpenMP parallelization" OFF)
option(ENABLE_OPENMP "Enable OpenMP parallelization" OFF)
option(ENABLE_PTHREADS "Enable Pthreads parallelization" OFF)
option(ENABLE_MPI "Enable MPI parallelization" OFF)


# Add the CMake directory for custon CMake modules
Expand Down
3 changes: 2 additions & 1 deletion EXTRALIBS
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
#GSL = /usr/lib/x86_64-linux-gnu/libgsl.so
#GSLCBLAS = /usr/lib/x86_64-linux-gnu/libgslcblas.so
#F2C = /usr/lib/x86_64-linux-gnu/libf2c.so
PETSC = /usr/lib/x86_64-linux-gnu/libpetsc.so
#SDL2 = /usr/lib/x86_64-linux-gnu/libsdl2.so
#PETSC = /usr/lib/x86_64-linux-gnu/libpetsc.so

2 changes: 1 addition & 1 deletion OPTIONS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This is a comment. Put a # in the first column to comment the line.
ENABLE_OPENMP = OFF
ENABLE_PTHREAD = OFF
ENABLE_MPI = ON
ENABLE_MPI = OFF
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ Some functionalities (like solvers ma38, superlu, petscksp) require the use of t
URL: https://portal.nersc.gov/project/sparse/superlu/.
Note that these three libraries cannot be mixed, only one can be loaded per build target. SuperMU_MT needs either "omp" or "pthread" library. SuperLU_DIST needs "mpi" library.

- **Petsc**: this library is usually available from package managers. Visit the url http://www.petsc.org for more informations.
- **Petsc**: this library is usually available from package managers. Visit the url http://www.petsc.org for more informations.
Note that Petsc needs "mpi" library.



These librairies are not included in this package. You need to explicitly specify their location in the file "EXTRALIBS". You can also choose to disable the use of these libraries and the associated functionalities by deleting or commenting the locations. The file "EXTRALIBS" is also where you can add other libraries for your own development. Just add the location of the library using a macro name for this library, e.g. NEWNAME, and use the macro NEWNAMELIB in your implementation to test if the library is really installed.
Expand Down
80 changes: 80 additions & 0 deletions base/BBMPablo/BBMPablo
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
Geometry # dimension (1, 2, 3) et symétrie (axis, plan) du pb
2 axis

Mesh # maillage considéré (généré avec GMSH)
carre.msh

Material # liste des matériaux (modèles et param. associés)
Model = BBMPablo # nom du modèle
gravity = 0 # gravité
rho_s = 2000 # masse volumique des particules solides
slope_of_swelling_line = 0.011 # indice de gonflement elastique
slope_of_virgin_consolidation_line = 0.065 # pente de la NCL dans le plan (ln p', e)
shear_modulus = 1.e8# module de cisaillement
slope_of_critical_state_line = 1.2 # pente de la CSL dans le plan (p', q)
initial_pre-consolidation_pressure = 0.04e6 # preconsolidation
reference_consolidation_pressure = 0.01e6 # reference consolidation pressure
kappa_s = 0.005
initial_stress_11 = -1000 # contrainte initiale (isotrope)
initial_stress_22 = -1000 # contrainte initiale (isotrope)
initial_stress_33 = -1000 # contrainte initiale (isotrope)
initial_porosity = 0.25 # porosite initiale
rho_l = 1000 # masse volumique du fluide
kl_int = 1e-20 # permeabilite intrinseque au liquide
kg_int = 1e-18 # permeabilite intrinseque au gaz
mu_l = 0.001 # viscosite du liquide
mu_g = 1.81e-5 # viscosite du gaz
suction_cohesion_coefficient = 0.8
vapor_diffusion_coefficient = 2.82e-5
#Curves = wrc # nom du fichier contenant p_c S_l k_rl LC
Curves = wrc2 pc = Range{x1 = 0 , x2 = 30.e6, n = 171} sl = Expressions(1){p0 = 1.e6 ; m = 0.6 ; sl = (1 + (pc/p0)**(1/(1-m)))**(-m)}
Curves = krc2 pc = Range{x1 = 0 , x2 = 30.e6, n = 171} kl = Expressions(1){s0 = 30.e6 ; kl = 10**(- 5*pc/s0)} kg = Expressions(1){kg = 1}
Curves = lc pc = Range{x1 = 0 , x2 = 1.e6, n = 200} lc = Expressions(1){l0 = 0.065 ; k = 0.011 ; beta = 20.e-6 ; r = 0.75 ; lc = (l0 - k)/(l0*((1-r)*exp(-beta*pc) + r) - k)}



Fields # champs constants ou linéaires dans l'espace
2
Value = -1.e3 Gradient = 0 0 0 Point = 0 0 0
Value = 1.e3 Gradient = 0 0 0 Point = 0 0 0

Initialization # initialisation des variables
0

Functions # fonctions temporelles, pour les CL
2
N = 7 F(0) = 1 F(1) = 40 F(2) = 1 F(3) = 80 F(4) = 1 F(5) = 160 F(6) = 1
N = 7 F(0) = 0 F(1.999) = 0 F(2) = 40 F(3.999) = 40 F(4) = 80 F(5.999) = 80 F(6) = 160

Boundary Conditions # conditions aux limites (Dirichlet)
3
Region = 14 Unknown = u_1 Field = 0 Function = 0
Region = 11 Unknown = u_2 Field = 0 Function = 0
Region = 100 Unknown = p_l Field = 1 Function = 2

Loads # conditions aux limites (Neumann)
2
Region = 13 Equation = meca_1 Type = pressure Field = 2 Function = 1
Region = 12 Equation = meca_1 Type = pressure Field = 2 Function = 1

Points # points de l'espace pour le stockage des variables
1
0.5 0.5

Dates # dates pour le stockage des données
7
0 1 2 3 4 5 6

Objective Variations # variables objectives (une par ddl)
u_1 = 1.e-4
u_2 = 1.e-4
p_l = 1000

Iterative Process # param. num. pour le contrôle de la convergence
Iteration = 100
Tolerance = 1e-06
Repetition = 0

Time Steps
Dtini = 1.e-4
Dtmax = 1e-3
24 changes: 24 additions & 0 deletions base/BBMPablo/carre.geo
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// taille caractéristique des éléments
cl1 = 1;

// points
Point(1) = {0, 0, 0, cl1};
Point(2) = {1, 0, 0, cl1};
Point(3) = {1, 1, 0, cl1};
Point(4) = {0, 1, 0, cl1};

// lignes
Line(11) = {1, 2};
Line(12) = {2, 3};
Line(13) = {3, 4};
Line(14) = {4, 1};

// surfaces
Line Loop(99) = {11, 12, 13, 14};
Plane Surface(100) = {99};

// entités physiques
Physical Line(1) = {11, 12, 13, 14};
Physical Surface(1) = {100};

Recombine Surface {100};
15 changes: 15 additions & 0 deletions base/BBMPablo/carre.msh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$NOD
4
1 0 0 0
2 1 0 0
3 1 1 0
4 0 1 0
$ENDNOD
$ELM
5
1 1 1 11 2 1 2
2 1 1 12 2 2 3
3 1 1 13 2 3 4
4 1 1 14 2 4 1
5 3 1 100 4 1 2 3 4
$ENDELM
173 changes: 173 additions & 0 deletions base/BBMPablo/krc2
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
# Models: X-axis(1) Expressions(2) Expressions(3)
# Labels: pc(1) kl(2) kg(3)
0.000000e+00 1.000000e+00 1.000000e+00
1.764706e+05 9.345192e-01 1.000000e+00
3.529412e+05 8.733262e-01 1.000000e+00
5.294118e+05 8.161401e-01 1.000000e+00
7.058824e+05 7.626986e-01 1.000000e+00
8.823529e+05 7.127565e-01 1.000000e+00
1.058824e+06 6.660845e-01 1.000000e+00
1.235294e+06 6.224689e-01 1.000000e+00
1.411765e+06 5.817091e-01 1.000000e+00
1.588235e+06 5.436184e-01 1.000000e+00
1.764706e+06 5.080218e-01 1.000000e+00
1.941176e+06 4.747562e-01 1.000000e+00
2.117647e+06 4.436687e-01 1.000000e+00
2.294118e+06 4.146169e-01 1.000000e+00
2.470588e+06 3.874675e-01 1.000000e+00
2.647059e+06 3.620958e-01 1.000000e+00
2.823529e+06 3.383856e-01 1.000000e+00
3.000000e+06 3.162278e-01 1.000000e+00
3.176471e+06 2.955209e-01 1.000000e+00
3.352941e+06 2.761700e-01 1.000000e+00
3.529412e+06 2.580861e-01 1.000000e+00
3.705882e+06 2.411865e-01 1.000000e+00
3.882353e+06 2.253934e-01 1.000000e+00
4.058824e+06 2.106344e-01 1.000000e+00
4.235294e+06 1.968420e-01 1.000000e+00
4.411765e+06 1.839526e-01 1.000000e+00
4.588235e+06 1.719072e-01 1.000000e+00
4.764706e+06 1.606506e-01 1.000000e+00
4.941176e+06 1.501311e-01 1.000000e+00
5.117647e+06 1.403004e-01 1.000000e+00
5.294118e+06 1.311134e-01 1.000000e+00
5.470588e+06 1.225280e-01 1.000000e+00
5.647059e+06 1.145047e-01 1.000000e+00
5.823529e+06 1.070069e-01 1.000000e+00
6.000000e+06 1.000000e-01 1.000000e+00
6.176471e+06 9.345191e-02 1.000000e+00
6.352941e+06 8.733262e-02 1.000000e+00
6.529412e+06 8.161400e-02 1.000000e+00
6.705882e+06 7.626987e-02 1.000000e+00
6.882353e+06 7.127565e-02 1.000000e+00
7.058824e+06 6.660845e-02 1.000000e+00
7.235294e+06 6.224689e-02 1.000000e+00
7.411765e+06 5.817091e-02 1.000000e+00
7.588235e+06 5.436184e-02 1.000000e+00
7.764706e+06 5.080218e-02 1.000000e+00
7.941176e+06 4.747562e-02 1.000000e+00
8.117647e+06 4.436687e-02 1.000000e+00
8.294118e+06 4.146169e-02 1.000000e+00
8.470588e+06 3.874675e-02 1.000000e+00
8.647059e+06 3.620958e-02 1.000000e+00
8.823529e+06 3.383856e-02 1.000000e+00
9.000000e+06 3.162278e-02 1.000000e+00
9.176471e+06 2.955209e-02 1.000000e+00
9.352941e+06 2.761700e-02 1.000000e+00
9.529412e+06 2.580861e-02 1.000000e+00
9.705882e+06 2.411865e-02 1.000000e+00
9.882353e+06 2.253934e-02 1.000000e+00
1.005882e+07 2.106347e-02 1.000000e+00
1.023529e+07 1.968423e-02 1.000000e+00
1.041176e+07 1.839529e-02 1.000000e+00
1.058824e+07 1.719069e-02 1.000000e+00
1.076471e+07 1.606503e-02 1.000000e+00
1.094118e+07 1.501309e-02 1.000000e+00
1.111765e+07 1.403002e-02 1.000000e+00
1.129412e+07 1.311133e-02 1.000000e+00
1.147059e+07 1.225279e-02 1.000000e+00
1.164706e+07 1.145047e-02 1.000000e+00
1.182353e+07 1.070069e-02 1.000000e+00
1.200000e+07 1.000000e-02 1.000000e+00
1.217647e+07 9.345194e-03 1.000000e+00
1.235294e+07 8.733266e-03 1.000000e+00
1.252941e+07 8.161406e-03 1.000000e+00
1.270588e+07 7.626993e-03 1.000000e+00
1.288235e+07 7.127573e-03 1.000000e+00
1.305882e+07 6.660855e-03 1.000000e+00
1.323529e+07 6.224699e-03 1.000000e+00
1.341176e+07 5.817102e-03 1.000000e+00
1.358824e+07 5.436174e-03 1.000000e+00
1.376471e+07 5.080210e-03 1.000000e+00
1.394118e+07 4.747555e-03 1.000000e+00
1.411765e+07 4.436682e-03 1.000000e+00
1.429412e+07 4.146166e-03 1.000000e+00
1.447059e+07 3.874672e-03 1.000000e+00
1.464706e+07 3.620957e-03 1.000000e+00
1.482353e+07 3.383854e-03 1.000000e+00
1.500000e+07 3.162278e-03 1.000000e+00
1.517647e+07 2.955210e-03 1.000000e+00
1.535294e+07 2.761701e-03 1.000000e+00
1.552941e+07 2.580863e-03 1.000000e+00
1.570588e+07 2.411867e-03 1.000000e+00
1.588235e+07 2.253936e-03 1.000000e+00
1.605882e+07 2.106347e-03 1.000000e+00
1.623529e+07 1.968423e-03 1.000000e+00
1.641176e+07 1.839529e-03 1.000000e+00
1.658824e+07 1.719069e-03 1.000000e+00
1.676471e+07 1.606503e-03 1.000000e+00
1.694118e+07 1.501309e-03 1.000000e+00
1.711765e+07 1.403002e-03 1.000000e+00
1.729412e+07 1.311133e-03 1.000000e+00
1.747059e+07 1.225279e-03 1.000000e+00
1.764706e+07 1.145047e-03 1.000000e+00
1.782353e+07 1.070069e-03 1.000000e+00
1.800000e+07 1.000000e-03 1.000000e+00
1.817647e+07 9.345194e-04 1.000000e+00
1.835294e+07 8.733266e-04 1.000000e+00
1.852941e+07 8.161406e-04 1.000000e+00
1.870588e+07 7.626993e-04 1.000000e+00
1.888235e+07 7.127573e-04 1.000000e+00
1.905882e+07 6.660855e-04 1.000000e+00
1.923529e+07 6.224699e-04 1.000000e+00
1.941176e+07 5.817102e-04 1.000000e+00
1.958824e+07 5.436174e-04 1.000000e+00
1.976471e+07 5.080210e-04 1.000000e+00
1.994118e+07 4.747555e-04 1.000000e+00
2.011765e+07 4.436682e-04 1.000000e+00
2.029412e+07 4.146166e-04 1.000000e+00
2.047059e+07 3.874672e-04 1.000000e+00
2.064706e+07 3.620957e-04 1.000000e+00
2.082353e+07 3.383854e-04 1.000000e+00
2.100000e+07 3.162278e-04 1.000000e+00
2.117647e+07 2.955210e-04 1.000000e+00
2.135294e+07 2.761701e-04 1.000000e+00
2.152941e+07 2.580863e-04 1.000000e+00
2.170588e+07 2.411867e-04 1.000000e+00
2.188235e+07 2.253936e-04 1.000000e+00
2.205882e+07 2.106347e-04 1.000000e+00
2.223529e+07 1.968423e-04 1.000000e+00
2.241176e+07 1.839529e-04 1.000000e+00
2.258824e+07 1.719069e-04 1.000000e+00
2.276471e+07 1.606503e-04 1.000000e+00
2.294118e+07 1.501309e-04 1.000000e+00
2.311765e+07 1.403002e-04 1.000000e+00
2.329412e+07 1.311133e-04 1.000000e+00
2.347059e+07 1.225279e-04 1.000000e+00
2.364706e+07 1.145047e-04 1.000000e+00
2.382353e+07 1.070069e-04 1.000000e+00
2.400000e+07 1.000000e-04 1.000000e+00
2.417647e+07 9.345194e-05 1.000000e+00
2.435294e+07 8.733266e-05 1.000000e+00
2.452941e+07 8.161406e-05 1.000000e+00
2.470588e+07 7.626993e-05 1.000000e+00
2.488235e+07 7.127573e-05 1.000000e+00
2.505882e+07 6.660855e-05 1.000000e+00
2.523529e+07 6.224699e-05 1.000000e+00
2.541176e+07 5.817102e-05 1.000000e+00
2.558824e+07 5.436174e-05 1.000000e+00
2.576471e+07 5.080210e-05 1.000000e+00
2.594118e+07 4.747555e-05 1.000000e+00
2.611765e+07 4.436682e-05 1.000000e+00
2.629412e+07 4.146166e-05 1.000000e+00
2.647059e+07 3.874672e-05 1.000000e+00
2.664706e+07 3.620957e-05 1.000000e+00
2.682353e+07 3.383854e-05 1.000000e+00
2.700000e+07 3.162278e-05 1.000000e+00
2.717647e+07 2.955210e-05 1.000000e+00
2.735294e+07 2.761701e-05 1.000000e+00
2.752941e+07 2.580863e-05 1.000000e+00
2.770588e+07 2.411867e-05 1.000000e+00
2.788235e+07 2.253936e-05 1.000000e+00
2.805882e+07 2.106347e-05 1.000000e+00
2.823529e+07 1.968423e-05 1.000000e+00
2.841176e+07 1.839529e-05 1.000000e+00
2.858824e+07 1.719069e-05 1.000000e+00
2.876471e+07 1.606503e-05 1.000000e+00
2.894118e+07 1.501309e-05 1.000000e+00
2.911765e+07 1.403002e-05 1.000000e+00
2.929412e+07 1.311133e-05 1.000000e+00
2.947059e+07 1.225279e-05 1.000000e+00
2.964706e+07 1.145047e-05 1.000000e+00
2.982353e+07 1.070069e-05 1.000000e+00
3.000000e+07 1.000000e-05 1.000000e+00
Loading

0 comments on commit fcbfa11

Please sign in to comment.