We have an exciting announcement about badges coming in May 2025. Until then, we will temporarily stop issuing new badges for course completions and certifications. However, all completions will be recorded and fulfilled after May 2025.
General Mechanical

General Mechanical

Topics related to Mechanical Enterprise, Motion, Additive Print and more.

Specifying memory mode from the command line?

    • David Pomeroy
      Subscriber

      Is it possible to specify the memory mode from the command line?

      I am new to Mechanical APDL and am using it to run workstation and cluster performance benchmarks (MAPDL_2022R1_Benchmark) on Linux virtual machine clusters using the command line. When I run the benchmarks in distributed memory mode, I often get a warning that there is insufficient in-core memory allocated even though the hardware has enough memory to run fully in-core. I found some suggestions to use the command "DSPOPTION,,INCORE". Is it possible to set this option at the command line without editing the benchmark .dat file, or are there other options I can use to force it to use more physical memory?

      The command I am using is like this:

      ansys -b -i {path}/V22direct-1.dat -np 88 -dis -mpi INTELMPI -machines=$(cat machine_file)

    • mrife
      Ansys Employee

      Hi David

      Warning are often ok - MAPDL has dynamic memory allocation so the warning about in-core might have been just a warning before MAPDL allocated itself more memory.  Or it may have actually run out-of-core.  Check the output file.

      See the MAPDL Help Operations Guide chapter 4.1 on the command line options.  There are two for memory that work hand-in-hand.  -m and -db

      Don't try to allocation all the available memory to MAPDL if the model does not require it - the OS will use memory for things like caching files for I/O etc.  

      Mike

    • David Pomeroy
      Subscriber

      No, it definitely didn't fix the issue itself because I'm getting huge amounts of I/O and elapsed time exceeds CPU time by a significant amount.

      I've tried using the -m option but it is not working as expected. To test this out, I'm running on one node with 88 cores, 4GB physical memory per core for a total of 352GB. I tried -m 256000 which should allocate a total of 250GB of memory, much less than the physical amount in the node, but what actually happened is Total memory allocated for solver = 490.634 GB and then the run failed because it exceeded physical memory. So when the manual says that -m is the total workspace allocation, it doesn't seem to be functioning that way. I tried adjusting the value downward:

      -m 128000 still allocated the same 490.6GB

      -m 64000 allocated 477GB

      -m 32000 allocated 373GB

      -m 16000 allocated 166GB 

      So it does seem to affect the allocation, but in a nonlinear way. I haven't determined what multiplier or algorithm it's using. I tried -m 3072 to see if it allocates memory per core, but then it only allocated 163GB and was no better than if I didn't set -m.

      Any other ideas?

    • mrife
      Ansys Employee

       

      David

      Well remember the command line -m is the initial allocation; MAPDL still can do dynamic allocation from there.  Are you a commercial customer (I'd like to see the output file)?  Also the value can be set to a negative number to force using a specific amount (and so turning off dynamic allocation).  The -db size, which can also grow dynamically, is taken out of the -m amount.

       

Viewing 3 reply threads
  • The topic ‘Specifying memory mode from the command line?’ is closed to new replies.