close_all_local_instances#

ansys.mapdl.core.launcher.close_all_local_instances(port_range=None)#

Close all MAPDL instances within a port_range.

This function can be used when cleaning up from a failed pool or batch run.

Parameters:
port_rangelist, optional

Defaults to range(50000, 50200). Expand this range if there are many potential instances of MAPDL in gRPC mode.

Return type:

None

Examples

Close all instances on in the range of 50000 and 50199.

>>> import ansys.mapdl.core as pymapdl
>>> pymapdl.close_all_local_instances()