Start Batchmesher

Batchmesher can be started on various platforms.

Start Batchmesher on Windows or Linux

Start Batchmesher on Windows

Start Batchmesher on Windows from the Start menu or system command prompt.

  • Start Batchmesher from Start menu.

    Startup options can be supplied to the application by modifying the shortcut, or creating a new one, and adding the required options.

    1. From the Start menu, select BatchMesher 2019.
  • Start Batchmesher from command prompt.
    1. Launch the system command prompt.
    2. cd to the directory from which the Batchmesher application should be run.
    3. Enter the full path of the Batchmesher application start script, along with any startup options.

      For example, enter <altair_home>\hm\batchmesh\hw_batchmesh.bat.

Start Batchmesher on Linux

  1. Launch the system terminal.
  2. cd to the directory from which the Batchmesher application should be run.
  3. At the prompt, enter the full path of the Batchmesher application start script, along with any startup options.

    For example, enter <altair_home>/altair/scripts/hw_batchmesh.

Batchmesher Startup Options

Startup options allow Batchmesher to be launched with a specific behavior or with specific settings defined.

The options are provided as command line options to the application startup script.

For example, on Windows:
<altair_home>\hm\batchmesh\hw_batchmesh.bat -nogui -cad_translator catia -cad_model_dir
        C:\work\models -cad_model_ext CATPart -criteria_file C:\work\10mm.criteria -param_file
          C:\work\10mm.param -user_procedure PRE_GEOMETRY_LOAD C:\work\mytcl.tcl
        myprocedure "myarg1 myarg2" -user_procedure POST_BATCHMESH C:\work\NastranOutput.tcl
        nastranexport
<altair_home>\hm\batchmesh\hw_batchmesh.bat -config_file C:\work\bm.cfg -multicpu 4
        -batch
For example, on Linux:
<altair_home>/altair/scripts/hw_batchmesh -nogui -cad_translator catia -cad_model_dir
        /work/models -cad_model_ext CATPart -criteria_file /work/10mm.criteria -param_file
          /work/10mm.param -user_procedure PRE_GEOMETRY_LOAD /work/mytcl.tcl
        myprocedure "myarg1 myarg2" -user_procedure POST_BATCHMESH /work/NastranOutput.tcl
        nastranexport
<altair_home>/altair/scripts/hw_batchmesh -config_file /work/bm.cfg -multicpu 4
      -batch

Batchmesher GUI Startup Options

-batch
Run jobs automatically via a config file.
Restriction: Must be used with the -config_file option.
-config_file <path>
Specifies the full path and file name of the config file to use.
If used without -batch, this configures the Batchmesher GUI.
If used with -batch, this configures the Batchmesher GUI and automatically runs the jobs.
-file_wait_timeout <minutes>
Model loading and PRE_GEOMETRY_LOAD user procedure run time.
May be required if some models need more than the default time (20 minutes) to load. Also may be required if the user specified PRE_GEOMETRY_LOAD procedure has a long run time. See also -timeout_scale.
-help
Print out the Batchmesher usage message.
-multicpu <number>
Number of CPUs to use for simultaneous Batchmesher jobs.
Overrides any value set in -config_file.
-relocate_to_input
Move all .hm output files to the corresponding directory of the input model.
-submit_time <time>
Define the future submission time of the current GUI configuration.
Time format depends on the OS and localization settings on the machine. Refer to the value of the Submit At button on the Batch Mesh tab to see an example of the format required for your environment. An example is "8/8/11 12:27:00 PM".
-time_limit_default <minutes>
Model batch meshing step timeout.
May be required if some steps need more than the default time (15 minutes). The actual timeout is the maximum of -time_limit_default and the value read from the time_limit.txt file (updated automatically after each step). This is ignored if <=0. See also -timeout_scale.
-timeout_scale <scale>
Proportionally increase/decrease -file_wait_timeout, -time_limit_default and the value read from the time_limit.txt file.
Default value is 1.0. Ignored if <=0.0.
-total_timeout <minutes>
Total timeout for whole batch mesh job.
May be required if model batch meshing require more than the default time (240 minutes).
-work_dir <path>
Specify the directory where the output files are to be written.

Batchmesher "Watchdog" Startup Options

