Ansys Learning Forum Forums Discuss Simulation Fluids Ansys fluent in HPC Error at host: Reply To: Ansys fluent in HPC Error at host:

S.Shrestha-4
Subscriber

#!/bin/bash -l

# use bash as shell

# the -l option is necessary to make the local enviroment equal to the login environment

# slurm commands start with #SBATCH

# all other stuff behind a # on the same line is comment 

 

#SBATCH -D ./                      # directory where the mpiexec command is ran

#SBATCH -J HPC_Sim_01                  # name of the job (can be changed to whichever name you like)

#SBATCH --get-user-env             # to set environment variables

#SBATCH -o output.log              # output file

#SBATCH -e output.log              # error file

#SBATCH --mem-per-cpu=2GB                  # memory per node in megabytes

#SBATCH --time=0-20:00:00          # simulation time in d-hh:mm:ss

#SBATCH --nodes=1                       # number of nodes

#SBATCH --ntasks-per-node=32             # number of MPI processes on the node (^= cores to be used)

#SBATCH --account=--    # replace with your education/research/project account if applicable

 

# get the jobid for later reference

myjobid=$SLURM_JOB_ID

echo "myjobid = " $myjobid

 

# load modules

module load ansys/2021R2

 

if [ "$SLURM_PROCID" == "0" ]; then

# set up  hostfile containing the list of nodes/cores used

        scontrol show hostname $SLURM_JOB_NODELIST >  hostfile.txt

        fluent   2ddp -t$SLURM_NTASKS -rsh  -g  -i microchannel.script -cnf=hostfile.txt -pib.ofed

fi

exit 0