DARMA-tasking-internal / darma-frontend

Header library providing the frontend programming model for the DARMA asynchronous many-task model
Other
7 stars 0 forks source link

Thread-safety of external libraries that use global variables #10

Open jjwilke opened 7 years ago

jjwilke commented 7 years ago

The particular use case here is Exodus and other mesh libraries. If overdecomposing on-node, we will either have conflicting uses of global variables (independent of race conditions) or race conditions from parallel threads.

jjwilke commented 7 years ago

Because of the conflicting uses of global variables problem for libraries that assume a single process... this might not even be solvable in DARMA. This might require special "deglobalized" compilations of the libraries themselves through a special DARMA compiler similar to SST.

dhollman commented 7 years ago

I would prefer some sort of deglobalization also, but I don't think it's an unsolvable problem in DARMA in the short term. As a start, backend implementations can support this as an implementation-specific extension by tacking on a specific enum or string to the task name.