Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/isc24' into isc24
Browse files Browse the repository at this point in the history
  • Loading branch information
scanon committed May 12, 2024
2 parents 8a6a9fe + 74fefaa commit dc3c6c9
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 0 deletions.
37 changes: 37 additions & 0 deletions exercises/openfoam/mpirun_intel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash

NTASKS="2"
image="library://marcodelapierre/beta/openfoam:v2012"

# this configuration depends on the host
PATH=/opt/intel/oneapi/mpi/latest/bin:/bin:/usr/bin:/usr/local/bin

export MPICH_ROOT="/opt/intel/oneapi"
export MPICH_RUN="$( which mpirun )"
export MPICH_BASE="${MPICH_RUN%/bin/mpirun*}"

export SINGULARITY_BINDPATH="$MPICH_ROOT"
export SINGULARITYENV_LD_LIBRARY_PATH="$MPICH_BASE/lib/release:$MPICH_BASE/libfabric/lib:\$LD_LIBRARY_PATH"


# pre-processing
singularity exec $image \
blockMesh | tee log.blockMesh

singularity exec $image \
topoSet | tee log.topoSet

singularity exec $image \
decomposePar -fileHandler uncollated | tee log.decomposePar


# run OpenFoam with MPI
mpirun -n $NTASKS \
singularity exec $image \
simpleFoam -fileHandler uncollated -parallel | tee log.simpleFoam


# post-processing
singularity exec $image \
reconstructPar -latestTime -fileHandler uncollated | tee log.reconstructPar

40 changes: 40 additions & 0 deletions exercises/openfoam/mpirun_spack.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash
#

PATH=/opt/spack/opt/spack/spack_path_placeholder/spack_path_placeholder/spack_path_placeholder/spack_path_placeholder/s/linux-amzn2-x86_64/gcc-7.3.1/mpich-3.3.2-q546vjf5teafqxsttapjokurnarsx5iz/bin/:$PATH

NTASKS="2"
image="library://marcodelapierre/beta/openfoam:v2012"

# this configuration depends on the host
export MPICH_ROOT="/opt/spack"
#export MPICH_ROOT="/opt/intel/oneapi"
export MPICH_LIBS="$( which mpirun )"
export MPICH_LIBS="${MPICH_LIBS%/bin/mpirun*}/lib"

export SINGULARITY_BINDPATH="$MPICH_ROOT"
export SINGULARITYENV_LD_LIBRARY_PATH="$MPICH_LIBS:$MPICH_LIBS/libfabric:\$LD_LIBRARY_PATH"



# pre-processing
singularity exec $image \
blockMesh | tee log.blockMesh

singularity exec $image \
topoSet | tee log.topoSet

singularity exec $image \
decomposePar -fileHandler uncollated | tee log.decomposePar


# run OpenFoam with MPI
mpirun -n $NTASKS \
singularity exec $image \
simpleFoam -fileHandler uncollated -parallel | tee log.simpleFoam


# post-processing
singularity exec $image \
reconstructPar -latestTime -fileHandler uncollated | tee log.reconstructPar

0 comments on commit dc3c6c9

Please sign in to comment.