destroy_process_group

paddle.distributed. destroy_process_group ( group=None ) [source]

Destroy a given group for communication

Parameters

group (Group, optional) – The group to be destroyed. All of process groups, including the default group, will be destroyed and the distributed environment will be deinitialized.

Returns : None

Warning

This API only supports the dygraph mode.

Examples

>>> 
>>> import paddle
>>> import paddle.distributed as dist

>>> dist.init_parallel_env()
>>> group = dist.new_group([0, 1])

>>> dist.destroy_process_group(group)
>>> print(dist.is_initialized())
True
>>> dist.destroy_process_group()
>>> print(dist.is_initialized())
False