Container for calculation resources
This type bundles all resources needed by calculation methods. Currently holds MPI communicators, but can be extended to include BLAS providers, basis readers, and other shared resources.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(mpi_comms_t), | public | :: | mpi_comms |
MPI communicators |
|||
| integer, | public | :: | num_gpus | = | 0 |
Available GPUs |
|
| integer, | public | :: | num_threads | = | 1 |
OpenMP threads |
|
| logical, | public | :: | use_gpu | = | .false. |
GPU acceleration flag |
Clean up resources
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(resources_t), | intent(inout) | :: | this |
Initialize resources with default values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(resources_t), | intent(inout) | :: | this |
type :: resources_t !! Container for calculation resources !! !! This type bundles all resources needed by calculation methods. !! Currently holds MPI communicators, but can be extended to include !! BLAS providers, basis readers, and other shared resources. type(mpi_comms_t) :: mpi_comms !! MPI communicators ! Hardware info integer :: num_threads = 1 !! OpenMP threads integer :: num_gpus = 0 !! Available GPUs logical :: use_gpu = .false. !! GPU acceleration flag ! Future extensions: ! type(blas_provider_t), pointer :: blas => null() ! type(basis_reader_t), pointer :: basis_reader => null() ! type(memory_pool_t), pointer :: memory => null() contains procedure :: init => resources_init procedure :: finalize => resources_finalize end type resources_t