Simcenter STAR-CCM+ How to print out stack traces of a parallel Simcenter STAR-CCM+ simulation for server processes?

2024-10-31T10:32:59.000-0400
Simcenter STAR-CCM+ CAD Clients Simcenter STAR-CCM+ Simcenter STAR-CCM+ Virtual Reality Teamcenter Share Simcenter STAR-CCM+ Viewer Simcenter STAR-CCM+ Application Specific Solutions

Summary

Use a CD-adapco provided script, called ccmstack, to run gstack on all the active processes of a running simulation.


Details

If a simulation gets hung up during a run, that is, your simulation stops producing output, the log file no longer gets updated, and a stack trace of the processes could provide information to help pinpoint the cause. 

The following demonstrates how this output can be quickly retrieved, even for a multi-core parallel job running on Linux.

1. Requirement: The command "gstack" must be installed on all cores on which the parallel job is running.

2. Locate the PID file that the server generates;

  • Found under the directory $TMPDIR/star-<username><pid>/procfile.<pid> on the first host of the parallel simulation.
  • Located in the $TMPDIR of the host node.  If TMPDIR is not set, then /tmp is used.
  • Depending on the Simcenter STAR-CCM+ version that is used, multiple star-<username><pid> directories are created. Only one contains the procfile.

3. Locate "ccmstack" which  is a script that is supplied in the installation area of the version of Simcenter STAR-CCM+

<install_area>/STAR-CCM+XX.XX.XXX/star/bin/ccmstack


4. Run (as the user) the script on the PID file

....star/bin/ccmstack <procfile> -rsh <remote shell command>

 

  • General help available through executing:  ccmstack -help

5. Output  

  • A file star-ccm+-stacks-<pid>.txt gets created as well as output to the terminal.
    • ‹Some scenarios have a number of the threads be in a wait or sleep state, while other threads are active in an operation.  If you are evaluating a hung job, the active threads provide some direction as to what the simulation is busy performing.​

See also:
When would I need to increase the Java heap size and how do I do this?
My Linux cluster isn't working with STAR-CCM+, are there any troubleshooting tips you can pass along?
How to set-up and run a server on Linux and connect to it from a client on a Windows machine

KB Article ID# KB000034995_EN_US

Contents

SummaryDetails

Associated Components

Simcenter STAR-CCM+ Clients