Repository navigation
OpenFOAM Lid driven cavity test case - #243
Conversation
"\" in a string leads to extra space between the characters in the
string.
Correct way of doing it:
```
my_string = "The quick brown dog " \
"jumped over the lazy fox"
```
Test on |
|
@satishskamath the |
|
it works now in hydra: |
|
@laraPPr did it work for you? |
|
Haven't tried yet but i suspect the launcher will pop-up as a problem. Will try to test it tomorrow. |
| def check_launcher_options(self): | ||
| if (self.job.launcher.command(self.job)[0] == 'mpirun'): | ||
| self.launcher_command = self.job.launcher.command(self.job) | ||
| self.launcher_command[-1] = str(self.num_tasks_per_node * self.num_nodes) |
There was a problem hiding this comment.
@satishskamath Can you add some comments here to explain why this is necessary when mpirun is used as launcher, since we don't need to do this at all for other tests?
There was a problem hiding this comment.
@boegel this is to prepare the mpirun -np <number of tasks> command before attaching it to the executables specified in the pre-run commands.
With srun this is not required because the number of tasks per node and number of nodes are already defined in the jobscript, those options are sufficient.
Regarding this not being done in other tests, following is the explanation:
- This is what a correct job script with
mpirunlooks like:
#!/bin/bash
#SBATCH --job-name="rfm_EESSI_OPENFOAM_LID_DRIVEN_CAVITY_827f27ca"
#SBATCH --ntasks=384
#SBATCH --ntasks-per-node=192
#SBATCH --cpus-per-task=1
#SBATCH --output=rfm_job.out
#SBATCH --error=rfm_job.err
#SBATCH --time=1:0:0
#SBATCH -p genoa
#SBATCH --export=None
#SBATCH --mem=328124M
module load 2023
module load OpenFOAM/v2312-foss-2023a
export OMP_NUM_THREADS=1
export I_MPI_PIN_CELL=core
export I_MPI_PIN_DOMAIN=1:compact
export OMPI_MCA_rmaps_base_mapping_policy=slot:PE=1
cd ./cavity3D/8M/fixedTol
source $FOAM_BASH
foamDictionary -entry numberOfSubdomains -set 384 system/decomposeParDict
blockMesh 2>&1 | tee log.blockMesh
mpirun -np 384 redistributePar -decompose -parallel 2>&1 | tee log.decompose
mpirun -np 384 renumberMesh -parallel -overwrite 2>&1 | tee log.renumberMesh
mpirun -np 384 icoFoam -parallel 2>&1 | tee log.icofoam
echo "EESSI_CVMFS_REPO: $EESSI_CVMFS_REPO"
echo "EESSI_SOFTWARE_SUBDIR: $EESSI_SOFTWARE_SUBDIR"
echo "FULL_MODULEPATH: $(module --location show OpenFOAM/v2312-foss-2023a)"
Executables such as redistributePar and renumberMesh need the correct number of MPI tasks and are a part of prerun commands, and if I print the launcher command even after the setup phase, I get this:
['mpirun', '-np', '1']
Here you can see that the number of processors is still 1.
As far as I know, there are no other tests where the prerun commands require the launcher and the correct number of total MPI tasks.
For srun it does not matter, because a correct jobscript looks like this:
#!/bin/bash
#SBATCH --job-name="rfm_EESSI_OPENFOAM_LID_DRIVEN_CAVITY_827f27ca"
#SBATCH --ntasks=384
#SBATCH --ntasks-per-node=192
#SBATCH --cpus-per-task=1
#SBATCH --output=rfm_job.out
#SBATCH --error=rfm_job.err
#SBATCH --time=1:0:0
#SBATCH -p genoa
#SBATCH --export=None
#SBATCH --mem=328124M
module load 2023
module load OpenFOAM/v2312-foss-2023a
export OMP_NUM_THREADS=1
export I_MPI_PIN_CELL=core
export I_MPI_PIN_DOMAIN=1:compact
export OMPI_MCA_rmaps_base_mapping_policy=slot:PE=1
cd ./cavity3D/8M/fixedTol
source $FOAM_BASH
foamDictionary -entry numberOfSubdomains -set 384 system/decomposeParDict
blockMesh 2>&1 | tee log.blockMesh
srun redistributePar -decompose -parallel 2>&1 | tee log.decompose
srun renumberMesh -parallel -overwrite 2>&1 | tee log.renumberMesh
srun icoFoam -parallel 2>&1 | tee log.icofoam
echo "EESSI_CVMFS_REPO: $EESSI_CVMFS_REPO"
echo "EESSI_SOFTWARE_SUBDIR: $EESSI_SOFTWARE_SUBDIR"
echo "FULL_MODULEPATH: $(module --location show OpenFOAM/v2312-foss-2023a)"
I do not have to specify the correct number of MPI tasks inline for the prerun commands.
There was a problem hiding this comment.
OK, thanks for clarifying.
Can you add a comment to briefly clarify why this "hack" is needed?
It's essentially because the launcher command is not fully "configured" yet, and still uses 1 as default value for number of ranks...
Is there any way in which we can prevent having to use this hack?
There's no way to run more a series of commands rather than just a single command, which are all launched correctly via the launcher?
Because that's what we really need here, I'd say...
There was a problem hiding this comment.
I agree, a comment here to state why this is needed will be helpful in the future. I'd make sure it states two things:
- a typical OpenFOAM job would contain multiple mpirun's
- We had trouble using ReFrame fixtures to separate these over multiple jobs, because we couldn't get it to work together with the mixin class.
|
@laraPPr As discussed, for this test to work for us, we need to make sure that the following also happens in the generated job script:
Both of these can be added to When using |
|
@satishskamath Do we really need to ship the whole Can't that be copied from the OpenFOAM installation or something in the test itself? |
@boegel Also, there are two other mesh sizes in that folder which I would like to use for further PRs, that is the reason I need the complete directory tree. |
|
Am now testing with the new hortense config, #266. Has already passed the 2_nodes tests |
|
@laraPPr did rest of the tests pass? |
the ExaFOAM project with licensing information.
[x] DONE: drop down to quarter node, and add a 'skip-if' in case there's <8 cores. [x] DONE: add the comment in the code about the multiple invocations of mpirun
casparvl
left a comment
There was a problem hiding this comment.
Lgtm, tested on Snellius and Vega, Lara seems to have at least tested some scales on Hortense. Going in! Thanks @satishskamath
Todos: