pymapdl
pymapdl copied to clipboard
feat: adding support to launch MAPDL on remote HPC clusters
...
HIGHLY UNDER DEVELOPMENT!!
Description
As the title.
Close #3562
Notes
- [ ] Consider to return two objects,
Mapdlandjob(object to query/manage the HPC job status) - [x] Sanitaze the input parameters. https://app.deepsource.com/directory/analyzers/python/issues/BAN-B601
Example
from ansys.mapdl.core.hpc import launch_on_remote_hpc
import os
from ansys.mapdl.core import LOG
LOG.setLevel("DEBUG")
LOG.log_to_file("mylog.log")
mapdl = launch_on_remote_hpc(
hostname="myhostname",
username="user",
password="mypass",
exec_file="/ansys_inc/v242/ansys/bin/ansys242",
run_location="/home/user/simulation",
# loglevel="DEBUG",
scheduler_options={"partition": "partition"},
replace_env_vars={"ANSYS_LOCK": "OFF"},
nproc=2, # required
)
mapdl.input("apdl.inp")
print(mapdl.jobid)
print(mapdl.prep7())
mapdl.exit()
print("Ended")
Issue linked
NA
Checklist
- [x] I have visited and read Develop PyMAPDL.
- [x] I have tested my changes locally
- [x] I have added necessary documentation or updated existing documentation.
- [x] I have followed the PyMAPDL coding style guidelines.
- [x] I have added appropriate unit tests that also ensure the minimal coverage criteria.
- [x] I have reviewed my changes before submitting this pull request.
- [x] I have linked the issue or issues that are solved to the PR if any.
- [x] I have assigned this PR to myself.
- [x] I have marked this PR as
draftif it is not ready to be reviewed yet. - [x] I have made sure that the title of my PR follows Commit naming conventions (e.g.
feat: adding new MAPDL command)