NCI Help

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
#!/bin/bash

#PBS -P a00
#PBS -q normal
#PBS -l ncpus=1
#PBS -l mem=2GB
#PBS -l jobfs=8GB
#PBS -l walltime=00:30:00
#PBS -l wd

# Load module, always specify version number.
module load python3/3.9.2

# Either update your PYTHONPATH variable if some packages are
# installed under your non-HOME directory or activate your virtual
# environment if some packages are installed under the virtual
# environment.

# Set number of OMP threads
export OMP_NUM_THREADS=$PBS_NCPUS

# 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

# Run Python applications
python3 python_serial_script.py > $PBS_JOBID.log

# Deactivate virtual environment, if any.

To run the job you would use the PBS command:

...

Code Block
languagebash
#!/bin/bash

#PBS -P a00
#PBS -q normal
#PBS -l ncpus=48
#PBS -l mem=128GB
#PBS -l jobfs=400GB
#PBS -l walltime=00:30:00
#PBS -l wd

# Load modules, always specify version number.
module load python3/3.9.2
module load openmpi/4.0.2

# Either update your PYTHONPATH variable if some packages are
# installed under your non-HOME directory or activate your virtual
# environment if some packages are installed under the virtual
# environment.

# Set number of OMP threads
export OMP_NUM_THREADS=$PBS_NCPUS

# 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

# Run Python applications
mpirun -np $PBS_NCPUS python3 python_parallel_script.py > $PBS_JOBID.log

# Deactivate virtual environment, if any.

To run the job you would use the PBS command:

...