Skip to content
Snippets Groups Projects
Commit aba949e0 authored by Guilherme Pantoja Calandrini de Azevedo Junior's avatar Guilherme Pantoja Calandrini de Azevedo Junior
Browse files

Update fem_software.md

Added version of distributed mapdl
parent 1bb2ef32
No related branches found
No related tags found
2 merge requests!754Automated merge from preview to main,!742Update fem_software.md
......@@ -188,13 +188,88 @@ that you can simply change to something like 16 or 24. For now, you should stay
boundaries, because multi-node calculations require additional parameters. The number you choose
should match your used `--cpus-per-task` parameter in your job file.
### Running MAPDL in Interactive Mode
### Running MAPDL
ANSYS Mechanical APDL (sometimes called ANSYS Classic, the older MAPDL scripted environment).
### SMP (1 node only)
#### Interactive mode
```console
marie@login$ srun --partition=haswell --nodes 1 --ntasks-per-node=4 --time=0:20:00 --mem-per-cpu=1700 --pty bash -l
```
```console
marie@node$ module load ANSYS/2021R2
marie@node$ mapdl -smp -np $SLURM_NTASKS
```
#### Batch mode
```bash
#!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=4
#SBATCH --mem=2000
#SBATCH --job-name=ansys_mapdl
#SBATCH --output=output_ansys_mapdl
#SBATCH --time=01:00:00
module load ANSYS/2021R2
# -smp use shared memory parallel version
# -b (batch mode)
# -np specify number of cpu's to use
# -j jobname
mapdl -smp -b -np $SLURM_NTASKS -j solution -i <input-file>
```
```console
marie@login$ sbatch mapdl_job.sh
```
### Distributed (n nodes)
#### Interactive mode
```console
marie@login$ srun --partition=haswell --nodes 4 --ntasks-per-node=4 --time=0:20:00 --mem-per-cpu=1700 --pty bash -l
# generate node list
marie@node$ NODELIST=$(for node in $( scontrol show hostnames $SLURM_JOB_NODELIST | uniq ); do echo -n "${node}:${SLURM_NTASKS_PER_NODE}:"; done | sed 's/:$//')
marie@node$ KMP_AFFINITY=none mapdl -machines $NODELIST
```
#### Batch mode
```bash
#!/bin/bash
#SBATCH --nodes=4
#SBATCH --ntasks-per-node=4
#SBATCH --mem=2000
#SBATCH --job-name=ansys_mapdl
#SBATCH --output=output_ansys_mapdl
#SBATCH --time=01:00:00
module load ANSYS/2021R2
# generate node list
NODELIST=$(for node in $( scontrol show hostnames $SLURM_JOB_NODELIST | uniq ); do echo -n "${node}:${SLURM_NTASKS_PER_NODE}:"; done | sed 's/:$//')
# -b (batch mode)
# -machines xxx specify machines list for distributed Ansys
# -j jobname
setenv KMP_AFFINITY none
mapdl -b -machines $NODELIST -j solution -i <input-file>
```
```console
marie@login$ srun --partition=haswell --ntasks=1 --cpus-per-task=4 --time=1:00:00 --mem-per-cpu=1700 --pty bash
marie@node$ mapdl -smp
marie@login$ sbatch mapdl_job.sh
```
## COMSOL Multiphysics
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment