-
Notifications
You must be signed in to change notification settings - Fork 0
Fixed use_amp bug #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Export the current date and time for job labeling | ||
| export DATE=$(date +%Y%m%d_%H%M%S) | ||
| export LABEL="$1" | ||
| export JOB_NAME=eiann_gpu_mnist_ray_"$LABEL"_"$DATE" | ||
|
|
||
| # Environment variables to optimize performance | ||
| export OMP_NUM_THREADS=4 | ||
| export MKL_NUM_THREADS=1 | ||
| export NUMEXPR_NUM_THREADS=1 | ||
| export OPENBLAS_NUM_THREADS=1 | ||
| export CUDA_DEVICE_MAX_CONNECTIONS=1 | ||
| export WANDB_START_METHOD=thread | ||
|
|
||
| # Create directories for logs and scratch data | ||
| mkdir -p /scratch/${USER}/logs/eiann | ||
| mkdir -p /scratch/${USER}/data/eiann | ||
|
|
||
| # Submit the job | ||
| sbatch <<EOT | ||
| #!/bin/bash | ||
| #SBATCH -J $JOB_NAME | ||
| #SBATCH -o /scratch/${USER}/logs/eiann/$JOB_NAME.%j.o | ||
| #SBATCH -e /scratch/${USER}/logs/eiann/$JOB_NAME.%j.e | ||
| #SBATCH --requeue | ||
| #SBATCH --ntasks=1 | ||
| #SBATCH --nodes=1 | ||
| #SBATCH --partition=gpu | ||
| #SBATCH --gres=gpu:3 | ||
| #SBATCH --mem=80G | ||
| #SBATCH --cpus-per-task=15 | ||
| #SBATCH --time=02:00:00 | ||
| #SBATCH --mail-user=yc1376@scarletmail.rutgers.edu | ||
| #SBATCH --mail-type=ALL | ||
|
|
||
| module purge | ||
| module use /projects/community/modulefiles | ||
| module load gcc/10.2.0-bz186 | ||
| module load cuda/11.7 | ||
|
|
||
| set -x | ||
|
|
||
| cd \$HOME/EIANN/ | ||
|
|
||
| source ~/miniconda/etc/profile.d/conda.sh | ||
| conda activate eiann5 | ||
| LD_LIBRARY_PATH=\$CONDA_PREFIX/lib:\$LD_LIBRARY_PATH | ||
|
|
||
| # Start Ray (local mode) | ||
| ray start --head --num-gpus=3 --num-cpus=15 | ||
|
|
||
| python EIANN/simulate/run_EIANN_mnist_ray2.py \ | ||
| --network-config-file-name=20231129_EIANN_2_hidden_mnist_van_bp_relu_SGD_config_G_complete_optimized.yaml \ | ||
| --data-dir=/scratch/\${USER}/data/eiann \ | ||
| --num-seeds=5 | ||
|
|
||
| ray stop | ||
| EOT | ||
|
|
||
| # Submit job: | ||
| # cd $HOME/EIANN/EIANN/simulate/jobscripts | ||
| # sbatch run_EIANN_gpu_amarel_mnist_ray.sh van_bp | ||
|
|
||
| # See logs: | ||
| # cd /scratch/$USER/logs/eiann | ||
|
|
||
| # See the progress | ||
| # watch -n 1 squeue -u $USER | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -39,4 +39,6 @@ ray stop | |||||
| # See logs: | ||||||
| # cd /ocean/projects/bio250022p/$USER/logs/EIANN | ||||||
|
|
||||||
| # interact -p GPU-shared --gres=gpu:v100-32:3 --mem=80G --ntasks-per-node=15 -t 01:00:00 -A bio250022p | ||||||
| # interact -p GPU-shared --gres=gpu:v100-32:3 --mem=80G --ntasks-per-node=15 -t 01:00:00 -A bio250022p | ||||||
|
|
||||||
| # Whatever we have here works: eiann_gpu_mnist_ray.37358310.o | ||||||
|
||||||
| # Whatever we have here works: eiann_gpu_mnist_ray.37358310.o | |
| # Log files will be named like: eiann_gpu_mnist_ray.<jobid>.o / eiann_gpu_mnist_ray.<jobid>.e (see %j above) |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,7 +1,7 @@ | ||||||||||
| #!/bin/bash -l | ||||||||||
| #SBATCH -J eiann_gpu_mnist_ray | ||||||||||
| #SBATCH -o /ocean/projects/bio250022p/chennawa/logs/EIANN/eiann_gpu_mnist_ray.%j.o | ||||||||||
| #SBATCH -e /ocean/projects/bio250022p/chennawa/logs/EIANN/eiann_gpu_mnist_ray.%j.e | ||||||||||
| #SBATCH -J eiann_multi_gpu_mnist_ray | ||||||||||
| #SBATCH -o /ocean/projects/bio250022p/chennawa/logs/EIANN/eiann_multi_gpu_mnist_ray.%j.o | ||||||||||
| #SBATCH -e /ocean/projects/bio250022p/chennawa/logs/EIANN/eiann_multi_gpu_mnist_ray.%j.e | ||||||||||
|
Comment on lines
+3
to
+4
|
||||||||||
| #SBATCH -o /ocean/projects/bio250022p/chennawa/logs/EIANN/eiann_multi_gpu_mnist_ray.%j.o | |
| #SBATCH -e /ocean/projects/bio250022p/chennawa/logs/EIANN/eiann_multi_gpu_mnist_ray.%j.e | |
| #SBATCH -o /ocean/projects/bio250022p/$USER/logs/EIANN/eiann_multi_gpu_mnist_ray.%j.o | |
| #SBATCH -e /ocean/projects/bio250022p/$USER/logs/EIANN/eiann_multi_gpu_mnist_ray.%j.e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LD_LIBRARY_PATHis assigned but not exported. Sincepython ...is launched as a subprocess, it will only see the updatedLD_LIBRARY_PATHif it is exported. Useexport LD_LIBRARY_PATH=...(or remove the line if it’s unnecessary).