This mode runs a single Batchmesher job with no GUI. This is useful for grid computing job submission.
-cad_model_dir <directory>
Specify the directory where CAD/HM input files are located. This is used for multiple file jobs.
Restriction: Must be used with the -cad_model_ext option, and cannot be used with the -cad_model_file option. This is a mandatory argument if -cad_model_file is not specified.
-cad_model_ext <extension>
Specify the file extension to use when scanning the -cad_model_dir for CAD/HM input files. All input files found with this extension will be batch meshed. This should be simply the extension, not including the period (.) For example, CATPart instead of .CATPart.
Restriction: Must be used with the -cad_model_dir option, and cannot be used with the -cad_model_file option. This is a mandatory argument if -cad_model_file is not specified.
-cad_model_file <path>
Specify the full path and file name of the CAD/HM input file.
Restriction: Cannot be used with the -cad_model_dir and -cad_model_ext options. This is a mandatory argument if -cad_model_dir is not specified.
-cad_translator <type>
Specify the CAD file type being used.
Valid values include:
  • acis
  • catia
  • ct-ug
  • Detect
  • dxf
  • hm
  • iges
  • inspire
  • intergraph
  • jt
  • pdgs
  • parasolid
  • proe
  • step
  • solidworks
  • tribon
  • ug
  • vdafs
-criteria_file <path>
Specify the full path and file name of the criteria input file. This is a mandatory argument.
-file_wait_timeout <minutes>
Model loading and PRE_GEOMETRY_LOAD user procedure run time. May be required if some models need more than the default time (20 minutes) to load. Also may be required if the user specified PRE_GEOMETRY_LOAD procedure has a long run time. See also -timeout_scale.
-help
Print out the Batchmesher usage message.
-nobg
Force Batchmesher to run in the foreground on Linux.
-nogui
Run Batchmesher in no GUI mode. This is a mandatory argument.
-param_file <path>
Specify the full path and file name of the parameter input file. This is a mandatory argument.
-recurse <value>
A true|false value that specifies whether to include sub-directories when using the -cad_model_dir option.
Tip: Not recommended for use in grid computing job submission.
-qi_post_procedure <value>
A true|false value that specifies whether to generate the HTML quality reports for the run.
-run_results <path>
Specify the full path and file name of the results output file to write/append to.
-run_tcl_file <path>
Specify the full path and file name of the Tcl script containing a procedure to run. If this option is used, then all other options except -run_tcl_proc are ignored.
Restriction: Must be used in conjunction with the -run_tcl_proc option.
-run_tcl_proc <proc>
Specify the name of the Tcl procedure to run.
Restriction: Must be used in conjunction with the -run_tcl_file option.
-time_limit_default <minutes>
Model batch meshing step timeout. May be required if some steps need more than the default time (15 minutes). The actual timeout is the maximum of -time_limit_default and the value read from the time_limit.txt file (updated automatically after each step). This is ignored if ≤ 0. See also -timeout_scale.
-timeout_scale <scale>
Proportionally increase/decrease -file_wait_timeout, -time_limit_default and the value read from the time_limit.txt file.
Default value is 1.0. Ignored if ≤0.0.
-total_timeout <minutes>
Total timeout for whole batch mesh job. May be required if model batch meshing require more than the default time (240 minutes).
-user_procedure <type> <path> <proc> <args>
Specify user-registered procedures. This option can be used multiple times, once for each type.
type
Type of procedure to register.
Valid values are PRE_GEOMETRY_LOAD, PRE_BATCHMESH, POST_BATCHMESH.
path
Full path and file name of the Tcl script containing a procedure to run.
proc
Name of the Tcl procedure to run.
args
List of arguments to pass into the procedure. This can be empty. If there are multiple arguments, they must be enclosed in quotes.
-work_dir <path>
Specify the directory where the output files are to be written.

Enable Grid Computing

Batchmesher supports grid-based computing.

The default grid is "PBS Pro".

