Add Slurm email notification flags to job script examples#1221
Open
Premas wants to merge 2 commits into
Open
Conversation
bdu-birhanu
reviewed
Jun 15, 2026
bdu-birhanu
left a comment
Contributor
There was a problem hiding this comment.
Everything looks good to me. Just a minor typo commented below, then it can be merged.
bdu-birhanu
reviewed
Jun 15, 2026
| ``` | ||
|
|
||
| Copy the below MATLAB script as `parfor_sum_array.m`. At the beginning, the script defines a function `sum_array` and variable `array_size` is passed as an input argument. This function uses multithreading with the `parfor` option to calculate the sum of elements in an array. On Line 10, the number of workers (`num_workers`) is set to the value of the environment variable `SLURM_CPUS_PER_TASK` i.e. 4. The script then creates a parallel pool using lines 13-17, utilizing the specified number of workers. The parallel computation of summing up of array elements is performed using a `parfor` loop in lines 23-27. By using `parfor` with a pool of workers, operations are run in parallel for improved performance. More insights on usage of `parfor` can be found in the official [MATLAB page](https://www.mathworks.com/help/matlab/ref/parfor.html). | ||
| Copy the below MATLAB script as `parfor_sum_array.m`. At the beginning, the script defines a function `sum_array` and variable `array_size` is passed as an input argument. This function uses multithreading with the `parfor` option to calculate the sum of elements in an array. Thhe number of workers (`num_workers`) is set to the value of the environment variable `SLURM_CPUS_PER_TASK` i.e. 4. The script then creates a parallel pool, utilizing the specified number of workers. The parallel computation of summing up of array elements is performed using a `parfor` loop. By using `parfor` with a pool of workers, operations are run in parallel for improved performance. More insights on usage of `parfor` can be found in the official [MATLAB page](https://www.mathworks.com/help/matlab/ref/parfor.html). |
Contributor
There was a problem hiding this comment.
Just a typo: "Thhe" should be "The".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
This PR adds optional Slurm email notification settings to job script examples to help users track job status
Intent
Proposed Changes
Included changes in Slurm tutorial examples.
Removed line-specific references and rewrote content with context-based descriptions
Changes to Section Headers
Changes to Page URLs
Related or Fixed Issues
Fixes #1187
Accessibility Checklist
I have ensured all of the following for new or changed content:
Style Checklist
I have done all of the following:
mkdocs.ymlfor any moved headers or pages.