我使用 concurrent.futures.ProcessPoolExecutor 在 mac os 系统上运行程序。它运行良好,我发现有 8 个进程,因为我的 CPU 有 8 个内核。但是,当我在 slurm 上运行它时,会浪费时间。我的脚本如下。因为我想创建流程,所以设置了 18 个任务。
#!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=18
#SBATCH --cpus-per-task=4
#SBATCH --mem=8g
#SBATCH --tmp=5g
#SBATCH -t 80:00:00
#SBATCH --mail-type=ALL
#SBATCH --mail-user=meng0167@umn.edu
#SBATCH -p amdsmall
#SBATCH -e %j.err
#SBATCH -o %j.out
cd $SLURM SUBMIT DIR
module load python3
module load pyrosetta
python3 test_process.py
请帮助我,我已经被困了1周。