LSFEnvironment¶
- class pytorch_lightning.plugins.environments.LSFEnvironment[source]¶
Bases:
pytorch_lightning.plugins.environments.cluster_environment.ClusterEnvironmentAn environment for running on clusters managed by the LSF resource manager.
It is expected that any execution using this ClusterEnvironment was executed using the Job Step Manager i.e.
jsrun.This plugin expects the following environment variables:
LSB_JOBIDThe LSF assigned job ID
LSB_DJOB_RANKFILEThe OpenMPI compatibile rank file for the LSF job
JSM_NAMESPACE_LOCAL_RANKThe node local rank for the task. This environment variable is set by
jsrunJSM_NAMESPACE_SIZEThe world size for the task. This environment variable is set by
jsrunJSM_NAMESPACE_RANKThe global rank for the task. This environment variable is set by
jsrun
- global_rank()[source]¶
The world size is read from the environment variable
JSM_NAMESPACE_RANK.- Return type
- static is_using_lsf()[source]¶
Returns
Trueif the current process was launched using thejsruncommand.- Return type
- local_rank()[source]¶
The local rank is read from the environment variable JSM_NAMESPACE_LOCAL_RANK.
- Return type
- master_address()[source]¶
The main address is read from an OpenMPI host rank file in the environment variable
LSB_DJOB_RANKFILE.- Return type
- node_rank()[source]¶
The node rank is determined by the position of the current hostname in the OpenMPI host rank file stored in
LSB_DJOB_RANKFILE.- Return type