Foam-Extend » History » Version 3

Raphael Cóbe, 12 Jul 2016 17:27

1 1 Raphael Cóbe
h1. Foam-Extend
2 1 Raphael Cóbe
3 1 Raphael Cóbe
h2. Envio local, exemplos de scripts
4 1 Raphael Cóbe
5 1 Raphael Cóbe
Informações sobre o uso direto do cluster local estão em [[SLURM|aqui]].
6 3 Raphael Cóbe
O modulo a ser carregado é o *foam-extend*, utilizando a diretiva *module*.
7 1 Raphael Cóbe
8 1 Raphael Cóbe
h3. SMP
9 1 Raphael Cóbe
10 1 Raphael Cóbe
<pre>
11 2 Raphael Cóbe
#!/bin/bash
12 1 Raphael Cóbe
#SBATCH -t 5:00
13 1 Raphael Cóbe
14 1 Raphael Cóbe
module load foam-extend
15 1 Raphael Cóbe
16 1 Raphael Cóbe
# unpack input file
17 1 Raphael Cóbe
unzip foam-extend-cavity.zip
18 1 Raphael Cóbe
19 1 Raphael Cóbe
blockMesh 
20 1 Raphael Cóbe
icoFoam
21 1 Raphael Cóbe
22 1 Raphael Cóbe
#pack all results
23 1 Raphael Cóbe
zip cavity.zip *
24 1 Raphael Cóbe
25 1 Raphael Cóbe
</pre>
26 1 Raphael Cóbe
27 1 Raphael Cóbe
h3. MPI
28 1 Raphael Cóbe
29 1 Raphael Cóbe
Note que para a submissão utilizando MPI, utilizamos o comando **mpirun** e não o srun.
30 1 Raphael Cóbe
31 1 Raphael Cóbe
<pre>
32 1 Raphael Cóbe
#!/bin/bash
33 1 Raphael Cóbe
#SBATCH -t 5:00 -n 4
34 1 Raphael Cóbe
35 1 Raphael Cóbe
module load foam-extend
36 1 Raphael Cóbe
37 1 Raphael Cóbe
unzip circCylinder3dHex.zip
38 1 Raphael Cóbe
39 1 Raphael Cóbe
decomposePar
40 1 Raphael Cóbe
mpirun -n 4 moveDynamicMesh -parallel
41 1 Raphael Cóbe
</pre>