-
Notifications
You must be signed in to change notification settings - Fork 7
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
example_submission_scripts #350
base: main
Are you sure you want to change the base?
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,15 @@ | ||
#!/bin/bash | ||
|
||
#PBS -l walltime=1:00:00 | ||
#PBS -l mem=10gb | ||
#PBS -l ncpus=8 | ||
#PBS -l software=vasp | ||
#PBS -l wd | ||
|
||
# Load module, always specify version number. | ||
module load vasp/5.4.4 | ||
|
||
# Must include `#PBS -l storage=scratch/ab12+gdata/yz98` if the job | ||
# needs access to `/scratch/ab12/` and `/g/data/yz98/` | ||
|
||
mpirun vasp_std >vasp.log |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
#PBS -q gpuvolta | ||
#PBS -l walltime=10:00:00 | ||
#PBS -l ncpus=48 | ||
#PBS -l ngpus=4 | ||
#PBS -l mem=160GB | ||
#PBS -l jobfs=1GB | ||
#PBS -l wd | ||
|
||
# Load module, always specify version number. | ||
module load vasp/6.2.1 | ||
|
||
# Must include `#PBS -l storage=scratch/ab12+gdata/yz98` if the job | ||
# needs access to `/scratch/ab12/` and `/g/data/yz98/`. Details on: | ||
# https://opus.nci.org.au/display/Help/PBS+Directives+Explained | ||
|
||
mpirun -np $PBS_NGPUS --map-by ppr:1:numa vasp_std-gpu >vasp.log |
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,17 @@ | ||||||||||||||||||
#!/bin/bash -l | ||||||||||||||||||
##SBATCH --nodes=1 | ||||||||||||||||||
#SBATCH --ntasks=32 | ||||||||||||||||||
#SBATCH --ntasks-per-node=32 | ||||||||||||||||||
#SBATCH --cpus-per-task=1 | ||||||||||||||||||
#SBATCH --account=pawsey0380 | ||||||||||||||||||
#SBATCH --job-name=TSR_RATTLE_struct_1871_2_Mn_8.sh | ||||||||||||||||||
#SBATCH --time=4:00:00 | ||||||||||||||||||
#SBATCH --partition=work | ||||||||||||||||||
#SBATCH --export=NONE | ||||||||||||||||||
#SBATCH --mem=32GB | ||||||||||||||||||
##SBATCH --exclusive | ||||||||||||||||||
module load vasp/5.4.4 | ||||||||||||||||||
cd "$PBS_O_WORKDIR" | ||||||||||||||||||
ulimit -s unlimited | ||||||||||||||||||
run_cmd="srun --export=ALL -N 1 -n 32" | ||||||||||||||||||
$run_cmd vasp_std &> vasp.log | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Enhance error handling and output management While the current command will capture both stdout and stderr in vasp.log, consider implementing more robust error handling and output management. Here are some suggestions:
Here's a suggested modification: -$run_cmd vasp_std &> vasp.log
+log_file="vasp_$(date +%Y%m%d_%H%M%S).log"
+$run_cmd vasp_std > "$log_file" 2>&1
+exit_status=$?
+if [ $exit_status -ne 0 ]; then
+ echo "VASP run failed with exit status $exit_status. Check $log_file for details." >&2
+ exit $exit_status
+fi This change separates stdout and stderr (but still captures both in the log file), checks the exit status of the VASP run, uses a timestamp in the log filename, and provides an informative error message if the run fails. 📝 Committable suggestion
Suggested change
|
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.
Consider using SLURM_SUBMIT_DIR and add error handling
This script appears to be for a SLURM-based system (Setonix), but it's using
PBS_O_WORKDIR
. Consider usingSLURM_SUBMIT_DIR
instead, which is the SLURM equivalent.Add error handling to the
cd
command as suggested by Shellcheck.Here's a suggested modification:
This change ensures that the script exits if it fails to change to the correct directory, preventing potential issues with file access or job execution in the wrong location.
📝 Committable suggestion
🧰 Tools
🪛 Shellcheck