Managing solver child processes in HyperStudy

Garima Singh
Garima Singh
Altair Employee
edited October 25 in Altair HyperWorks

Managing solver child processes in HyperStudy

Hello HyperStudy users,

When integrating non-HyperWorks solvers with HyperStudy, there can be instances that the non-HyperWorks solver integrated with HyperStudy does not have the required solver input arguments specified in the solver batch script to control the child processes spawned by the main solver.

Owing to that, HyperStudy terminates the child processes in a pre-defined time (i.e. 600000 milliseconds) & this consequently leads to termination of the main solver process before completion.

In such a scenario, it is recommended to follow the process detailed below to effectively manage the solver’s child processes. We have detailed the issue, steps for diagnostics & solution in the below sections.

Issue: HyperStudy waiting for child processes

Reason: The phenomenon happens when the main process launched by HyperStudy is terminated before child processes created by the main process.

  • The warning (as shown in Figure 1) is printed in the Message Log when HyperStudy is waiting for the child processes to finish.

image

Figure 1: Warning in message log in HyperStudy related to child processes termination

  • HyperStudy expects the process hierarchy (as shown in Figure 2) to be maintained. Hence, all child processes must finish prior to the main process for the solver job to be complete.

image

Figure 2 : Process hierarchy to be maintained for a solver execution in HyperStudy

  • One example depicting the scenario using HyperWorks solver is as follows:

HyperStudy (hst.exe) invokes SimLab (StartSimLab.exe is the main process) & SimLab calls OptiStruct (optistruct_2021_win64.exe) to solve a numerical analysis. OptiStruct process becomes one of the child processes (as shown in Figure 3).

image

Figure 3 : Description of process hierarchy of HyperStudy-SimLab-OptiStruct execution as an example

Diagnostics for the issue identification: There are two recommended ways to diagnose this issue:

  • By increasing the verbose to Level 1, you can find out the precise command which HyperStudy is running to invoke the process. To increase the verbose level in the GUI, right-click in the Message Log, select verbose from the context menu to increase its level from 0 to 1. Once you have the command which was displayed in the message window attempt to use this exact same command in a command prompt to check what happens.
  • When diagnosing this class of problem, it is recommended to monitor the sub-processes using the Process Explorer tool from Microsoft (applicable for Windows only).

Solutions: We suggest the following solutions for the issue:

1st Solution (Main)

The solver script should have the required specific solver arguments to make sure that the child processes terminate before the main process. Below are examples of specific solver arguments that can be added to the non-HyperWorks solver such as ABAQUS, MATLAB & NASTRAN.

image

Note: These are indicative solver arguments & if they do work as intended, kindly check with the respective solver support team for the specific solver arguments for managing the child processes.

2nd Solution (Work-around)

If you are not able to find the correct solver arguments to make sure that the child processes terminate before the main process, then, one can follow the work-around solution detailed below.

  • Kindly set the environment variable as HW_HST_JOB_WAIT_SECOND & set a value in ‘seconds’ (as per the solver execution time) as shown in Figure 4. Then, close HyperStudy & open it again to reflect the settings done through the environment variable.
  • This approach is applicable for controlling the child processes for all the approaches (nominal, DOE, Optimization etc.) in HyperStudy.

image

Figure 4. Environment variable required to set the solver wait time in seconds.

  • However, if one is not interested in using the environment variable approach, then, the user can set the same setting only for the DOE/Optimization studies using the steps mentioned below.

           Note: This  below mentioned feature can only be used in HyperStudy 2022.2 version & onwards.

1. Increase the 'Child Process Timeout' settings under the 'Evaluate>Evaluation Parameters' for a DOE/Optimization approach to the time (in seconds) which is higher than the solver execution time (as shown in Figure 5).

image

Figure 5 : Setting of the 'Child Process Timeout' under ‘Evaluation Parameters'

2. If the 'Evaluation Parameters' tab is not visible under 'Evaluate', then click on the option (as shown in Figure 6) to enable the same from the given list.

image

Figure 6 : Enabling of the 'Evaluation Parameters' tab

                    3. The above-mentioned step needs to be repeated for each approach separately.