-
Notifications
You must be signed in to change notification settings - Fork 121
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
feat: support for launching an MAPDL instance in an SLURM HPC cluster #3497
Merged
Conversation
This file contains 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
…tps://github.com/ansys/pymapdl into feat/passing-tight-integration-env-vars-to-MAPDL
…tps://github.com/ansys/pymapdl into feat/passing-tight-integration-env-vars-to-MAPDL
Squashed commit of the following: commit c1d1a3e Author: German <[email protected]> Date: Mon Oct 7 15:33:19 2024 +0200 ci: retrigger CICD commit b7b5c30 Author: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon Oct 7 13:31:55 2024 +0000 ci: auto fixes from pre-commit.com hooks. for more information, see https://pre-commit.ci commit 32a1c02 Author: Revathy Venugopal <[email protected]> Date: Mon Oct 7 15:31:24 2024 +0200 fix: add suggestions Co-authored-by: German <[email protected]> commit 575a219 Merge: f2afe13 be1be2e Author: Revathyvenugopal162 <[email protected]> Date: Mon Oct 7 15:09:01 2024 +0200 Merge branch 'fix/add-build-cheatsheet-as-env-varaible' of https://github.com/ansys/pymapdl into fix/add-build-cheatsheet-as-env-varaible commit f2afe13 Author: Revathyvenugopal162 <[email protected]> Date: Mon Oct 7 15:08:58 2024 +0200 fix: precommit commit be1be2e Author: pyansys-ci-bot <[email protected]> Date: Mon Oct 7 13:07:35 2024 +0000 chore: adding changelog file 3468.fixed.md commit f052a4d Author: Revathyvenugopal162 <[email protected]> Date: Mon Oct 7 15:05:56 2024 +0200 fix: add build cheatsheet as env variable within doc-build
…tps://github.com/ansys/pymapdl into feat/passing-tight-integration-env-vars-to-MAPDL
This reverts commit e45d2e5.
…' of https://github.com/ansys/pymapdl into feat/passing-tight-integration-env-vars-to-MAPDL
Simplifying `launch_mapdl_on_cluster`.
* docs: expanding a bit the `PyMAPDL on HPC clusters` section * docs: adding info about launching MAPDL in HPC. * chore: adding changelog file 3513.documentation.md [dependabot-skip] * fix: vale issues * docs: changing the name to `scheduler_options`. Add warning about adding nproc. * fix: vale issues * docs: apply suggestions from Kathy code review Co-authored-by: Kathy Pippert <[email protected]> * docs: adding CPUs. --------- Co-authored-by: pyansys-ci-bot <[email protected]> Co-authored-by: Kathy Pippert <[email protected]>
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension. |
koubaa
reviewed
Oct 28, 2024
koubaa
approved these changes
Oct 28, 2024
Ignoring See the code: See my log: https://github.com/ansys/pymapdl/actions/runs/11570941634/job/32207760895?pr=3497#step:2:2452 Pinging @ansys/pyansys-core for visibility.
|
This was referenced Nov 18, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CI/CD
Related with CICD, Github Actions, etc
dependencies
DO NOT MERGE
Not ready to be merged yet
documentation
Documentation related (improving, adding, etc)
maintenance
General maintenance of the repo (libraries, cicd, etc)
new feature
Request or proposal for a new feature
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.
Description
In this PR, add support to launch MAPDL instances in an HPC cluster. At the moment only SLURM scheduler is supported.
We only run Ansys in the job, so the cluster does not need to support Python at all.
Because of how PyMAPDL-MAPDL interaction has been designed, you can use PyMAPDL methods to upload/download files from the MAPDL instance. You could also execute OS commands using
mapdl.sys
, but this NOT recommended.Usage
We allow the user to specify the argument
launch_on_hpc
when usinglaunch_mapdl
:Under the hood, we "wrap" (literally) the command used to launch MAPDL on a
sbatch
command:sbatch --wrap='%PYMAPDL_MAPDL_LAUNCH_CMD%'
where
%PYMAPDL_MAPDL_LAUNCH_CMD%
is something like/ansys_inc/v242/ansys/bin/ansys242 -j myjob -np 4 -grpc
.Additionally we provide the option for specify scheduler arguments using the argument
scheduler_args
:In the above case, it is interesting to set the number of CPUs to the real value of allocated CPUs:
The values of each argument are wrapped in single quotes (
'
) to avoid parsing issues.Issue linked
Related to #3467
Checklist
draft
if it is not ready to be reviewed yet.feat: adding new MAPDL command
)