-
Notifications
You must be signed in to change notification settings - Fork 0
/
MA_2024_extract_test_out.sh
53 lines (35 loc) · 1.72 KB
/
MA_2024_extract_test_out.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
#SBATCH --job-name=test
#SBATCH --mail-type=ALL
#SBATCH --mail-user=<tianqi.wang@hhi.fraunhofer.de>
#SBATCH --output=%j_%x.out
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=32
#SBATCH --gpus=1
#SBATCH --mem=32G
#####################################################################################
# This included file contains the definition for $LOCAL_JOB_DIR to be used locally on the node.
source "/etc/slurm/local_job_dir.sh"
echo "$PWD/${SLURM_JOB_ID}_stats.out" > $LOCAL_JOB_DIR/stats_file_loc_cfg
echo "Job with MA_2024.sif env. presampling with independt model, running result_check"
#cp -r ${SLURM_SUBMIT_DIR}/sudoku ${LOCAL_JOB_DIR}
# Launch the apptainer image with --nv for nvidia support. Two bind mounts are used:
# - One for the ImageNet dataset and
# - One for the results (e.g. checkpoint data that you may store in $LOCAL_JOB_DIR on the node
# #apptainer run --nv --bind $DATAPOOL1/datasets:/mnt/datasets ./ddsm_image.sif
# apptainer exec --nv --bind ${LOCAL_JOB_DIR} \
# ../base_env_pytorch.sif \
# #/projects/MA_2024.sif \
# python3 ${SLURM_SUBMIT_DIR}/presample_noise.py -n 50000 -c 9 -t 400 --max_time 1 --out_path sudoku/\
# Run Apptainer with NVIDIA GPU support and activate conda environment
apptainer exec --nv --bind ${LOCAL_JOB_DIR} ../base_env_pytorch.sif \
bash -c "
source /opt/conda/bin/activate base # Activate the base conda environment
python3 ${SLURM_SUBMIT_DIR}/plot_from.csv.py"
#python3 ${SLURM_SUBMIT_DIR}/sudoku/extract_test_out.py"
# This command copies all results generated in $LOCAL_JOB_DIR back to the submit folder regarding th$
cp -r ${LOCAL_JOB_DIR}/${SLURM_JOB_ID} ${SLURM_SUBMIT_DIR}
mv ${SLURM_JOB_ID}* out/
rm -r ${LOCAL_JOB_DIR}/sudoku
echo "Job finished"