Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Set cores #23

Merged
merged 16 commits into from
Oct 20, 2022
Merged

Set cores #23

merged 16 commits into from
Oct 20, 2022

Conversation

bkmgit
Copy link
Contributor

@bkmgit bkmgit commented Aug 4, 2022

Set number of cores to prevent an error

Ensure do not get the message
```
Error: you need to specify the maximum number of CPU cores to be used at the same time. If you want to use N cores, say --cores N or -cN. For all cores on your system (be sure that this is appropriate) use --cores all. For no parallelization use --cores 1 or -c1.
```
Also fix typo
@ocaisa
Copy link
Member

ocaisa commented Aug 4, 2022

Out of curiosity, what was the error?

@tkphd
Copy link
Member

tkphd commented Aug 4, 2022

Giving the --cores option has been mandatory since v5.11. It throws

Error: you need to specify the maximum number of CPU cores to be used at the same time with --cores.

This PR looks good, although we're introducing the flag (by necessity) without saying anything about it. Pedagogically, it would be good to run without --cores the first time, then at line 88, display the error and share the "fix."

After this first instance, it looks like short flags are given; for consistency, we can convert --cores 1 to -c 1.

Use -c 1 and explain --cores 1
@bkmgit
Copy link
Contributor Author

bkmgit commented Aug 9, 2022

Have used short flags after the first invocation.

Not including --cores 1 does not seem to have much pedagogical value as it is specific to this software package rather than something that is generally used. The time could be used for other activities. Have added an explanation for why --cores 1 is required.

@bkmgit
Copy link
Contributor Author

bkmgit commented Aug 10, 2022

@tkphd Can you take a look at this again. The changes can probably also be made to the original repository.

Copy link
Contributor

@tobyhodges tobyhodges left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I have suggested a few minor changes.

Seeing -c 1 repeated in so many places made me wonder whether this parameter can go into a profile early on in the lesson or something, to save some keystrokes?

_episodes/02-snakefiles.md Show resolved Hide resolved
_episodes/02-snakefiles.md Outdated Show resolved Hide resolved
_episodes/07-resources.md Outdated Show resolved Hide resolved
_episodes/07-resources.md Outdated Show resolved Hide resolved
@tobyhodges
Copy link
Contributor

tobyhodges commented Sep 1, 2022

Also, you should replace -j with -c in the keypoints in the YAML header of 07-resources.md (line 12).

@bkmgit bkmgit mentioned this pull request Oct 6, 2022
@bkmgit
Copy link
Contributor Author

bkmgit commented Oct 6, 2022

@tkphd @tobyhodges Think this is ok now.

Copy link
Member

@HaoZeke HaoZeke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor clarification comment.

_episodes/07-resources.md Outdated Show resolved Hide resolved
_episodes/07-resources.md Outdated Show resolved Hide resolved
Thanks.

Co-authored-by: Rohit Goswami <[email protected]>
@tkphd tkphd merged commit bc15e41 into hpc-carpentry:gh-pages Oct 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants