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

launch_mapdl - ram #3724

Open
nekajcasa opened this issue Feb 5, 2025 · 3 comments
Open

launch_mapdl - ram #3724

nekajcasa opened this issue Feb 5, 2025 · 3 comments
Labels
documentation Documentation related (improving, adding, etc)

Comments

@nekajcasa
Copy link

nekajcasa commented Feb 5, 2025

Description of the modifications

I believe ram argument takes in GB and not MB as stated in the documentation.

Useful links and references

No response

@nekajcasa nekajcasa added the documentation Documentation related (improving, adding, etc) label Feb 5, 2025
@mikerife
Copy link

mikerife commented Feb 5, 2025

Hi @nekajcasa starting Mechanical APDL from the command line still uses MB in the memory allocation options (-m and -db). Do you have in mind the APDL command DSPOPTION?
Mike

@nekajcasa
Copy link
Author

When I run the following command:

from ansys.mapdl.core import launch_mapdl
mapdl = launch_mapdl(ram=4)

I get the following output in file1.out:

MEMORY REQUESTED (MB)        = 4096

However, when I run:

from ansys.mapdl.core import launch_mapdl
mapdl = launch_mapdl(ram=4096)

the program exits with an error.
In file1.err, I get:

The memory (-m) size requested [4194304 mb] is not currently available. 
  Re-enter the MAPDL command line with less memory requested.

and in file1.out, I get:

MEMORY REQUESTED (MB)        = 4194304

From this, I assume that the ram argument takes GB instead of MB as input, which contradicts the documentation:

MAPDL Documentation

ram (float, optional)
Total size in megabytes of the workspace (memory) used for the initial allocation. The default is None, in which case 2 GB (2048 MB) is used. To force a fixed size throughout the run, specify a negative number.

@mikerife
Copy link

mikerife commented Feb 6, 2025

Hi @nekajcasa @germa89
I snuck a peek at the code for launch_mapdl and yep it multiplies the 'ram' value by 1024. Which is either a mistake or the PyMAPDL documentation needs to be updated to be clear that the value is (integer) GB.
MIke

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation related (improving, adding, etc)
Projects
None yet
Development

No branches or pull requests

2 participants