feat: support for launching an MAPDL instance in an SLURM HPC cluster#3497
Merged
feat: support for launching an MAPDL instance in an SLURM HPC cluster#3497
Conversation
…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 <28149841+germa89@users.noreply.github.com> 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 <104772255+Revathyvenugopal162@users.noreply.github.com> Date: Mon Oct 7 15:31:24 2024 +0200 fix: add suggestions Co-authored-by: German <28149841+germa89@users.noreply.github.com> commit 575a219 Merge: f2afe13 be1be2e Author: Revathyvenugopal162 <revathy.venugopal@ansys.com> 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 <revathy.venugopal@ansys.com> Date: Mon Oct 7 15:08:58 2024 +0200 fix: precommit commit be1be2e Author: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Mon Oct 7 13:07:35 2024 +0000 chore: adding changelog file 3468.fixed.md commit f052a4d Author: Revathyvenugopal162 <revathy.venugopal@ansys.com> 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 <84872299+PipKat@users.noreply.github.com> * docs: adding CPUs. --------- Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Co-authored-by: Kathy Pippert <84872299+PipKat@users.noreply.github.com>
Contributor
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
Collaborator
Author
|
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
Closed
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.
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_hpcwhen usinglaunch_mapdl:Under the hood, we "wrap" (literally) the command used to launch MAPDL on a
sbatchcommand: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
draftif it is not ready to be reviewed yet.feat: adding new MAPDL command)