This branch improves the Cluster Module to be easier to be inherited.
Then, it introduces a new module, LocalCluster, that mocks the Cluster module, making all the submissions occur locally.
This enables the submission of jobs directly within the main job, allowing the user to run simulations inside the cluster but exploiting the scheduler.
As a similar example, all the configuration is the same as the Cluster module, except the hostname is not required:
import sscha.LocalCluster
my_cluster = sscha.LocalCluster.LocalCluster("my_fake_host") # My fake host plays no role, it could probably be removed in a future release.
# Here the same configuration for my_cluster as it is for the full cluster
# To properly submit the calculation using the scheduler
The my_cluster variable is then used exactly like the original cluster; however, all submissions will be done within the same cluster without any SSH command.
This is the best way to bypass the restrictions imposed by the 2FA in many clusters. It allows everything to run from inside the cluster.
Soon, a guide on how to use it in practice will be prepared.
This branch improves the Cluster Module to be easier to be inherited. Then, it introduces a new module, LocalCluster, that mocks the Cluster module, making all the submissions occur locally. This enables the submission of jobs directly within the main job, allowing the user to run simulations inside the cluster but exploiting the scheduler.
As a similar example, all the configuration is the same as the Cluster module, except the hostname is not required:
The
my_cluster
variable is then used exactly like the original cluster; however, all submissions will be done within the same cluster without any SSH command.This is the best way to bypass the restrictions imposed by the 2FA in many clusters. It allows everything to run from inside the cluster.
Soon, a guide on how to use it in practice will be prepared.