exit#

Mapdl.exit(save=False, force=False, **kwargs)#

Exit MAPDL.

Parameters:
savebool, optional

Save the database on exit. The default is False.

forcebool, optional

Override any environment variables that may inhibit exiting MAPDL.

Notes

If Mapdl didn’t start the instance, then MAPDL is kept alive unless force=True.

If PYMAPDL_START_INSTANCE is set to False (generally set in remote testing or documentation build), then MAPDL is kept alive. Override this behavior with force=True to always force exiting MAPDL regardless of your local environment.

On every path where MAPDL itself is left running (the ones above, an instance that has already exited, or an instance built while pymapdl.BUILDING_GALLERY is set), the client side of the connection — the gRPC channel and the PIPE-drainer threads — is still released, because closing a gRPC channel is a purely client-side operation that does not stop the MAPDL server. Call reconnect_to_mapdl() to build a fresh channel and resume driving the same MAPDL session.

If Mapdl.finish_job_on_exit is set to True and there is a valid JobID in Mapdl.jobid, then the SLURM job will be canceled.

Examples

>>> mapdl.exit()