qimpy.rc
Run configuration / hardware resources. This includes CPU cores or GPU, and MPI communicators to be used by the current QimPy instance. The import-time configuration selects a single CPU core for each MPI process in mpi4py.MPI.COMM_WORLD.
Call init to select the number of cores or a GPU device, as available and based on environment variables such as SLURM_CPUS_PER_TASK, as well as to initialize torch.distributed communication controlled by BACKEND and its standard environment variables MASTER_ADDR and MASTER_PORT. None of these environment variables are required; init uses MPI to determine a consistent address/port for the backend set-up.
Module Attributes
Global communicator for QimPy |
|
Rank within comm |
|
Size of comm |
|
Whether head of comm |
|
CPU torch device |
|
Preferred torch device for calculation (CPU / GPU) |
|
Whether device is an accelerator (GPU-like) |
Functions
Initialize overall hardware resources to be used by QimPy. |
|
Cleanup any resources initialized in init. |
|
Time in seconds since start of this run. |
|
Report end time and duration. |