diff --git a/pages/merlin6/05 Software Support/ansys-cfx.md b/pages/merlin6/05 Software Support/ansys-cfx.md index 2f6bd1e..9be2555 100644 --- a/pages/merlin6/05 Software Support/ansys-cfx.md +++ b/pages/merlin6/05 Software Support/ansys-cfx.md @@ -89,8 +89,29 @@ export ANSYSLI_SERVERS=2325@$LICENSE_SERVER export HOSTLIST=$(scontrol show hostname | tr '\n' ',' | sed 's/,$//g') -JOURNAL_FILE=/data/user/caubet_m/CFX/myjournal.in -cfx5solve -batch -def "$JOURNAL_FILE" -par-dist "$HOSTLIST" -part $SLURM_NTASKS -start-method 'IBM MPI Distributed Parallel' +JOURNAL_FILE=myjournal.in + +# INTELMPI=no for IBM MPI +# INTELMPI=yes for INTEL MPI +INTELMPI=no + +if [ "$INTELMPI" == "yes" ] +then + export I_MPI_DEBUG=4 + export I_MPI_PIN_CELL=core + + # Simple example: cfx5solve -batch -def "$JOURNAL_FILE" -par-dist "$HOSTLIST" \ + # -part $SLURM_NTASKS \ + # -start-method 'Intel MPI Distributed Parallel' + cfx5solve -batch -part-large -double -verbose -def "$JOURNAL_FILE" -par-dist "$HOSTLIST" \ + -part $SLURM_NTASKS -par-local -start-method 'Intel MPI Distributed Parallel' +else + # Simple example: cfx5solve -batch -def "$JOURNAL_FILE" -par-dist "$HOSTLIST" \ + # -part $SLURM_NTASKS \ + # -start-method 'IBM MPI Distributed Parallel' + cfx5solve -batch -part-large -double -verbose -def "$JOURNAL_FILE" -par-dist "$HOSTLIST" \ + -part $SLURM_NTASKS -par-local -start-method 'IBM MPI Distributed Parallel' +fi ``` In the above example, one can increase the number of *nodes* and/or *ntasks* if needed and combine it diff --git a/pages/merlin6/05 Software Support/ansys-mapdl.md b/pages/merlin6/05 Software Support/ansys-mapdl.md index f2e4729..3b2211d 100644 --- a/pages/merlin6/05 Software Support/ansys-mapdl.md +++ b/pages/merlin6/05 Software Support/ansys-mapdl.md @@ -128,11 +128,26 @@ export ANSYSLMD_LICENSE_FILE=1055@$LICENSE_SERVER export ANSYSLI_SERVERS=2325@$LICENSE_SERVER # [Optional:END] -# When using -mpi=intelmpi, KMP Affinity must be disabled -export KMP_AFFINITY=disabled +SOLVER_FILE=input.dat -SOLVER_FILE=/data/user/caubet_m/MAPDL/mysolver.in -mapdl -b -dis -np ${SLURM_NTASKS} -i "$SOLVER_FILE" +# INTELMPI=no for IBM MPI +# INTELMPI=yes for INTEL MPI +INTELMPI=no + +if [ "$INTELMPI" == "yes" ] +then + # When using -mpi=intelmpi, KMP Affinity must be disabled + export KMP_AFFINITY=disabled + + # INTELMPI is not aware about distribution of tasks. + # - We need to define tasks distribution. + HOSTLIST=$(srun hostname | sort | uniq -c | awk '{print $2 ":" $1}' | tr '\n' ':' | sed 's/:$/\n/g') + mapdl -b -dis -mpi intelmpi -machines $HOSTLIST -np ${SLURM_NTASKS} -i "$SOLVER_FILE" +else + # IBMMPI (default) will be aware of the distribution of tasks. + # - In principle, no need to force tasks distribution + mapdl -b -dis -mpi ibmmpi -np ${SLURM_NTASKS} -i "$SOLVER_FILE" +fi ``` In the above example, one can increase the number of *nodes* and/or *ntasks* if needed and combine it