File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ if binary == "system"
79
79
const mpiexec_cmd = Cmd (mpiexec isa String ? [mpiexec] : mpiexec)
80
80
81
81
_doc_external (fname) = " "
82
+
82
83
include (joinpath (" .." ," src" ," implementations.jl" ))
83
84
84
85
@info " Using implementation" libmpi mpiexec_cmd MPI_LIBRARY_VERSION_STRING
Original file line number Diff line number Diff line change 1
1
const use_stdcall = startswith (basename (libmpi), " msmpi" )
2
2
3
+ # This is required in addition to __init__() so that we can call library at precompilation time.
4
+ if Sys. isunix ()
5
+ Libdl. dlopen (libmpi, Libdl. RTLD_LAZY | Libdl. RTLD_GLOBAL)
6
+ end
7
+
3
8
macro mpicall (expr)
4
9
@assert expr isa Expr && expr. head == :call && expr. args[1 ] == :ccall
10
+
11
+ # On unix systems we call the global symbols to allow for LD_PRELOAD interception
12
+ # It can be emulated in Windows (via Libdl.dllist), but this is not fast.
13
+ if Sys. isunix () && expr. args[2 ]. head == :tuple
14
+ expr. args[2 ] = expr. args[2 ]. args[1 ]
15
+ end
16
+
5
17
# Microsoft MPI uses stdcall calling convention
6
18
# this only affects 32-bit Windows
7
19
# unfortunately we need to use ccall to call Get_library_version
You can’t perform that action at this time.
0 commit comments