From 10923b3824b86813cfe32588d969cf08962cc76e Mon Sep 17 00:00:00 2001 From: Trung Nguyen Date: Thu, 22 Aug 2024 08:39:59 -0500 Subject: [PATCH 1/5] Added that the accounts command arguments are different on midway2 and midway3 --- docs/101/allocations.md | 44 +++++++++++++++++++++++++++++++---------- docs/slurm/sbatch.md | 2 +- 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/docs/101/allocations.md b/docs/101/allocations.md index cc1974c7..a3328350 100644 --- a/docs/101/allocations.md +++ b/docs/101/allocations.md @@ -26,23 +26,47 @@ accounts balance ``` ## How do I review the usage of my allocation? -The `accounts` tool provides several options for summarizing allocation usage. To obtain a summary, execute the command: +The `accounts` tool provides several options for summarizing the usage of the allocations that your RCC account is eligible for. To obtain a summary, execute the command `accounts usage` with the account name(s): -``` -accounts usage -``` + +=== "Midway2, DaLI" + ``` + accounts usage + accounts usage --account [pi-cnetid] + accounts usage --accounts [pi-cnetid1],[pi-cnetid2] + ``` + +===+ "Midway3, Beagle3" + ``` + accounts usage + accounts usage -a [pi-cnetid] + ``` + +where `[pi-cnetid]` is the name of the account, often your PI's. To view usage per job, utilize the following command: -``` -accounts usage --byjob -``` +=== "Midway2, DaLI" + ``` + accounts usage --byjob + accounts usage --account [pi-cnetid] --byjob + ``` If you are the PI, you may employ the `--byuser` option to view individual usage by group members: -``` -accounts usage --byuser -``` +=== "Midway2, DaLI" + ``` + accounts usage + accounts usage --account [pi-cnetid] --byuser + ``` + +===+ "Midway3, Beagle3" + ``` + accounts usage + accounts usage -a [pi-cnetid] -byuser + ``` + + --- diff --git a/docs/slurm/sbatch.md b/docs/slurm/sbatch.md index a8068249..909c32a3 100644 --- a/docs/slurm/sbatch.md +++ b/docs/slurm/sbatch.md @@ -862,7 +862,7 @@ module load python for idx in {0..31} do - taskset -c $i python script.py input-$idx.txt > output-$idx.txt & + taskset -c $idx python script.py input-$idx.txt > output-$idx.txt & done wait ``` From 9454e9cdcd71884d485cc0ee525f0e99f8ebcc4c Mon Sep 17 00:00:00 2001 From: Trung Nguyen Date: Thu, 22 Aug 2024 10:44:38 -0500 Subject: [PATCH 2/5] Mentioned that accounts usage on midway2 show jobs on midway3 as well --- docs/101/allocations.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/101/allocations.md b/docs/101/allocations.md index a3328350..3a55547b 100644 --- a/docs/101/allocations.md +++ b/docs/101/allocations.md @@ -44,15 +44,7 @@ The `accounts` tool provides several options for summarizing the usage of the al where `[pi-cnetid]` is the name of the account, often your PI's. -To view usage per job, utilize the following command: - -=== "Midway2, DaLI" - ``` - accounts usage --byjob - accounts usage --account [pi-cnetid] --byjob - ``` - -If you are the PI, you may employ the `--byuser` option to view individual usage by group members: +You may use the `--byuser` option to view individual usage by group members: === "Midway2, DaLI" ``` @@ -66,7 +58,15 @@ If you are the PI, you may employ the `--byuser` option to view individual usage accounts usage -a [pi-cnetid] -byuser ``` +To view the resource usage per job, utilize the following command on Midway2: + +=== "Midway2, DaLI" + ``` + accounts usage --byjob + accounts usage --account [pi-cnetid] --byjob + ``` +which include the jobs on both Midway2 and Midway3 partitions. --- From 66b60f55eadb5401ea62f3665af5c3bc1329a090 Mon Sep 17 00:00:00 2001 From: Trung Nguyen Date: Thu, 22 Aug 2024 11:11:42 -0500 Subject: [PATCH 3/5] Added that rcchelp can give similar output --- docs/101/allocations.md | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/docs/101/allocations.md b/docs/101/allocations.md index 3a55547b..562190e1 100644 --- a/docs/101/allocations.md +++ b/docs/101/allocations.md @@ -26,7 +26,7 @@ accounts balance ``` ## How do I review the usage of my allocation? -The `accounts` tool provides several options for summarizing the usage of the allocations that your RCC account is eligible for. To obtain a summary, execute the command `accounts usage` with the account name(s): +The `accounts` tool provides several options for summarizing the usage of the allocations to which your RCC account is accessible. To obtain a summary, execute the command `accounts usage` with the account name(s): === "Midway2, DaLI" @@ -58,7 +58,23 @@ You may use the `--byuser` option to view individual usage by group members: accounts usage -a [pi-cnetid] -byuser ``` -To view the resource usage per job, utilize the following command on Midway2: +You can also use the `rcchelp` command (a wrapper of system-provided tools including `accounts`), which requires slightly different arguments (note only one character '-') + +=== "Midway2, DaLI" + ``` + rcchelp usage + rcchelp usage -account [pi-cnetid] -byuser + ``` + +=== "Midway3, Beagle3" + ``` + rcchelp usage + rcchelp usage -account [pi-cnetid] -byuser + ``` + +--- + +To view the resource usage per job, you need to run on Midway2 before using either `accounts`: === "Midway2, DaLI" ``` @@ -66,7 +82,17 @@ To view the resource usage per job, utilize the following command on Midway2: accounts usage --account [pi-cnetid] --byjob ``` -which include the jobs on both Midway2 and Midway3 partitions. +or `rcchelp` + +=== "Midway2, DaLI" + ``` + rcchelp usage + rcchelp usage -account [pi-cnetid] -byjob + ``` + +both of which include the jobs on both Midway2 and Midway3 partitions (e.g. `caslake` and `gpu`). + +The output is a table that lists the job IDs, partitions, number of CPU cores and SU consumptions. To further check the resource consumption of a job on Midway3, you need to log in to Midway3 and run `sacct -j` or `scontrol show job` with the job ID. --- From cc29a57a4b095244971bc9e612a3cf67dffd6f25 Mon Sep 17 00:00:00 2001 From: Trung Nguyen Date: Thu, 29 Aug 2024 15:51:20 -0500 Subject: [PATCH 4/5] Incorporated edits and suggestions from Pedram and Dossay --- docs/101/allocations.md | 16 ++++++++++++---- docs/slurm/sbatch.md | 15 ++++++++++++++- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/docs/101/allocations.md b/docs/101/allocations.md index 562190e1..22ca2eca 100644 --- a/docs/101/allocations.md +++ b/docs/101/allocations.md @@ -25,8 +25,11 @@ The `accounts` tool offers a convenient means to check your account balance. Sim accounts balance ``` +You can also log into your [MyRCC](https://my.rcc.uchicago.edu/overview) profile and check the service units of the accounts they are a member of in a user-friendly web interface. + ## How do I review the usage of my allocation? -The `accounts` tool provides several options for summarizing the usage of the allocations to which your RCC account is accessible. To obtain a summary, execute the command `accounts usage` with the account name(s): + +The `accounts` tool provides several options for summarizing the usage of the allocations to which your RCC account has access to. To obtain a summary, execute the command `accounts usage` with the account name(s): === "Midway2, DaLI" @@ -69,7 +72,7 @@ You can also use the `rcchelp` command (a wrapper of system-provided tools inclu === "Midway3, Beagle3" ``` rcchelp usage - rcchelp usage -account [pi-cnetid] -byuser + rcchelp usage -a [pi-cnetid] -byuser ``` --- @@ -86,13 +89,18 @@ or `rcchelp` === "Midway2, DaLI" ``` - rcchelp usage + rcchelp usage -byjob rcchelp usage -account [pi-cnetid] -byjob ``` both of which include the jobs on both Midway2 and Midway3 partitions (e.g. `caslake` and `gpu`). -The output is a table that lists the job IDs, partitions, number of CPU cores and SU consumptions. To further check the resource consumption of a job on Midway3, you need to log in to Midway3 and run `sacct -j` or `scontrol show job` with the job ID. +!!!note + These commands, although executed on Midway2 ecosystem, provide the necessary information about jobs run on both Midway2 and Midway3. + +The output is a table that lists the job IDs, partitions, number of CPU cores and SU consumptions. To further check the resource consumption of a job on Midway3, you need to log in to Midway3 and run `sacct -j` with the job ID. + +If the job is still running, you can use `scontrol show job` with the job ID to check the job information. --- diff --git a/docs/slurm/sbatch.md b/docs/slurm/sbatch.md index 909c32a3..cf0496bf 100644 --- a/docs/slurm/sbatch.md +++ b/docs/slurm/sbatch.md @@ -867,7 +867,20 @@ done wait ``` -The `taskset` command binds each Python process to a CPU core ID. Each process reads in the corresponding input file and writes the output to an output file, both indexed by `idx`. +Breakdown: + +1. `for idx in {0..31} do ... done`: This loop iterates 32 times, with idx taking values from 0 to 31. + +2. `taskset -c $idx`: This command binds the execution of the following command (`python script.py ...`) to a specific CPU core, where `$idx` specifies the core number. + +3. `python script.py input-$idx.txt > output-$idx.txt &`: This runs the Python script with a specific input file (`input-$idx.txt`) and writes the output to a corresponding output file (`output-$idx.txt`). The `&` at the end puts each command in the background, allowing them to run in parallel. + +4. `wait`: This command makes the script wait until all background processes have finished before it exits + +Summary: + +The job script parallelizes the execution of script.py across 32 CPU cores, each processing a different input file and saving the results in corresponding output files. + ### Dependency jobs From 4994ef4bf1d214d34d6318c3adef76aa44324db3 Mon Sep 17 00:00:00 2001 From: Trung Nguyen Date: Tue, 3 Sep 2024 08:38:41 -0500 Subject: [PATCH 5/5] fixed a misplaced word, added DaLI --- docs/101/allocations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/101/allocations.md b/docs/101/allocations.md index 22ca2eca..0c3be297 100644 --- a/docs/101/allocations.md +++ b/docs/101/allocations.md @@ -77,7 +77,7 @@ You can also use the `rcchelp` command (a wrapper of system-provided tools inclu --- -To view the resource usage per job, you need to run on Midway2 before using either `accounts`: +To view the resource usage per job, you need to run on Midway2/DaLI using either `accounts`: === "Midway2, DaLI" ```