Branch: refs/heads/main
Revision: a4e1950af0806e24028ff5d0b8b4fd7d0c7df012
Author: dlongnecke-cray
Link: dlopen: Refactor 'execute on' functions in runtime/modules by dlongnecke-cray · Pull Request #28919 · chapel-lang/chapel · GitHub
Log Message:
dlopen: Refactor 'execute on' functions in runtime/modules (#28919)
This PR makes more adjustments to the runtime and module code to support
dynamic loading. It adjusts the "execute on" family of functions as well
as a few other functions related to the spawning of tasks and invoking
"ftable" functions.
It adjusts more runtime function names to have the chpl_rt_ prefix.
For the "execute on" family, it adds an additional per-comm-layer
_impl layer. It lifts duplicated code for firing comm callbacks out of
the comm layers and puts them in the common entrypoints.
In the module code, the chpl_executeOn handlers in the
LocaleModel... modules have been renamed to
chpl_localeModelExecuteOn.... Then, chpl_executeOn... shims were
added to ChapelRuntimeInterface which call the runtime functions.
TESTING
-
standard -
COMM=gasnet -
COMM=gasnet,COMPILER=gnu -
release/exampleswithCHPL_GPU=cpu - Build with
gasnet-asanandfastAndIncremental.chpl -
release/exampleswithCOMM=ofi
Reviewed by @benharsh. Thanks!
Diff:
M compiler/codegen/cg-expr.cpp
M compiler/llvm/llvmDebug.cpp
M compiler/passes/parallel.cpp
M frontend/include/chpl/resolution/all-internal-types-list.h
M frontend/lib/types/CompositeType.cpp
M modules/internal/ChapelRuntimeInterface.chpl
M modules/internal/ChapelStandard.chpl
M modules/internal/LocaleModelHelpFlat.chpl
M modules/internal/LocaleModelHelpGPU.chpl
M modules/internal/LocaleModelHelpRuntime.chpl
M runtime/include/chpl-comm-internal.h
M runtime/include/chpl-comm.h
M runtime/include/chpl-gen-includes.h
M runtime/include/chpl-tasks.h
M runtime/src/chpl-comm.c
M runtime/src/comm/gasnet/comm-gasnet-ex.c
M runtime/src/comm/none/comm-none.c
M runtime/src/comm/ofi/comm-ofi.c
M runtime/src/comm/ugni/comm-ugni.c
M runtime/src/tasks/fifo/tasks-fifo.c
M runtime/src/tasks/qthreads/tasks-qthreads.c
M test/compflags/ferguson/print-module-resolution.good
M test/modules/sungeun/init/printModuleInitOrder.good
https://github.com/chapel-lang/chapel/pull/28919.diff