description = "How to submit ANSYS jobs on HCC resources."
+++
ANSYS license is purchased by College of Engineering. Only users from CoE can access ANSYS on HCC resources. To be added to the 'ansys' group, send an email to hcc-support@unl.edu.
The number of ANSYS tasks is restricted by its license.
For research computations, users need to add the line below to their job submission file.
{{<highlightbatch>}}
#SBATCH --licenses=ansys_research
{{</highlight>}}
For teaching purposes, users need to add
{{<highlightbatch>}}
#SBATCH --licenses=ansys_teaching
{{</highlight>}}
### Running ANSYS scripts in batch
{{% panel theme="info" header="ANSYS.submit" %}}
{{<highlightbatch>}}
#!/bin/sh
#SBATCH --ntasks=1
#SBATCH --time=00:30:00
#SBATCH --mem-per-cpu=1024
#SBATCH --job-name=TestJob
#SBATCH --licenses=ansys_research
#SBATCH --error=job.%J.err
#SBATCH --output=job.%J.out
module load ansys/19.2
YOUR_ANSYS_COMMAND
{{</highlight>}}
{{% /panel %}}
Details of SLURM job submission can be found at [SUBMITTING JOBS]({{<relref"submitting_jobs">}}).
#### Running ANSYS interactively
1. To use graphical user interface, users need to first setup X11 forwarding. [HOW TO SETUP X11 FORWARDING]({{<relref"how_to_setup_x11_forwarding">}})
1. Start an interactie job using srun. NOTE: users need to add --licenses=ansys_research or --licenses=ansys_teaching to the srun command. [SUBMITTING AN INTERACTIVE JOB]({{<relref"submitting_an_interactive_job">}})
1. After the interactive job starts, execute "module load ansys/19.2", then run the ANSYS command, e.g. fluent, from command line. The GUI will show up if steps 1-2 are configured correctly.