By default, the "Grid" option is disabled in Batchmesher's base configuration (loaded from the <altair_home>\hm\batchmesh\hw_batchmesh.cfg file).

  1. Enable Batchmesher grid computing by selecting File > Load Config from the Batchmesher menu bar, and loading the <altair_home>\hm\batchmesh\hw_batchmesh_grid.cfg file.
    After loading hw_batchmesh_grid.cfg, a new Grid option displays alongside Local in the File menu’s Run Options sub-menu. Once this option is activated, it will remain even if you load subsequent configuration files.
  2. To use the Grid option, you must configure the qsub.tcl, qstat.tcl, and qdel.tcl default scripts.

    All default scripts are located in <altair_home>\hm\batchmesh.

    The exact script configuration depends on the grid system you use, and requires detailed knowledge of your current grid system.

Grid Computing Default Scripts

Overview of the default scripts used for grid computing.

The three default scripts were created for use with Unix PBS Pro clusters and will work without modification if your cluster configuration is similar to the default configuration.

qsub.tcl

qsub.tcl -batch_args {args} -work_dir dir
The qsub.tcl script creates a node-side script and submits the job to the computing grid. If an error is encountered at job submission, this script returns the word "error". Otherwise, it returns the unique JobID for the submitted job.
args
Command line for one Batchmesher job, contained in curly braces. This line is created by the Batchmesher GUI, and has to be written to the node-side script.
dir
Specify the directory where the output files are to be written.
qsub.tcl -batch_args
        {/soft/hw/altair/scripts/hw_batchmesh -nogui -cad_translator hm -criteria_file
        /homes/username/configs/nvh10.criteria -param_file /homes/username/configs/nvh10.param
        -cad_model_file /homes/username/models/model.hm -nobg} -work_dir
        /homes/username/results/bm_060209_001/

Returns JobID: 1234

Figure 1. Example: qsub.tcl

qstat.tcl

qstat.tcl JobIDList
The qstat.tcl script obtains status information for jobs with specified JobIDs. It returns a list of JobIDs paired with status mnemonics.
R
Job is running
Q
Job is queued, eligible to run
E
Job is exiting after having run
W
Job is waiting for idle resource
U
Status undefined (if status not R, Q, E or W)
none
Information about job was not found
The list of unique JobIDs for submitted jobs:
qstat.tcl 1234 1235 1236 1239
Returns JobID status list of:
1234 none
1235 R
1236 R
1239 Q
Figure 2. Example: JobIDList

qdel.tcl

qstat.tcl JobIDList
The qdel.tcl script terminates jobs with specified JobIDs. It returns 0 if the jobs terminated without errors or "none" if the jobs cannot be terminated or there was a termination error.
The List of unique JobIDs for submitted jobs:
qdel.tcl 1234 1235
Returns termination status:
0
Figure 3. Example: JobIDList

Error Codes

Error codes encountered in Batchmesher.

101
Wrong number of arguments provided to hw_batchmesh. Used only in the command line.
102
Missing required arguments for hw_batchmesh. Used only in the command line.
103
The specified output directory does not exist. (See –work_dir option in hw_batchmesh).
104
Undefined required environment variable.
105
The specified input directory contains no model files (see -cad_model_dir in hw_batchmesh).
106
The custom pre-run or post-run Tcl procedure generated an error.
107
At least three critical errors occurred during the meshing of one model.
111
The HyperMesh executable (hmopengl) is in an incorrect path or is inaccessible.
112
The input geometry file is in an incorrect path or is inaccessible from hw_batchmesh.
113
The criteria file is in an incorrect path or is inaccessible from hw_batchmesh.
114
The parameter file is in an incorrect path or is inaccessible from hw_batchmesh.
121
Either the time_limit.txt or result (*_res.txt) file was not created after the specified timeout.
132
Result file (*_res.txt) not found.
133
Error while reading the time_limit.txt file.
134
Abnormal termination of the HyperMesh process.
135
The HyperMesh process is frozen, possibly waiting for user input.
141
The input geometry file is in an incorrect path or is inaccessible from HyperMesh.
142
The criteria file is in an incorrect path or is inaccessible from HyperMesh.
143
The parameter file is in an incorrect path or is inaccessible from HyperMesh.
144
An error occurred while reading the input file (see HyperMesh *readfile command).
145
An error occurred while importing the input file (see HyperMesh *feinputwithdata2 command).
146
An error occurred while reading the criteria file (see HyperMesh *readqualitycriteria command).
147
An error occurred while running hw_batchmesh.
148
The custom pre-geom, pre-mesh or post-mesh Tcl procedure generated an error.
151
Licensing error.