Commit c0fe7d84 authored by Mani Tofigh's avatar Mani Tofigh

1) Added --error and --mem directives to the example script as well as their…

1) Added --error and --mem directives to the example script as well as their explanation. Changed some directive explanations
parent d3c82520
...@@ -18,10 +18,12 @@ Here's an example job script (named `example_job.sh`): ...@@ -18,10 +18,12 @@ Here's an example job script (named `example_job.sh`):
#!/bin/bash #!/bin/bash
#SBATCH --job-name=my_test_job #SBATCH --job-name=my_test_job
#SBATCH --output=result.txt #SBATCH --output=/path/to/output/file/result.out
#SBATCH --error=/path/to/error/file/result.err
#SBATCH --ntasks=1 #SBATCH --ntasks=1
#SBATCH --time=10:00 #SBATCH --mem=8000
#SBATCH --mem-per-cpu=1000 #SBATCH --mem-per-cpu=1000
#SBATCH --time=10:00
module load python/3.8 module load python/3.8
python my_script.py python my_script.py
...@@ -30,10 +32,12 @@ python my_script.py ...@@ -30,10 +32,12 @@ python my_script.py
Explanation: Explanation:
- `#!/bin/bash`: This line indicates that the script should be run in the bash shell. - `#!/bin/bash`: This line indicates that the script should be run in the bash shell.
- `#SBATCH --job-name`: Sets the name of the job. - `#SBATCH --job-name`: Sets the name of the job.
- `#SBATCH --output`: Specifies the writing path of the standard output as well as the name of the output file. - `#SBATCH --output`: Defines the names of the standard output for your job at your desired path.
- `#SBATCH --ntasks`: Number of tasks. In this case, it's a single-task job. - `#SBATCH --error`: Defines error log files for your job at your desired path.
- `#SBATCH --ntasks`: Number of tasks or processes. In this case, it's a single-task job.
- `#SBATCH --mem`: Total memory in megabytes (here, 8000MB or 8GB).
- `#SBATCH --time`: The maximum time for the job (here, 10 minutes). - `#SBATCH --time`: The maximum time for the job (here, 10 minutes).
- `#SBATCH --mem-per-cpu`: Memory per CPU in megabytes. - `#SBATCH --mem-per-cpu`: Memory per CPU in megabytes (here, 1000MB or 1GB).
- `module load python/3.8`: Loads the Python module. - `module load python/3.8`: Loads the Python module.
- `python my_script.py`: The command to run your Python script. - `python my_script.py`: The command to run your Python script.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment