-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
835 additions
and
146 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Abaqus | ||
|
||
ABAQUS是一种有限元素法软件,用于机械、土木、电子等行业的结构和场分析。 | ||
|
||
!!! info | ||
Abaqus 是商业授权软件,需要申请权限后使用。 | ||
|
||
```bash title="/public/slurmscript_demo/abaqus.slurm" | ||
#!/bin/bash | ||
#SBATCH --nodes=2 #节点数量 | ||
#SBATCH --ntasks-per-node=8 #每个节点使用的核心数量 | ||
#SBATCH --error=%j.err | ||
#SBATCH --output=%j.out | ||
#SBATCH --account=[budget] # Account name | ||
#SBATCH --partition=cpu # Partition name | ||
#SBATCH --qos=[qos] # QOS name | ||
|
||
CURDIR=`pwd` | ||
rm -rf $CURDIR/nodelist.$SLURM_JOB_ID | ||
NODES=`scontrol show hostnames $SLURM_JOB_NODELIST` | ||
for i in $NODES | ||
do | ||
echo "$i:$SLURM_NTASKS_PER_NODE" >> $CURDIR/nodelist.$SLURM_JOB_ID | ||
done | ||
echo $SLURM_NPROCS | ||
|
||
echo "process will start at : " | ||
date | ||
echo "++++++++++++++++++++++++++++++++++++++++" | ||
|
||
##setting environment for abaqus-2019 | ||
export PATH=/public/software/abaqus/abaqus-2019/DassaultSystemes/SIMULIA/Commands/:$PATH | ||
|
||
cd $CURDIR | ||
rm -rf *.lck* | ||
rm -rf $CURDIR/nodefile | ||
np=$SLURM_NPROCS | ||
nu=$SLURM_NNODES | ||
cpuspernode=$SLURM_NTASKS_PER_NODE | ||
echo $cpuspernode | ||
echo $nu | ||
echo $np | ||
|
||
for i in $NODES | ||
do | ||
echo "$i" >> $CURDIR/nodefile | ||
done | ||
|
||
pie="'" | ||
machinelist=$(awk '{if( NR != '$nu' ) printf "['$pie'"$0"'$pie',"'$cpuspernode'"],"} {if(NR=='$nu') printf "['$pie'"$0"'$pie', "'$cpuspernode'"]"}' nodefile) | ||
echo "mp_host_list=[$machinelist]" | ||
echo "mp_rsh_command='ssh -n -l %U %H %C'" > abaqus_v6.env | ||
echo "mp_host_list=[$machinelist]" >> abaqus_v6.env | ||
|
||
export MPI_IB_STRINGS=mlx5_0:1 | ||
export MPIRUN_OPTIONS="-prot" | ||
|
||
|
||
unset SLURM_GTIDS | ||
inputfile=abaqus_suanli.inp | ||
abaqus job=ABAQUS cpus=$SLURM_NPROCS input=$inputfile interactive ask_delete=off > ./log | ||
|
||
|
||
echo "++++++++++++++++++++++++++++++++++++++++" | ||
echo "processs will sleep 30s" | ||
sleep 30 | ||
echo "process end at : " | ||
date | ||
rm -rf $CURDIR/nodelist.$SLURM_JOB_ID | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# amber | ||
|
||
```bash title="/public/slurmscript_demo/amber-intel.slurm" | ||
#!/bin/bash -l | ||
#SBATCH --job-name=mpi_job_test # Job name | ||
#SBATCH --output=testSlurmJob.%j.out # Stdout (%j expands to jobId) | ||
#SBATCH --error=testSlurmJob.%j.err # Stderr (%j expands to jobId) | ||
#SBATCH -N 2 # Maximum number of node | ||
#SBATCH --ntasks-per-node=16 # Maximum number CPUs of each node | ||
#SBATCH --account=[budget] # Account name | ||
#SBATCH --partition=cpu # Partition name | ||
#SBATCH --qos=[qos] # QOS name | ||
|
||
module load intel/oneapi2021.1 | ||
module load amber/20 | ||
|
||
srun hostname >./hostfile | ||
echo $SLURM_NTASKS | ||
echo "Date = $(date)" | ||
echo "Hostname = $(hostname -s)" | ||
echo "Working Directory = $(pwd)" | ||
echo "" | ||
echo "Number of Nodes Allocated = $SLURM_JOB_NUM_NODES" | ||
echo "Number of Tasks Allocated = $SLURM_NTASKS" | ||
echo "Number of Cores/Task Allocated = $SLURM_CPUS_PER_TASK" | ||
echo $SLURM_NPROCS | ||
|
||
mpirun -machinefile hostfile -np $SLURM_NTASKS pmemd.MPI -O -i mdin -o mdout -p prmtop -c inpcrd | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# COMSOL | ||
|
||
!!! info | ||
COMSOL 是商业授权软件,需要申请权限后使用。 | ||
|
||
```bash title="/public/slurmscript_demo/comsol.slurm" | ||
#!/bin/bash | ||
#SBATCH --job-name="COMSOL" | ||
#SBATCH --output=testSlurmJob.%j.out # Stdout (%j expands to jobId) | ||
#SBATCH --error=testSlurmJob.%j.err # Stderr (%j expands to jobId) | ||
#SBATCH -N 2 # Maximum number of node | ||
#SBATCH --ntasks-per-node=1 # Maximum number CPUs of each node | ||
#SBATCH --account=[budget] # Account name | ||
#SBATCH --partition=cpu # Partition name | ||
#SBATCH --qos=[qos] # QOS name | ||
|
||
# Set Comsol ENV | ||
module load comsol/5.6 | ||
module load intel/2020.2 | ||
|
||
srun hostname >./hostfile | ||
echo $SLURM_NTASKS | ||
echo "Date = $(date)" | ||
echo "Hostname = $(hostname -s)" | ||
echo "Working Directory = $(pwd)" | ||
echo "" | ||
echo "Number of Nodes Allocated = $SLURM_JOB_NUM_NODES" | ||
echo "Number of Tasks Allocated = $SLURM_NTASKS" | ||
echo "Number of Cores/Task Allocated = $SLURM_CPUS_PER_TASK" | ||
echo $SLURM_NPROCS | ||
|
||
comsol batch -nnhost 1 -np $SLURM_NTASKS -inputfile test.mph -outputfile outtest.mph -batchlog in.log | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# CP2K | ||
|
||
CP2K 是可用于DFT计算和分子动力学模拟的强大软件包。它支持多种计算方法,包括密度泛函理论(DFT)、半经验方法和经典力场。CP2K 以其高效的并行计算能力和灵活的输入文件格式而闻名,适用于从小分子到大规模材料系统的模拟。用户可以利用 CP2K 进行能量计算、几何优化、分子动力学模拟等多种任务。 | ||
|
||
## 嘉庚智算上的CP2K | ||
|
||
!!! failure | ||
目前由于升级后 OpenMPI 的已知问题,目前集群上的 CP2K 仅 `cp2k/2024.3` 和 `cp2k/2024.3-generic` 版本可用。 | ||
前者由于 Core Dump 等原因未能通过 Regtest(但无数值issue),后者由于17个测试任务的数值不匹配亦未能通过。 | ||
|
||
因此请各位用户在使用时注意自己的结果,我们正在积极解决升级后的集群与 CP2K 的兼容性问题。 | ||
如对可靠性有较高要求,推荐使用 [CP2K 官方 Singularity 容器镜像](https://github.com/cp2k/cp2k-containers#apptainer-singularity)。 | ||
|
||
```bash title="/public/slurmscript_demo/cp2k-2024.3.slurm" | ||
#!/bin/bash | ||
#SBATCH --nodes=1 # 节点数量 | ||
#SBATCH --ntasks-per-node=64 # 每个节点核心数量 | ||
#SBATCH --job-name=hello # 作业名称 | ||
#SBATCH --output=%j.out # 正常日志输出 (%j 参数值为 jobId) | ||
#SBATCH --error=%j.err # 错误日志输出 (%j 参数值为 jobId) | ||
#SBATCH --account=[budget] # Account name | ||
#SBATCH --partition=cpu # Partition name | ||
#SBATCH --qos=[qos] # QOS name | ||
#SBATCH --mem=251G # use full memory of node to avoid OOM | ||
|
||
############################################## | ||
# Software Envrironment # | ||
############################################## | ||
module load cp2k/2024.3 | ||
############################################## | ||
# Run job # | ||
############################################## | ||
mpirun cp2k.psmp cp2k.inp >> output | ||
``` |
Oops, something went wrong.