Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
| fenics [2012/05/22 14:04] – [Programme C++] admin | fenics [2018/06/27 14:51] (Version actuelle) – [Version installée] admin | ||
|---|---|---|---|
| Ligne 14: | Ligne 14: | ||
| * Postprocessing (live plotting, advanced postprocessing, | * Postprocessing (live plotting, advanced postprocessing, | ||
| * C++ and Python interface” | * C++ and Python interface” | ||
| + | |||
| + | {{ : | ||
| + | |||
| Full features can be found here: | Full features can be found here: | ||
| ====== Version installée ====== | ====== Version installée ====== | ||
| + | * [[fenics: | ||
| - | **1.0.0**\\ | + | **1.6.0** (séquentielle)\\ |
| <code bash> | <code bash> | ||
| - | module load fenics | + | module load fenics/1.6.0 |
| </ | </ | ||
| Ligne 112: | Ligne 116: | ||
| # Create mesh and define function space | # Create mesh and define function space | ||
| - | mesh = UnitSquare(6, 4) | + | |
| - | V = FunctionSpace(mesh, | + | mesh = UnitIntervalMesh(50) |
| + | V = FunctionSpace(mesh, | ||
| + | |||
| # Define boundary conditions | # Define boundary conditions | ||
| Ligne 153: | Ligne 160: | ||
| python poisson.py | python poisson.py | ||
| </ | </ | ||
| + | |||
| + | <note warning> | ||
| + | |||
| + | </ | ||
| + | |||
| {{ : | {{ : | ||
| Ligne 254: | Ligne 266: | ||
| CFLAGS=`pkg-config --cflags dolfin` | CFLAGS=`pkg-config --cflags dolfin` | ||
| - | LIBS= `pkg-config --libs dolfin` | + | LIBS=`pkg-config --libs dolfin` |
| - | CXX= `pkg-config --variable=compiler dolfin` | + | CXX=`pkg-config --variable=compiler dolfin` |
| DEST= poisson | DEST= poisson | ||
| Ligne 285: | Ligne 297: | ||
| </ | </ | ||
| - | ====== | + | ====== |
| + | Exemple de script SGE pour lancer la version séquentielle de Fenics. | ||
| - | Fenics est compilé avec MPI (OpenMPI). Pour exécuter un programme en parallèle on utilise '' | + | <code bash> |
| - | < | + | # |
| - | module load fenics | + | |
| - | </code> | + | #$ -N test_sge |
| + | #$ -o $JOB_NAME.$JOB_ID.out | ||
| + | #$ -e $JOB_NAME.$JOB_ID.err | ||
| + | |||
| + | module load fenics/1.6.0 | ||
| + | |||
| + | export PATH=$WORK | ||
| + | |||
| + | python poisson.py | ||
| - | < | ||
| - | mpirun -np 4 ./poisson | ||
| </ | </ | ||
| - | 4 fichiers (vtk) seront générés à la fin de l' | ||
| - | ===== Utilisation avec SGE ===== | + | <note tip>Les fichiers de sortie (VTK) peuvent être visualisés avec le logiciel '' |
| + | |||
| + | |||
| + | ===== SGE, version MPI ===== | ||
| <code bash> | <code bash> | ||
| #!/bin/bash -l | #!/bin/bash -l | ||
| - | #$ -q normal15d | + | #$ -q parallel.q |
| #$ -V | #$ -V | ||
| #$ -N fenics_sge | #$ -N fenics_sge | ||
| - | #$ -pe impi_tight | + | #$ -pe mpi 16 |
| #$ -o $JOB_NAME.$JOB_ID.out | #$ -o $JOB_NAME.$JOB_ID.out | ||
| #### on charge le module fenics | #### on charge le module fenics | ||
| - | module load fenics | + | module load fenics/mpi |
| + | |||
| + | export HOME=$WORK | ||
| ## lancement de l' | ## lancement de l' | ||
| Ligne 319: | Ligne 342: | ||
| mpirun -np $NSLOTS ./ | mpirun -np $NSLOTS ./ | ||
| + | ## OR | ||
| + | |||
| + | mpirun -np $NSLOTS python ./ | ||
| </ | </ | ||
| ====== Liens ====== | ====== Liens ====== | ||