1. Home
  2. Workload Management
  3. How do I run interactive Ansys Fluent using Slurm?

How do I run interactive Ansys Fluent using Slurm?

This article is being updated. Please be aware the content herein, not limited to version numbers and slight syntax changes, may not match the output from the most recent versions of Bright. This notation will be removed when the content has been updated.

You can use the following script:

[cmsupport@bright60 ~] cat ./fluent-srun.sh
#!/usr/bin/env bash
HOSTSFILE=.hostlist-job$SLURM_JOB_ID
if [ "$SLURM_PROCID" == "0" ]; then
   srun hostname -f > $HOSTSFILE
   fluent -t $SLURM_NTASKS -cnf=$HOSTSFILE -ssh 3d
   rm -f $HOSTSFILE
fi
exit 0


Example: to run an interactive session, use srun like this: 

[cmsupport@bright60 ~] srun -n <tasks> ./fluent-srun.sh

Updated on November 2, 2020

Was this article helpful?

Related Articles

Comments

  1. Hi all !

    Thanks for this helpful article.
    I have one question tho :
    When I use the “srun” command : srun -n ./fluent-srun.sh, I do have a job running on slurm for some seconds. I also have the command line of fluent in my terminal, but after a few seconds, nothing happens (no GUI, the slurm job is cancelled) and I don’t have any error.
    If I use the same fluent command without the srun : ./fluent-srun.sh, the fluent GUI appears. (exactly the same thing happens with star-CCM+).

    I hope you can help me.
    Thank you !

    Regards,
    Léo

  2. Most likely there is an issue with your DISPLAY variable not being passed. In recent versions of Bright you can actually use your web-browser to access the cluster through Jupyter, and then you can schedule a kernel (e.g. BASH kernel) and start a VNC server on the node. Your web-browser will then show you the X11 window manager + any X11 applications you start. See https://www.youtube.com/watch?v=JWiRLx9M2R4&ab_channel=BrightComputing and in particular the part about VNC sessions.

Reply to Martijn De Vries Cancel