-
Notifications
You must be signed in to change notification settings - Fork 9
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
Improving the accounts usage command mention on midway2 and midway3 #214
Conversation
Currently the command |
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.
thank you, @ndtrung81 .
left minor comments, suggestions, etc.
thank you!
@@ -26,23 +26,73 @@ 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 to which your RCC account is accessible. To obtain a summary, execute the command `accounts usage` with the account name(s): | |||
|
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.
"... RCC account is accessible." => "... RCC account has access to."?
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.
Just in case, users can also log into MyRCC profile and see all the service unites of the accounts they are a member of in a user-friendly web interface.
accounts usage | ||
accounts usage --account [pi-cnetid] | ||
accounts usage --accounts [pi-cnetid1],[pi-cnetid2] | ||
``` |
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.
all work as shown.
something related:
- help shows "-account -a ACCOUNT[,...]", i.e., the option "account" with single dash, i.e., "-", and doesn't show any option of "accounts".
- "-a" as shown in help doesn't work.
- the example of "accounts" above will work just fine with "account", and otherwise too.
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.
accounts usage --accounts pi-1, pi-2
for me, only returns the first account (pi-1
), second one doesn't show up.
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.
Here it looks to me on midway2
[ndtrung@midway2-login1 ~]$ accounts usage --accounts pi-depablo,pi-gagalli
Account Usage: Thu Aug 29 15:32:56 2024
Accounts: pi-depablo,pi-gagalli
+------------+-------------+
| Account | Charge (SU) |
+------------+-------------+
| pi-depablo | 2781855.77 |
| pi-gagalli | 1337831.94 |
+------------+-------------+
``` | ||
accounts usage | ||
accounts usage --account [pi-cnetid] --byuser | ||
``` |
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.
works as expected. "-byuser" works too.
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.
... often your PI's CNetID. Execute groups
command to find it, if you are not sure.
docs/101/allocations.md
Outdated
=== "Midway3, Beagle3" | ||
``` | ||
rcchelp usage | ||
rcchelp usage -account [pi-cnetid] -byuser |
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.
last example needs to be:
rcchelp usage -a [pi-cnetid] -byuser
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.
All good.
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.
yes, I fixed that error, thanks @od101
|
||
To view usage per job, utilize the following command: | ||
To view the resource usage per job, you need to run on Midway2 before using either `accounts`: | ||
|
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.
"run on Midway2" => "run on Midway2/DaLI"?
``` | ||
accounts usage --byjob | ||
accounts usage --account [pi-cnetid] --byjob | ||
``` |
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.
works fine.
something related: help shows single dash for "byjob", but it works fine with both single/double. same for "account" option.
docs/101/allocations.md
Outdated
``` | ||
=== "Midway2, DaLI" | ||
``` | ||
rcchelp usage |
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.
byjob
missing.
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.
fixed this
|
||
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. | ||
|
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.
maybe to note that sacct
will work during and after the execution. but, scontrol
will work only during, and not after.
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.
Thank you @ndtrung81 for the updates.
@@ -26,23 +26,73 @@ 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 to which your RCC account is accessible. To obtain a summary, execute the command `accounts usage` with the account name(s): | |||
|
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.
Just in case, users can also log into MyRCC profile and see all the service unites of the accounts they are a member of in a user-friendly web interface.
accounts usage | ||
accounts usage --account [pi-cnetid] | ||
accounts usage --accounts [pi-cnetid1],[pi-cnetid2] | ||
``` |
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.
accounts usage --accounts pi-1, pi-2
for me, only returns the first account (pi-1
), second one doesn't show up.
``` | ||
accounts usage | ||
accounts usage --account [pi-cnetid] --byuser | ||
``` |
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.
... often your PI's CNetID. Execute groups
command to find it, if you are not sure.
docs/101/allocations.md
Outdated
=== "Midway3, Beagle3" | ||
``` | ||
rcchelp usage | ||
rcchelp usage -account [pi-cnetid] -byuser |
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.
All good.
rcchelp usage -account [pi-cnetid] -byjob | ||
``` | ||
|
||
both of which include the jobs on both Midway2 and Midway3 partitions (e.g. `caslake` and `gpu`). |
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.
To a bit make the sentence be more clear and easier to follow:
Note! This command, although it is executed on Midway2 ecosystem, provides the necessary information about both Midway2 and Midway3 ecosystems.
@@ -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 | |||
``` |
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.
This script is a Bash loop that runs 32 instances of a Python script (script.py
) in parallel, each bound to a specific CPU core.
Breakdown:
-
Loop (
for idx in {0..31}
): This loop iterates 32 times, withidx
taking values from 0 to 31. -
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. -
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. -
wait
: This command makes the script wait until all background processes have finished before it exits.
Summary:
The 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.
thanks very much @od101 and @pedramesfahani for the careful reviews. I made the corrections and incorporated your edits. |
The PR improves the description of the accounts usage command and their diffs on midway2 vs midway3.