Skip to content
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: adding support to launch MAPDL on remote HPC clusters #3713

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

germa89
Copy link
Collaborator

@germa89 germa89 commented Jan 28, 2025

...

HIGHLY UNDER DEVELOPMENT!!

Description

As the title.

Close #3562

Notes

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

Sorry, something went wrong.

@ansys-reviewer-bot
Copy link
Contributor

Thanks for opening a Pull Request. If you want to perform a review write a comment saying:

@ansys-reviewer-bot review

@github-actions github-actions bot added dependencies maintenance General maintenance of the repo (libraries, cicd, etc) new feature Request or proposal for a new feature labels Jan 28, 2025
Copy link

codecov bot commented Feb 10, 2025

Codecov Report

Attention: Patch coverage is 97.63780% with 3 lines in your changes missing coverage. Please review.

Project coverage is 88.35%. Comparing base (e515e96) to head (86fc801).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3713      +/-   ##
==========================================
+ Coverage   88.28%   88.35%   +0.07%     
==========================================
  Files         187      188       +1     
  Lines       14704    14817     +113     
==========================================
+ Hits        12981    13092     +111     
- Misses       1723     1725       +2     

@germa89 germa89 self-assigned this Feb 10, 2025
@germa89
Copy link
Collaborator Author

germa89 commented Feb 10, 2025

Regarding:

Consider to return two objects, Mapdl and job (object to query/manage the HPC job status)

Whereas I agree with the concern of Mapdl class doing too much, I feel like a class just handling the job (job class), might be a bit of a trouble at the moment because we will have to implement everything from scratch just for the sole purpose of exposing the job status, and job stop methods. And the status is not actually needed per see, and the stop is already executed within mapdl.exit.

@germa89 germa89 mentioned this pull request Feb 10, 2025
@germa89 germa89 mentioned this pull request Feb 12, 2025
8 tasks
@germa89 germa89 mentioned this pull request Feb 18, 2025
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies maintenance General maintenance of the repo (libraries, cicd, etc) new feature Request or proposal for a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remote launching MAPDL instances on an HPC cluster
2 participants