pymapdl icon indicating copy to clipboard operation
pymapdl copied to clipboard

feat: adding support to launch MAPDL on remote HPC clusters

Open germa89 opened this issue 9 months ago • 3 comments

...

HIGHLY UNDER DEVELOPMENT!!

Description

As the title.

Close #3562

Notes

  • [ ] Consider to return two objects, Mapdl and job (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

germa89 avatar Jan 28 '25 14:01 germa89