#!/bin/bash
#SBATCH --job-name=FLUENT-2025R2-distributed-case
#SBATCH --partition=rome
#SBATCH --nodes=2
#SBATCH --licenses=ansys@ansys.it.auth.gr:40
#SBATCH --ntasks-per-node=20
#SBATCH --time=01:00:00

module load ansys/2025R2

#CREATE HOSTFILE
srun hostname > ${SLURM_JOBID}.hostfile

#RUN FLUENT
fluent 3ddp -g -ssh -t $SLURM_NTASKS -mpi=openmpi -cnf=${SLURM_JOBID}.hostfile -pib -i elbow_journal.jou

#AS SOON AS RUN IS COMPLETE, DELETE HOSTFILE
rm -f ${SLURM_JOBID}.hostfile*
