Cluster usage
Program output is printed directly to the screen, making it easy to observe program running logs and error messages.
Let's start with a simple example:
During the calculation process, we run the hostname command to submit application resources for 1 task and 1 core, then use srun to submit the command:
srun -J hostname -p q_cn -o job.%j.out -n 1 hostname
#!/bin/bash
#SBATCH -J hostname
#SBATCH -p q_cn
#SBATCH -o job.%j.out
#SBATCH -n 1
hostname
After editing the script, you can submit it directly to the computing node to run.
sbatch hostname.sh
salloc -p q_cn -n 1
srun -n 1 -o job.%j.out hostname #Still need s run to submit, no need to specify partition, no need to queue
例子中涉及的参数:
-J hostname #hostname is the name of the submitted job, custom
-p q_cn #The specified partition for job submission is the q_cn queue;
-o job.% j.out #The output of the script execution will be saved in the job.% j.out file, where %j represents the job number;
-n 1 #Run a task (process) on each node
© 2023 by Personal Life Coach. Proudly created with Wix.com ICP备案号:京ICP备18029179号