added ANSYS/Fluent
This commit is contained in:
122
pages/merlin6/05 Software Support/ansys-fluent.md
Normal file
122
pages/merlin6/05 Software Support/ansys-fluent.md
Normal file
@ -0,0 +1,122 @@
|
||||
---
|
||||
title: ANSYS / Fluent
|
||||
#tags:
|
||||
last_updated: 30 June 2020
|
||||
keywords: software, ansys, fluent, slurm
|
||||
summary: "This document describes how to run ANSYS/Fluent in the Merlin6 cluster"
|
||||
sidebar: merlin6_sidebar
|
||||
permalink: /merlin6/ansys-fluent.html
|
||||
---
|
||||
|
||||
This document describes the different ways for running **ANSYS/Fluent**
|
||||
|
||||
## ANSYS/Fluent
|
||||
|
||||
Is always recommended to check which parameters are available in Fluent and adapt the below example according to your needs.
|
||||
For that, run `fluent -help` for getting a list of options. However, as when running Fluent one must specify one of the
|
||||
following flags:
|
||||
* **2d**: This is a 2D solver with single point precision.
|
||||
* **3d**: This is a 3D solver with single point precision.
|
||||
* **2dpp**: This is a 2D solver with double point precision.
|
||||
* **3dpp**: This is a 3D solver with double point precision.
|
||||
|
||||
## Running Fluent jobs
|
||||
|
||||
### PModules
|
||||
|
||||
Is strongly recommended the use of the latest ANSYS software **ANSYS/2020R1-1** available in PModules.
|
||||
|
||||
```bash
|
||||
module use unstable
|
||||
module load ANSYS/2020R1-1
|
||||
```
|
||||
|
||||
### Non-interactive: sbatch
|
||||
|
||||
Using `sbatch` is always recommeneded.
|
||||
|
||||
#### Serial example
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
#SBATCH --job-name=Fluent # Job Name
|
||||
#SBATCH --partition=hourly # Using 'daily' will grant higher priority than 'general'
|
||||
#SBATCH --time=0-01:00:00 # Time needed for running the job. Must match with 'partition' limits.
|
||||
#SBATCH --cpus-per-task=1 # Double if hyperthreading enabled
|
||||
#SBATCH --hint=nomultithread # Disable Hyperthreading
|
||||
#SBATCH --output=%j.out # Define your output file
|
||||
#SBATCH --error=%j.err # Define your error file
|
||||
|
||||
module use unstable
|
||||
module load ANSYS/2020R1-1
|
||||
|
||||
JOURNAL_FILE=/data/user/caubet_m/Fluent/myjournal.in
|
||||
fluent 3ddp -g -i ${JOURNAL_FILE}
|
||||
```
|
||||
|
||||
#### MPI-based exampke
|
||||
|
||||
An example for running Fluent using a Slurm batch script is the following:
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
#SBATCH --job-name=Fluent # Job Name
|
||||
#SBATCH --partition=hourly # Using 'daily' will grant higher priority than 'general'
|
||||
#SBATCH --time=0-01:00:00 # Time needed for running the job. Must match with 'partition' limits.
|
||||
#SBATCH --nodes=1 # Number of nodes
|
||||
#SBATCH --ntasks=44 # Number of tasks
|
||||
#SBATCH --cpus-per-task=1 # Double if hyperthreading enabled
|
||||
#SBATCH --ntasks-per-core=1 # Run one task per core
|
||||
#SBATCH --hint=nomultithread # Disable Hyperthreading
|
||||
#SBATCH --error=%j.err # Define a file for standard error messages
|
||||
##SBATCH --exclusive # Uncomment if you want exclusive usage of the nodes
|
||||
|
||||
module use unstable
|
||||
module load ANSYS/2020R1-1
|
||||
|
||||
JOURNAL_FILE=/data/user/caubet_m/Fluent/myjournal.in
|
||||
fluent 3ddp -g -t ${SLURM_NTASKS} -i ${JOURNAL_FILE}
|
||||
```
|
||||
|
||||
In the above example, one can increase the number of *nodes* and/or *ntasks* if needed.
|
||||
|
||||
## Interactive: salloc
|
||||
|
||||
Running Fluent interactively is strongly not recommended and one should whenever possible use `sbatch`.
|
||||
However, sometimes interactive runs are needed. For jobs requiring only few CPUs (in example, 2 CPUs) **and** for a short period of time, one can use the login nodes.
|
||||
Otherwise, one must use the Slurm batch system using allocations:
|
||||
* For short jobs requiring more CPUs, one can use the Merlin shortest partitions (`hourly`).
|
||||
* For longer jobs, one can use longer partitions, however, interactive access is not always possible (depending on the usage of the cluster).
|
||||
|
||||
Please refer to the documentation **[Running Interactive Jobs](/merlin6/interactive-jobs.html)** for firther information about different ways for running interactive
|
||||
jobs in the Merlin6 cluster.
|
||||
|
||||
### Considerations
|
||||
|
||||
For running Fluent using Slurm computing nodes, one needs to get the list of the reserved nodes. For getting that list, once you have the allocation, one can run
|
||||
the following command:
|
||||
|
||||
```bash
|
||||
scontrol show hostname
|
||||
```
|
||||
|
||||
This list must be included in the settings as the list of hosts where to run Fluent. Alternatively, one can give that list as parameter (`-cnf` option) when running `fluent`,
|
||||
as follows:
|
||||
|
||||
<details>
|
||||
<summary>[Running Fluent with 'salloc' example]</summary>
|
||||
<pre class="terminal code highlight js-syntax-highlight plaintext" lang="plaintext" markdown="false">
|
||||
(base) [caubet_m@merlin-l-001 caubet_m]$ salloc --nodes=2 --ntasks=88 --hint=nomultithread --time=0-01:00:00 --partition=test $SHELL
|
||||
salloc: Pending job allocation 135030174
|
||||
salloc: job 135030174 queued and waiting for resources
|
||||
salloc: job 135030174 has been allocated resources
|
||||
salloc: Granted job allocation 135030174
|
||||
|
||||
(base) [caubet_m@merlin-l-001 caubet_m]$ module use unstable
|
||||
(
|
||||
base) [caubet_m@merlin-l-001 caubet_m]$ module load ANSYS/2020R1-1
|
||||
module load: unstable module has been loaded -- ANSYS/2020R1-1
|
||||
|
||||
(base) [caubet_m@merlin-l-001 caubet_m]$ fluent 3ddp -t$SLURM_NPROCS -cnf=$(scontrol show hostname | tr '\n' ',')
|
||||
</pre>
|
||||
</details>
|
Reference in New Issue
Block a user