Код: Выделить всё
File=Commands.txt
head -n $SLURM_ARRAY_TASK_ID $File | tail -n 1 | bash
Код: Выделить всё
BaseDir="Folder1/Folder2/Folder3"
FolderPattern="FolderPattern*"
FilePatterns=("FilePattern1_*.txt" "FilePattern2_*.txt")
Мне нужно убедиться, что загруженные модули HPC и расположение Python указаны правильно. наследуется во всех запущенных заданиях:
Код: Выделить всё
#!/bin/bash
#SBATCH --account=XXXX
#SBATCH --ntasks=1
#SBATCH --job-name=Process
#SBATCH --output=%x-%A-%a.out
#SBATCH --error=%x-%A-%a.err
#SBATCH --partition=XXX
#SBATCH --time=00:30:00
#SBATCH --cpus-per-task=1
#SBATCH --mem-per-cpu=200G
#SBATCH --gpus-per-node=1
#SBATCH --ntasks-per-node=1
#SBATCH --array=1-210
#SBATCH --export=ALL
# Load required modules
module load tensorflow
# Ensure the virtual environment paths are correctly set as environment variables.
export PATH=TF_Virt_Env/bin:$PATH
export PYTHONPATH=TF_Virt_Env/lib/python3.10/site-packages:$PYTHONPATH
# Activate the Python virtual environment
source TF_Virt_Env/bin/activate
Код: Выделить всё
/usr/bin/time -v python3 Script.py --arg1 val1 --arg2 val2 --arg3 val3
Заранее спасибо
Подробнее здесь: https://stackoverflow.com/questions/792 ... -batch-job
Мобильная версия