argobots icon indicating copy to clipboard operation
argobots copied to clipboard

Multithreaded ABT_init and finailize

Open shintaro-iwasaki opened this issue 6 years ago • 1 comments

The following breaks since ABT_finalize must be executed by a thread that runs ABT_init.

#pragma omp parallel for // pthreads
for (int i = 0; i < N; i++) {
  ABT_init(...);
  ABT_finalize(...);
}

It becomes a problem if multiple entities initialize Argobots (e.g., a user program and Argobots-aware MPICH). This issue must be fixed to say it is truly thread safe.

I note that, in addition to technical difficulty, there are several things to be taken into account (e.g., number of ESs if multiple threads run ABT_init)

shintaro-iwasaki avatar Feb 12 '19 20:02 shintaro-iwasaki

#136 would be problematic. This solution needs to be aware of the affinity issue as well.

shintaro-iwasaki avatar Jan 29 '20 23:01 shintaro-iwasaki