unify env variables and use DPRINTF (#89)

* unify handling of env variables

create a class containing all (most?) environment variables used by rocshmem and an object that is instatiated
before library_init, since some of the environment variables need to be
set before we start the bootstraping process.

This allows us to remove two files from the bootstrap directory.

* replace INFO and TRACE macros with DPRINTF

to be more consistent with the rest of the rocSHMEM code
This commit is contained in:
Edgar Gabriel
2025-04-29 06:05:25 -05:00
committed by GitHub
parent c81722c339
commit db74307195
12 changed files with 113 additions and 227 deletions
+1 -10
View File
@@ -86,8 +86,6 @@ rocshmem_ctx_t ROCSHMEM_HOST_CTX_DEFAULT;
rocm_init();
rocshmem_env_config_init();
#ifdef USE_RO
CHECK_HIP(hipHostMalloc(&backend, sizeof(ROBackend)));
backend = new (backend) ROBackend(comm);
@@ -155,14 +153,7 @@ rocshmem_ctx_t ROCSHMEM_HOST_CTX_DEFAULT;
TcpBootstrap bootstr(attr->rank, attr->nranks);
int timeout = 5;
char *value;
value = getenv("ROCSHMEM_BOOTSTRAP_TIMEOUT");
if (value != nullptr) {
timeout = atoi(value);
}
bootstr.initialize(attr->uid, timeout);
bootstr.initialize(attr->uid, rocshmem_env_.get_bootstrap_timeout());
int *inc_ranks = new int[attr->nranks];
inc_ranks[attr->rank] = world_rank;