Linux sh52.ich-4.com 5.14.0-611.26.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jan 29 05:24:47 EST 2026 x86_64
LiteSpeed
Server IP : 198.143.147.58 & Your IP : 216.73.217.21
Domains :
Cant Read [ /etc/named.conf ]
User : actualbuzz
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
clang /
20 /
include /
Delete
Unzip
Name
Size
Permission
Date
Action
cuda_wrappers
[ DIR ]
drwxr-xr-x
2026-02-03 15:09
fuzzer
[ DIR ]
drwxr-xr-x
2026-02-03 15:08
llvm_libc_wrappers
[ DIR ]
drwxr-xr-x
2026-02-03 15:09
llvm_offload_wrappers
[ DIR ]
drwxr-xr-x
2026-02-03 15:09
openmp_wrappers
[ DIR ]
drwxr-xr-x
2026-02-03 15:09
orc
[ DIR ]
drwxr-xr-x
2026-02-03 15:08
ppc_wrappers
[ DIR ]
drwxr-xr-x
2026-02-03 15:09
profile
[ DIR ]
drwxr-xr-x
2026-02-03 15:08
sanitizer
[ DIR ]
drwxr-xr-x
2026-02-03 15:08
xray
[ DIR ]
drwxr-xr-x
2026-02-03 15:08
zos_wrappers
[ DIR ]
drwxr-xr-x
2026-02-03 15:09
__clang_cuda_builtin_vars.h
4.78
KB
-rw-r--r--
2025-07-08 23:06
__clang_cuda_cmath.h
18.06
KB
-rw-r--r--
2025-07-08 23:06
__clang_cuda_complex_builtins.h
9.36
KB
-rw-r--r--
2025-07-08 23:06
__clang_cuda_device_functions.h
57.36
KB
-rw-r--r--
2025-07-08 23:06
__clang_cuda_intrinsics.h
29.87
KB
-rw-r--r--
2025-07-08 23:06
__clang_cuda_libdevice_declares.h
21.89
KB
-rw-r--r--
2025-07-08 23:06
__clang_cuda_math.h
16.21
KB
-rw-r--r--
2025-07-08 23:06
__clang_cuda_math_forward_declares.h
8.27
KB
-rw-r--r--
2025-07-08 23:06
__clang_cuda_runtime_wrapper.h
17.6
KB
-rw-r--r--
2025-07-08 23:06
__clang_cuda_texture_intrinsics.h
31.86
KB
-rw-r--r--
2025-07-08 23:06
__clang_hip_cmath.h
26.48
KB
-rw-r--r--
2025-07-08 23:06
__clang_hip_libdevice_declares.h
19.87
KB
-rw-r--r--
2025-07-08 23:06
__clang_hip_math.h
32.78
KB
-rw-r--r--
2025-07-08 23:06
__clang_hip_runtime_wrapper.h
4.94
KB
-rw-r--r--
2025-07-08 23:06
__clang_hip_stdlib.h
1.19
KB
-rw-r--r--
2025-07-08 23:06
__stdarg___gnuc_va_list.h
467
B
-rw-r--r--
2025-07-08 23:06
__stdarg___va_copy.h
445
B
-rw-r--r--
2025-07-08 23:06
__stdarg_header_macro.h
417
B
-rw-r--r--
2025-07-08 23:06
__stdarg_va_arg.h
793
B
-rw-r--r--
2025-07-08 23:06
__stdarg_va_copy.h
451
B
-rw-r--r--
2025-07-08 23:06
__stdarg_va_list.h
448
B
-rw-r--r--
2025-07-08 23:06
__stddef_header_macro.h
417
B
-rw-r--r--
2025-07-08 23:06
__stddef_max_align_t.h
857
B
-rw-r--r--
2025-07-08 23:06
__stddef_null.h
875
B
-rw-r--r--
2025-07-08 23:06
__stddef_nullptr_t.h
958
B
-rw-r--r--
2025-07-08 23:06
__stddef_offsetof.h
708
B
-rw-r--r--
2025-07-08 23:06
__stddef_ptrdiff_t.h
717
B
-rw-r--r--
2025-07-08 23:06
__stddef_rsize_t.h
710
B
-rw-r--r--
2025-07-08 23:06
__stddef_size_t.h
708
B
-rw-r--r--
2025-07-08 23:06
__stddef_unreachable.h
735
B
-rw-r--r--
2025-07-08 23:06
__stddef_wchar_t.h
853
B
-rw-r--r--
2025-07-08 23:06
__stddef_wint_t.h
443
B
-rw-r--r--
2025-07-08 23:06
__wmmintrin_aes.h
5.15
KB
-rw-r--r--
2025-07-08 23:06
__wmmintrin_pclmul.h
1.99
KB
-rw-r--r--
2025-07-08 23:06
adcintrin.h
5.43
KB
-rw-r--r--
2025-07-08 23:06
adxintrin.h
3.37
KB
-rw-r--r--
2025-07-08 23:06
altivec.h
698.45
KB
-rw-r--r--
2025-07-08 23:06
amdgpuintrin.h
7.4
KB
-rw-r--r--
2025-07-08 23:06
ammintrin.h
7.56
KB
-rw-r--r--
2025-07-08 23:06
amxavx512intrin.h
12.67
KB
-rw-r--r--
2025-07-08 23:06
amxbf16transposeintrin.h
3.44
KB
-rw-r--r--
2025-07-08 23:06
amxcomplexintrin.h
6.81
KB
-rw-r--r--
2025-07-08 23:06
amxcomplextransposeintrin.h
11.78
KB
-rw-r--r--
2025-07-08 23:06
amxfp16intrin.h
3.25
KB
-rw-r--r--
2025-07-08 23:06
amxfp16transposeintrin.h
3.44
KB
-rw-r--r--
2025-07-08 23:06
amxfp8intrin.h
8.63
KB
-rw-r--r--
2025-07-08 23:06
amxintrin.h
19.83
KB
-rw-r--r--
2025-07-08 23:06
amxmovrsintrin.h
2.24
KB
-rw-r--r--
2025-07-08 23:06
amxmovrstransposeintrin.h
9.18
KB
-rw-r--r--
2025-07-08 23:06
amxtf32intrin.h
3.48
KB
-rw-r--r--
2025-07-08 23:06
amxtf32transposeintrin.h
3.56
KB
-rw-r--r--
2025-07-08 23:06
amxtransposeintrin.h
10.6
KB
-rw-r--r--
2025-07-08 23:06
arm64intr.h
993
B
-rw-r--r--
2025-07-08 23:06
arm_acle.h
29.97
KB
-rw-r--r--
2025-07-08 23:06
arm_bf16.h
548
B
-rw-r--r--
2025-09-17 20:10
arm_cde.h
32.67
KB
-rw-r--r--
2025-09-17 20:10
arm_cmse.h
6.21
KB
-rw-r--r--
2025-07-08 23:06
arm_fp16.h
16.94
KB
-rw-r--r--
2025-09-17 20:10
arm_mve.h
1.48
MB
-rw-r--r--
2025-09-17 20:10
arm_neon.h
2.66
MB
-rw-r--r--
2025-09-17 20:10
arm_neon_sve_bridge.h
9.48
KB
-rw-r--r--
2025-07-08 23:06
arm_sme.h
223.36
KB
-rw-r--r--
2025-09-17 20:10
arm_sve.h
2.03
MB
-rw-r--r--
2025-09-17 20:10
arm_vector_types.h
9.86
KB
-rw-r--r--
2025-09-17 20:10
armintr.h
843
B
-rw-r--r--
2025-07-08 23:06
avx10_2_512bf16intrin.h
22.87
KB
-rw-r--r--
2025-07-08 23:06
avx10_2_512convertintrin.h
12.88
KB
-rw-r--r--
2025-07-08 23:06
avx10_2_512minmaxintrin.h
7.35
KB
-rw-r--r--
2025-07-08 23:06
avx10_2_512niintrin.h
13.71
KB
-rw-r--r--
2025-07-08 23:06
avx10_2_512satcvtdsintrin.h
13.48
KB
-rw-r--r--
2025-07-08 23:06
avx10_2_512satcvtintrin.h
16.6
KB
-rw-r--r--
2025-07-08 23:06
avx10_2bf16intrin.h
43.63
KB
-rw-r--r--
2025-07-08 23:06
avx10_2convertintrin.h
22.75
KB
-rw-r--r--
2025-07-08 23:06
avx10_2copyintrin.h
2.35
KB
-rw-r--r--
2025-07-08 23:06
avx10_2minmaxintrin.h
13.53
KB
-rw-r--r--
2025-07-08 23:06
avx10_2niintrin.h
16.6
KB
-rw-r--r--
2025-07-08 23:06
avx10_2satcvtdsintrin.h
15.36
KB
-rw-r--r--
2025-07-08 23:06
avx10_2satcvtintrin.h
18.87
KB
-rw-r--r--
2025-07-08 23:06
avx2intrin.h
188.12
KB
-rw-r--r--
2025-07-08 23:06
avx512bf16intrin.h
10.58
KB
-rw-r--r--
2025-07-08 23:06
avx512bitalgintrin.h
2.56
KB
-rw-r--r--
2025-07-08 23:06
avx512bwintrin.h
76.02
KB
-rw-r--r--
2025-07-08 23:06
avx512cdintrin.h
4.23
KB
-rw-r--r--
2025-07-08 23:06
avx512dqintrin.h
58.87
KB
-rw-r--r--
2025-07-08 23:06
avx512fintrin.h
383.45
KB
-rw-r--r--
2025-07-08 23:06
avx512fp16intrin.h
156.92
KB
-rw-r--r--
2025-07-08 23:06
avx512ifmaintrin.h
2.6
KB
-rw-r--r--
2025-07-08 23:06
avx512ifmavlintrin.h
4.6
KB
-rw-r--r--
2025-07-08 23:06
avx512vbmi2intrin.h
13.18
KB
-rw-r--r--
2025-07-08 23:06
avx512vbmiintrin.h
3.83
KB
-rw-r--r--
2025-07-08 23:06
avx512vbmivlintrin.h
7.23
KB
-rw-r--r--
2025-07-08 23:06
avx512vlbf16intrin.h
19.46
KB
-rw-r--r--
2025-07-08 23:06
avx512vlbitalgintrin.h
4.52
KB
-rw-r--r--
2025-07-08 23:06
avx512vlbwintrin.h
121.56
KB
-rw-r--r--
2025-07-08 23:06
avx512vlcdintrin.h
7.95
KB
-rw-r--r--
2025-07-08 23:06
avx512vldqintrin.h
46.71
KB
-rw-r--r--
2025-07-08 23:06
avx512vlfp16intrin.h
85.51
KB
-rw-r--r--
2025-07-08 23:06
avx512vlintrin.h
322.6
KB
-rw-r--r--
2025-07-08 23:06
avx512vlvbmi2intrin.h
26.01
KB
-rw-r--r--
2025-07-08 23:06
avx512vlvnniintrin.h
13.41
KB
-rw-r--r--
2025-07-08 23:06
avx512vlvp2intersectintrin.h
4.67
KB
-rw-r--r--
2025-07-08 23:06
avx512vnniintrin.h
4.32
KB
-rw-r--r--
2025-07-08 23:06
avx512vp2intersectintrin.h
3.03
KB
-rw-r--r--
2025-07-08 23:06
avx512vpopcntdqintrin.h
2.3
KB
-rw-r--r--
2025-07-08 23:06
avx512vpopcntdqvlintrin.h
3.86
KB
-rw-r--r--
2025-07-08 23:06
avxifmaintrin.h
5.75
KB
-rw-r--r--
2025-07-08 23:06
avxintrin.h
197.12
KB
-rw-r--r--
2025-07-08 23:06
avxneconvertintrin.h
14.09
KB
-rw-r--r--
2025-07-08 23:06
avxvnniint16intrin.h
15.84
KB
-rw-r--r--
2025-07-08 23:06
avxvnniint8intrin.h
17.02
KB
-rw-r--r--
2025-07-08 23:06
avxvnniintrin.h
10.44
KB
-rw-r--r--
2025-07-08 23:06
bmi2intrin.h
7.37
KB
-rw-r--r--
2025-07-08 23:06
bmiintrin.h
20.02
KB
-rw-r--r--
2025-07-08 23:06
builtins.h
846
B
-rw-r--r--
2025-07-08 23:06
cet.h
1.49
KB
-rw-r--r--
2025-07-08 23:06
cetintrin.h
3.27
KB
-rw-r--r--
2025-07-08 23:06
cldemoteintrin.h
1.18
KB
-rw-r--r--
2025-07-08 23:06
clflushoptintrin.h
1.17
KB
-rw-r--r--
2025-07-08 23:06
clwbintrin.h
1.2
KB
-rw-r--r--
2025-07-08 23:06
clzerointrin.h
1.19
KB
-rw-r--r--
2025-07-08 23:06
cmpccxaddintrin.h
2.33
KB
-rw-r--r--
2025-07-08 23:06
cpuid.h
11.9
KB
-rw-r--r--
2025-07-08 23:06
crc32intrin.h
3.27
KB
-rw-r--r--
2025-07-08 23:06
emmintrin.h
196.89
KB
-rw-r--r--
2025-07-08 23:06
enqcmdintrin.h
2.12
KB
-rw-r--r--
2025-07-08 23:06
f16cintrin.h
5.39
KB
-rw-r--r--
2025-07-08 23:06
float.h
6.43
KB
-rw-r--r--
2025-07-08 23:06
fma4intrin.h
6.82
KB
-rw-r--r--
2025-07-08 23:06
fmaintrin.h
28.65
KB
-rw-r--r--
2025-07-08 23:06
fxsrintrin.h
2.82
KB
-rw-r--r--
2025-07-08 23:06
gfniintrin.h
9.59
KB
-rw-r--r--
2025-07-08 23:06
gpuintrin.h
9.07
KB
-rw-r--r--
2025-07-08 23:06
hexagon_circ_brev_intrinsics.h
15.59
KB
-rw-r--r--
2025-07-08 23:06
hexagon_protos.h
374.42
KB
-rw-r--r--
2025-07-08 23:06
hexagon_types.h
130.38
KB
-rw-r--r--
2025-07-08 23:06
hresetintrin.h
1.36
KB
-rw-r--r--
2025-07-08 23:06
htmintrin.h
6.14
KB
-rw-r--r--
2025-07-08 23:06
htmxlintrin.h
9.01
KB
-rw-r--r--
2025-07-08 23:06
hvx_hexagon_protos.h
275.18
KB
-rw-r--r--
2025-07-08 23:06
ia32intrin.h
25.38
KB
-rw-r--r--
2025-07-08 23:06
immintrin.h
25.46
KB
-rw-r--r--
2025-07-08 23:06
intrin.h
18.16
KB
-rw-r--r--
2025-07-08 23:06
intrin0.h
13.76
KB
-rw-r--r--
2025-07-08 23:06
inttypes.h
2.37
KB
-rw-r--r--
2025-07-08 23:06
invpcidintrin.h
764
B
-rw-r--r--
2025-07-08 23:06
iso646.h
763
B
-rw-r--r--
2025-07-08 23:06
keylockerintrin.h
17.85
KB
-rw-r--r--
2025-07-08 23:06
larchintrin.h
8.5
KB
-rw-r--r--
2025-07-08 23:06
lasxintrin.h
142.14
KB
-rw-r--r--
2025-07-08 23:06
limits.h
3.71
KB
-rw-r--r--
2025-07-08 23:06
lsxintrin.h
134.7
KB
-rw-r--r--
2025-07-08 23:06
lwpintrin.h
5
KB
-rw-r--r--
2025-07-08 23:06
lzcntintrin.h
3.45
KB
-rw-r--r--
2025-07-08 23:06
mm3dnow.h
729
B
-rw-r--r--
2025-07-08 23:06
mm_malloc.h
1.88
KB
-rw-r--r--
2025-07-08 23:06
mmintrin.h
58.6
KB
-rw-r--r--
2025-07-08 23:06
module.modulemap
6.47
KB
-rw-r--r--
2025-07-08 23:06
movdirintrin.h
1.57
KB
-rw-r--r--
2025-07-08 23:06
movrs_avx10_2_512intrin.h
3.88
KB
-rw-r--r--
2025-07-08 23:06
movrs_avx10_2intrin.h
6.87
KB
-rw-r--r--
2025-07-08 23:06
movrsintrin.h
1.98
KB
-rw-r--r--
2025-07-08 23:06
msa.h
25.01
KB
-rw-r--r--
2025-07-08 23:06
mwaitxintrin.h
2.19
KB
-rw-r--r--
2025-07-08 23:06
nmmintrin.h
709
B
-rw-r--r--
2025-07-08 23:06
nvptxintrin.h
7.42
KB
-rw-r--r--
2025-07-08 23:06
omp-tools.h
50.86
KB
-rw-r--r--
2025-09-17 20:37
omp.h
23.36
KB
-rw-r--r--
2025-09-17 20:37
ompt-multiplex.h
51.11
KB
-rw-r--r--
2025-07-08 23:06
ompt.h
50.86
KB
-rw-r--r--
2025-09-17 20:37
ompx.h
7.38
KB
-rw-r--r--
2025-09-17 20:37
opencl-c-base.h
30.94
KB
-rw-r--r--
2025-07-08 23:06
opencl-c.h
874.98
KB
-rw-r--r--
2025-07-08 23:06
pconfigintrin.h
1.19
KB
-rw-r--r--
2025-07-08 23:06
pkuintrin.h
934
B
-rw-r--r--
2025-07-08 23:06
pmmintrin.h
11.12
KB
-rw-r--r--
2025-07-08 23:06
popcntintrin.h
1.9
KB
-rw-r--r--
2025-07-08 23:06
prfchiintrin.h
2.02
KB
-rw-r--r--
2025-07-08 23:06
prfchwintrin.h
2.06
KB
-rw-r--r--
2025-07-08 23:06
ptrauth.h
15.61
KB
-rw-r--r--
2025-07-08 23:06
ptwriteintrin.h
1.05
KB
-rw-r--r--
2025-07-08 23:06
raointintrin.h
6.59
KB
-rw-r--r--
2025-07-08 23:06
rdpruintrin.h
1.59
KB
-rw-r--r--
2025-07-08 23:06
rdseedintrin.h
2.85
KB
-rw-r--r--
2025-07-08 23:06
riscv_bitmanip.h
5.59
KB
-rw-r--r--
2025-07-08 23:06
riscv_corev_alu.h
3.94
KB
-rw-r--r--
2025-07-08 23:06
riscv_crypto.h
5.09
KB
-rw-r--r--
2025-07-08 23:06
riscv_ntlh.h
744
B
-rw-r--r--
2025-07-08 23:06
riscv_vector.h
17.11
KB
-rw-r--r--
2025-09-17 20:11
rtmintrin.h
1.25
KB
-rw-r--r--
2025-07-08 23:06
s390intrin.h
604
B
-rw-r--r--
2025-07-08 23:06
serializeintrin.h
881
B
-rw-r--r--
2025-07-08 23:06
sgxintrin.h
1.77
KB
-rw-r--r--
2025-07-08 23:06
sha512intrin.h
5.95
KB
-rw-r--r--
2025-07-08 23:06
shaintrin.h
7.37
KB
-rw-r--r--
2025-07-08 23:06
sifive_vector.h
6.88
KB
-rw-r--r--
2025-07-08 23:06
sm3intrin.h
7.29
KB
-rw-r--r--
2025-07-08 23:06
sm4evexintrin.h
1.17
KB
-rw-r--r--
2025-07-08 23:06
sm4intrin.h
8.2
KB
-rw-r--r--
2025-07-08 23:06
smmintrin.h
99.34
KB
-rw-r--r--
2025-07-08 23:06
stdalign.h
756
B
-rw-r--r--
2025-07-08 23:06
stdarg.h
2.44
KB
-rw-r--r--
2025-07-08 23:06
stdatomic.h
8.46
KB
-rw-r--r--
2025-07-08 23:06
stdbool.h
1.14
KB
-rw-r--r--
2025-07-08 23:06
stdckdint.h
1.63
KB
-rw-r--r--
2025-07-08 23:06
stddef.h
4.93
KB
-rw-r--r--
2025-07-08 23:06
stdint.h
30.33
KB
-rw-r--r--
2025-07-08 23:06
stdnoreturn.h
1.29
KB
-rw-r--r--
2025-07-08 23:06
tbmintrin.h
3.42
KB
-rw-r--r--
2025-07-08 23:06
tgmath.h
29.68
KB
-rw-r--r--
2025-07-08 23:06
tmmintrin.h
31.18
KB
-rw-r--r--
2025-07-08 23:06
tsxldtrkintrin.h
1.97
KB
-rw-r--r--
2025-07-08 23:06
uintrintrin.h
4.96
KB
-rw-r--r--
2025-07-08 23:06
unwind.h
11.21
KB
-rw-r--r--
2025-07-08 23:06
usermsrintrin.h
1.54
KB
-rw-r--r--
2025-07-08 23:06
vadefs.h
1.39
KB
-rw-r--r--
2025-07-08 23:06
vaesintrin.h
2.61
KB
-rw-r--r--
2025-07-08 23:06
varargs.h
584
B
-rw-r--r--
2025-07-08 23:06
vecintrin.h
419.23
KB
-rw-r--r--
2025-07-08 23:06
velintrin.h
2.1
KB
-rw-r--r--
2025-07-08 23:06
velintrin_approx.h
3.54
KB
-rw-r--r--
2025-07-08 23:06
velintrin_gen.h
69.06
KB
-rw-r--r--
2025-07-08 23:06
vpclmulqdqintrin.h
1.06
KB
-rw-r--r--
2025-07-08 23:06
waitpkgintrin.h
1.33
KB
-rw-r--r--
2025-07-08 23:06
wasm_simd128.h
81.71
KB
-rw-r--r--
2025-07-08 23:06
wbnoinvdintrin.h
749
B
-rw-r--r--
2025-07-08 23:06
wmmintrin.h
659
B
-rw-r--r--
2025-07-08 23:06
x86gprintrin.h
2.22
KB
-rw-r--r--
2025-07-08 23:06
x86intrin.h
1.38
KB
-rw-r--r--
2025-07-08 23:06
xmmintrin.h
117.43
KB
-rw-r--r--
2025-07-08 23:06
xopintrin.h
19.96
KB
-rw-r--r--
2025-07-08 23:06
xsavecintrin.h
2.51
KB
-rw-r--r--
2025-07-08 23:06
xsaveintrin.h
1.64
KB
-rw-r--r--
2025-07-08 23:06
xsaveoptintrin.h
1
KB
-rw-r--r--
2025-07-08 23:06
xsavesintrin.h
1.24
KB
-rw-r--r--
2025-07-08 23:06
xtestintrin.h
873
B
-rw-r--r--
2025-07-08 23:06
yvals_core.h
687
B
-rw-r--r--
2025-07-08 23:06
Save
Rename
//===--- ompt-multiplex.h - header-only multiplexing of OMPT tools -- C -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This header file enables an OMPT tool to load another OMPT tool and // automatically forwards OMPT event-callbacks to the nested tool. // // For details see openmp/tools/multiplex/README.md // //===----------------------------------------------------------------------===// #ifndef OMPT_MULTIPLEX_H #define OMPT_MULTIPLEX_H #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #include <dlfcn.h> #include <errno.h> #include <execinfo.h> #include <inttypes.h> #include <omp-tools.h> #include <omp.h> #include <stdio.h> #include <string.h> static ompt_set_callback_t ompt_multiplex_set_callback; static ompt_get_task_info_t ompt_multiplex_get_task_info; static ompt_get_thread_data_t ompt_multiplex_get_thread_data; static ompt_get_parallel_info_t ompt_multiplex_get_parallel_info; // If OMPT_MULTIPLEX_TOOL_NAME is defined, use the tool name as prefix // contains name of the environment var in which the tool path is specified // for TOOL_LIBRARIES and VERBOSE_INIT variables. Only overwrite, if // they are not explicitly defined. #ifdef OMPT_MULTIPLEX_TOOL_NAME #ifndef CLIENT_TOOL_LIBRARIES_VAR #define CLIENT_TOOL_LIBRARIES_VAR OMPT_MULTIPLEX_TOOL_NAME "_TOOL_LIBRARIES" #endif #ifndef CLIENT_TOOL_VERBOSE_INIT_VAR #define CLIENT_TOOL_VERBOSE_INIT_VAR \ OMPT_MULTIPLEX_TOOL_NAME "_TOOL_VERBOSE_INIT" #endif #endif // If CLIENT_TOOL_VERBOSE_INIT_VAR is still not defined, use the OMPT // env var. #ifndef CLIENT_TOOL_VERBOSE_INIT_VAR #warning CLIENT_TOOL_VERBOSE_INIT_VAR redefined to OMP_TOOL_VERBOSE_INIT #define CLIENT_TOOL_VERBOSE_INIT_VAR "OMP_TOOL_VERBOSE_INIT" #endif // contains name of the environment var in which the tool path is specified #ifndef CLIENT_TOOL_LIBRARIES_VAR #error CLIENT_TOOL_LIBRARIES_VAR should be defined before including of ompt-multiplex.h #endif #if defined(OMPT_MULTIPLEX_CUSTOM_DELETE_TASK_DATA) && \ !defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA) #error OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA must be set if OMPT_MULTIPLEX_CUSTOM_DELETE_TASK_DATA is set #endif #if defined(OMPT_MULTIPLEX_CUSTOM_DELETE_PARALLEL_DATA) && \ !defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA) #error OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA must be set if OMPT_MULTIPLEX_CUSTOM_DELETE_PARALLEL_DATA is set #endif #if defined(OMPT_MULTIPLEX_CUSTOM_DELETE_THREAD_DATA) && \ !defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_THREAD_DATA) #error OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_THREAD_DATA must be set if OMPT_MULTIPLEX_CUSTOM_DELETE_THREAD_DATA is set #endif #define OMPT_API_ROUTINE static #ifndef OMPT_STR_MATCH #define OMPT_STR_MATCH(haystack, needle) (!strcasecmp(haystack, needle)) #endif // prints for an enabled OMP_TOOL_VERBOSE_INIT. // In the future a prefix could be added in the first define, the second define // omits the prefix to allow for continued lines. Example: "PREFIX: Start // tool... Success." instead of "PREFIX: Start tool... PREFIX: Success." #define OMPT_VERBOSE_INIT_PRINT(...) \ if (verbose_init) \ fprintf(verbose_file, __VA_ARGS__) #define OMPT_VERBOSE_INIT_CONTINUED_PRINT(...) \ if (verbose_init) \ fprintf(verbose_file, __VA_ARGS__) static FILE *verbose_file; static int verbose_init; void setup_verbose_init() { const char *ompt_env_verbose_init = getenv(CLIENT_TOOL_VERBOSE_INIT_VAR); // possible options: disabled | stdout | stderr | <filename> // if set, not empty and not disabled -> prepare for logging if (ompt_env_verbose_init && strcmp(ompt_env_verbose_init, "") && !OMPT_STR_MATCH(ompt_env_verbose_init, "disabled")) { verbose_init = 1; if (OMPT_STR_MATCH(ompt_env_verbose_init, "STDERR")) verbose_file = stderr; else if (OMPT_STR_MATCH(ompt_env_verbose_init, "STDOUT")) verbose_file = stdout; else if (!OMPT_STR_MATCH(ompt_env_verbose_init, getenv("OMP_TOOL_VERBOSE_INIT"))) verbose_file = fopen(ompt_env_verbose_init, "w"); else { verbose_init = 0; printf("Multiplex: Can not open file defined in OMP_TOOL_VERBOSE_INIT " "twice."); } } else verbose_init = 0; } #define OMPT_LOAD_CLIENT_FOREACH_OMPT_EVENT(macro) \ macro(callback_thread_begin, ompt_callback_thread_begin_t, 1); \ macro(callback_thread_end, ompt_callback_thread_end_t, 2); \ macro(callback_parallel_begin, ompt_callback_parallel_begin_t, 3); \ macro(callback_parallel_end, ompt_callback_parallel_end_t, 4); \ macro(callback_task_create, ompt_callback_task_create_t, 5); \ macro(callback_task_schedule, ompt_callback_task_schedule_t, 6); \ macro(callback_implicit_task, ompt_callback_implicit_task_t, 7); \ macro(callback_target, ompt_callback_target_t, 8); \ macro(callback_target_data_op, ompt_callback_target_data_op_t, 9); \ macro(callback_target_submit, ompt_callback_target_submit_t, 10); \ macro(callback_control_tool, ompt_callback_control_tool_t, 11); \ macro(callback_device_initialize, ompt_callback_device_initialize_t, 12); \ macro(callback_device_finalize, ompt_callback_device_finalize_t, 13); \ macro(callback_device_load, ompt_callback_device_load_t, 14); \ macro(callback_device_unload, ompt_callback_device_unload_t, 15); \ macro(callback_sync_region_wait, ompt_callback_sync_region_t, 16); \ macro(callback_mutex_released, ompt_callback_mutex_t, 17); \ macro(callback_dependences, ompt_callback_dependences_t, 18); \ macro(callback_task_dependence, ompt_callback_task_dependence_t, 19); \ macro(callback_work, ompt_callback_work_t, 20); \ macro(callback_masked, ompt_callback_masked_t, 21); \ macro(callback_target_map, ompt_callback_target_map_t, 22); \ macro(callback_sync_region, ompt_callback_sync_region_t, 23); \ macro(callback_lock_init, ompt_callback_mutex_acquire_t, 24); \ macro(callback_lock_destroy, ompt_callback_mutex_t, 25); \ macro(callback_mutex_acquire, ompt_callback_mutex_acquire_t, 26); \ macro(callback_mutex_acquired, ompt_callback_mutex_t, 27); \ macro(callback_nest_lock, ompt_callback_nest_lock_t, 28); \ macro(callback_flush, ompt_callback_flush_t, 29); \ macro(callback_cancel, ompt_callback_cancel_t, 30); \ macro(callback_reduction, ompt_callback_sync_region_t, 31); \ macro(callback_dispatch, ompt_callback_dispatch_t, 32); typedef struct ompt_multiplex_callbacks_s { #define ompt_event_macro(event, callback, eventid) callback ompt_##event OMPT_LOAD_CLIENT_FOREACH_OMPT_EVENT(ompt_event_macro) #undef ompt_event_macro } ompt_multiplex_callbacks_t; typedef struct ompt_multiplex_callback_implementation_status_s { #define ompt_event_macro(event, callback, eventid) int ompt_##event OMPT_LOAD_CLIENT_FOREACH_OMPT_EVENT(ompt_event_macro) #undef ompt_event_macro } ompt_multiplex_callback_implementation_status_t; ompt_start_tool_result_t *ompt_multiplex_own_fns = NULL; ompt_start_tool_result_t *ompt_multiplex_client_fns = NULL; ompt_function_lookup_t ompt_multiplex_lookup_function; ompt_multiplex_callbacks_t ompt_multiplex_own_callbacks, ompt_multiplex_client_callbacks; ompt_multiplex_callback_implementation_status_t ompt_multiplex_implementation_status; typedef struct ompt_multiplex_data_pair_s { ompt_data_t own_data; ompt_data_t client_data; } ompt_multiplex_data_pair_t; #if !defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_THREAD_DATA) || \ !defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA) || \ !defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA) static ompt_multiplex_data_pair_t * ompt_multiplex_allocate_data_pair(ompt_data_t *data_pointer) { data_pointer->ptr = malloc(sizeof(ompt_multiplex_data_pair_t)); if (!data_pointer->ptr) { printf("Malloc ERROR\n"); exit(-1); } ompt_multiplex_data_pair_t *data_pair = (ompt_multiplex_data_pair_t *)data_pointer->ptr; data_pair->own_data.ptr = NULL; data_pair->client_data.ptr = NULL; return data_pair; } static void ompt_multiplex_free_data_pair(ompt_data_t *data_pointer) { free((*data_pointer).ptr); } static ompt_data_t *ompt_multiplex_get_own_ompt_data(ompt_data_t *data) { if (!data) return NULL; if (!data->ptr) return NULL; ompt_multiplex_data_pair_t *data_pair = (ompt_multiplex_data_pair_t *)data->ptr; return &(data_pair->own_data); } static ompt_data_t *ompt_multiplex_get_client_ompt_data(ompt_data_t *data) { if (!data) return NULL; if (!data->ptr) return NULL; ompt_multiplex_data_pair_t *data_pair = (ompt_multiplex_data_pair_t *)data->ptr; return &(data_pair->client_data); } #endif //! defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_THREAD_DATA) || //! !defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA) || //! !defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA) static ompt_data_t *ompt_multiplex_get_own_thread_data(ompt_data_t *data) { #ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_THREAD_DATA return ompt_multiplex_get_own_ompt_data(data); #else return data; #endif } static ompt_data_t *ompt_multiplex_get_own_parallel_data(ompt_data_t *data) { #ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA return ompt_multiplex_get_own_ompt_data(data); #else return data; #endif } static ompt_data_t *ompt_multiplex_get_own_task_data(ompt_data_t *data) { #ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA return ompt_multiplex_get_own_ompt_data(data); #else return data; #endif } static ompt_data_t *ompt_multiplex_get_client_thread_data(ompt_data_t *data) { #ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_THREAD_DATA return ompt_multiplex_get_client_ompt_data(data); #else return OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_THREAD_DATA(data); #endif } static ompt_data_t *ompt_multiplex_get_client_parallel_data(ompt_data_t *data) { #ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA return ompt_multiplex_get_client_ompt_data(data); #else return OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA(data); #endif } static ompt_data_t *ompt_multiplex_get_client_task_data(ompt_data_t *data) { #ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA return ompt_multiplex_get_client_ompt_data(data); #else return OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA(data); #endif } static void ompt_multiplex_callback_mutex_acquire(ompt_mutex_t kind, unsigned int hint, unsigned int impl, ompt_wait_id_t wait_id, const void *codeptr_ra) { if (ompt_multiplex_own_callbacks.ompt_callback_mutex_acquire) { ompt_multiplex_own_callbacks.ompt_callback_mutex_acquire( kind, hint, impl, wait_id, codeptr_ra); } if (ompt_multiplex_client_callbacks.ompt_callback_mutex_acquire) { ompt_multiplex_client_callbacks.ompt_callback_mutex_acquire( kind, hint, impl, wait_id, codeptr_ra); } } static void ompt_multiplex_callback_mutex_acquired(ompt_mutex_t kind, ompt_wait_id_t wait_id, const void *codeptr_ra) { if (ompt_multiplex_own_callbacks.ompt_callback_mutex_acquired) { ompt_multiplex_own_callbacks.ompt_callback_mutex_acquired(kind, wait_id, codeptr_ra); } if (ompt_multiplex_client_callbacks.ompt_callback_mutex_acquired) { ompt_multiplex_client_callbacks.ompt_callback_mutex_acquired(kind, wait_id, codeptr_ra); } } static void ompt_multiplex_callback_mutex_released(ompt_mutex_t kind, ompt_wait_id_t wait_id, const void *codeptr_ra) { if (ompt_multiplex_own_callbacks.ompt_callback_mutex_released) { ompt_multiplex_own_callbacks.ompt_callback_mutex_released(kind, wait_id, codeptr_ra); } if (ompt_multiplex_client_callbacks.ompt_callback_mutex_released) { ompt_multiplex_client_callbacks.ompt_callback_mutex_released(kind, wait_id, codeptr_ra); } } static void ompt_multiplex_callback_nest_lock(ompt_scope_endpoint_t endpoint, ompt_wait_id_t wait_id, const void *codeptr_ra) { if (ompt_multiplex_own_callbacks.ompt_callback_nest_lock) { ompt_multiplex_own_callbacks.ompt_callback_nest_lock(endpoint, wait_id, codeptr_ra); } if (ompt_multiplex_client_callbacks.ompt_callback_nest_lock) { ompt_multiplex_client_callbacks.ompt_callback_nest_lock(endpoint, wait_id, codeptr_ra); } } static void ompt_multiplex_callback_sync_region(ompt_sync_region_t kind, ompt_scope_endpoint_t endpoint, ompt_data_t *parallel_data, ompt_data_t *task_data, const void *codeptr_ra) { if (ompt_multiplex_own_callbacks.ompt_callback_sync_region) { ompt_multiplex_own_callbacks.ompt_callback_sync_region( kind, endpoint, ompt_multiplex_get_own_parallel_data(parallel_data), ompt_multiplex_get_own_task_data(task_data), codeptr_ra); } if (ompt_multiplex_client_callbacks.ompt_callback_sync_region) { ompt_multiplex_client_callbacks.ompt_callback_sync_region( kind, endpoint, ompt_multiplex_get_client_parallel_data(parallel_data), ompt_multiplex_get_client_task_data(task_data), codeptr_ra); } } static void ompt_multiplex_callback_sync_region_wait( ompt_sync_region_t kind, ompt_scope_endpoint_t endpoint, ompt_data_t *parallel_data, ompt_data_t *task_data, const void *codeptr_ra) { if (ompt_multiplex_own_callbacks.ompt_callback_sync_region_wait) { ompt_multiplex_own_callbacks.ompt_callback_sync_region_wait( kind, endpoint, ompt_multiplex_get_own_parallel_data(parallel_data), ompt_multiplex_get_own_task_data(task_data), codeptr_ra); } if (ompt_multiplex_client_callbacks.ompt_callback_sync_region_wait) { ompt_multiplex_client_callbacks.ompt_callback_sync_region_wait( kind, endpoint, ompt_multiplex_get_client_parallel_data(parallel_data), ompt_multiplex_get_client_task_data(task_data), codeptr_ra); } } static void ompt_multiplex_callback_flush(ompt_data_t *thread_data, const void *codeptr_ra) { if (ompt_multiplex_own_callbacks.ompt_callback_flush) { ompt_multiplex_own_callbacks.ompt_callback_flush( ompt_multiplex_get_own_thread_data(thread_data), codeptr_ra); } if (ompt_multiplex_client_callbacks.ompt_callback_flush) { ompt_multiplex_client_callbacks.ompt_callback_flush( ompt_multiplex_get_client_thread_data(thread_data), codeptr_ra); } } static void ompt_multiplex_callback_cancel(ompt_data_t *task_data, int flags, const void *codeptr_ra) { if (ompt_multiplex_own_callbacks.ompt_callback_cancel) { ompt_multiplex_own_callbacks.ompt_callback_cancel( ompt_multiplex_get_own_task_data(task_data), flags, codeptr_ra); } if (ompt_multiplex_client_callbacks.ompt_callback_cancel) { ompt_multiplex_client_callbacks.ompt_callback_cancel( ompt_multiplex_get_client_task_data(task_data), flags, codeptr_ra); } } static void ompt_multiplex_callback_implicit_task( ompt_scope_endpoint_t endpoint, ompt_data_t *parallel_data, ompt_data_t *task_data, unsigned int team_size, unsigned int thread_num, int flags) { if (endpoint == ompt_scope_begin) { #ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA ompt_multiplex_allocate_data_pair(task_data); #endif #ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA if (flags & ompt_task_initial) ompt_multiplex_allocate_data_pair(parallel_data); #endif if (ompt_multiplex_own_callbacks.ompt_callback_implicit_task) { ompt_multiplex_own_callbacks.ompt_callback_implicit_task( endpoint, ompt_multiplex_get_own_parallel_data(parallel_data), ompt_multiplex_get_own_task_data(task_data), team_size, thread_num, flags); } if (ompt_multiplex_client_callbacks.ompt_callback_implicit_task) { ompt_multiplex_client_callbacks.ompt_callback_implicit_task( endpoint, ompt_multiplex_get_client_parallel_data(parallel_data), ompt_multiplex_get_client_task_data(task_data), team_size, thread_num, flags); } } else { // defines to make sure, callbacks are called in correct order depending on // defines set by the user #if defined(OMPT_MULTIPLEX_CUSTOM_DELETE_TASK_DATA) || \ !defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA) if (ompt_multiplex_own_callbacks.ompt_callback_implicit_task) { ompt_multiplex_own_callbacks.ompt_callback_implicit_task( endpoint, ompt_multiplex_get_own_parallel_data(parallel_data), ompt_multiplex_get_own_task_data(task_data), team_size, thread_num, flags); } #endif if (ompt_multiplex_client_callbacks.ompt_callback_implicit_task) { ompt_multiplex_client_callbacks.ompt_callback_implicit_task( endpoint, ompt_multiplex_get_client_parallel_data(parallel_data), ompt_multiplex_get_client_task_data(task_data), team_size, thread_num, flags); } #if defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA) && \ !defined(OMPT_MULTIPLEX_CUSTOM_DELETE_TASK_DATA) if (ompt_multiplex_own_callbacks.ompt_callback_implicit_task) { ompt_multiplex_own_callbacks.ompt_callback_implicit_task( endpoint, ompt_multiplex_get_own_parallel_data(parallel_data), ompt_multiplex_get_own_task_data(task_data), team_size, thread_num, flags); } #endif #ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA ompt_multiplex_free_data_pair(task_data); #endif #if defined(OMPT_MULTIPLEX_CUSTOM_DELETE_PARALLEL_DATA) if (flags & ompt_task_initial) OMPT_MULTIPLEX_CUSTOM_DELETE_PARALLEL_DATA(parallel_data); #endif #if defined(OMPT_MULTIPLEX_CUSTOM_DELETE_TASK_DATA) OMPT_MULTIPLEX_CUSTOM_DELETE_TASK_DATA(task_data); #endif } } static void ompt_multiplex_callback_lock_init(ompt_mutex_t kind, unsigned int hint, unsigned int impl, ompt_wait_id_t wait_id, const void *codeptr_ra) { if (ompt_multiplex_own_callbacks.ompt_callback_lock_init) { ompt_multiplex_own_callbacks.ompt_callback_lock_init(kind, hint, impl, wait_id, codeptr_ra); } if (ompt_multiplex_client_callbacks.ompt_callback_lock_init) { ompt_multiplex_client_callbacks.ompt_callback_lock_init( kind, hint, impl, wait_id, codeptr_ra); } } static void ompt_multiplex_callback_lock_destroy(ompt_mutex_t kind, ompt_wait_id_t wait_id, const void *codeptr_ra) { if (ompt_multiplex_own_callbacks.ompt_callback_lock_destroy) { ompt_multiplex_own_callbacks.ompt_callback_lock_destroy(kind, wait_id, codeptr_ra); } if (ompt_multiplex_client_callbacks.ompt_callback_lock_destroy) { ompt_multiplex_client_callbacks.ompt_callback_lock_destroy(kind, wait_id, codeptr_ra); } } static void ompt_multiplex_callback_work(ompt_work_t wstype, ompt_scope_endpoint_t endpoint, ompt_data_t *parallel_data, ompt_data_t *task_data, uint64_t count, const void *codeptr_ra) { if (ompt_multiplex_own_callbacks.ompt_callback_work) { ompt_multiplex_own_callbacks.ompt_callback_work( wstype, endpoint, ompt_multiplex_get_own_parallel_data(parallel_data), ompt_multiplex_get_own_task_data(task_data), count, codeptr_ra); } if (ompt_multiplex_client_callbacks.ompt_callback_work) { ompt_multiplex_client_callbacks.ompt_callback_work( wstype, endpoint, ompt_multiplex_get_client_parallel_data(parallel_data), ompt_multiplex_get_client_task_data(task_data), count, codeptr_ra); } } static void ompt_multiplex_callback_masked(ompt_scope_endpoint_t endpoint, ompt_data_t *parallel_data, ompt_data_t *task_data, const void *codeptr_ra) { if (ompt_multiplex_own_callbacks.ompt_callback_masked) { ompt_multiplex_own_callbacks.ompt_callback_masked( endpoint, ompt_multiplex_get_own_parallel_data(parallel_data), ompt_multiplex_get_own_task_data(task_data), codeptr_ra); } if (ompt_multiplex_client_callbacks.ompt_callback_masked) { ompt_multiplex_client_callbacks.ompt_callback_masked( endpoint, ompt_multiplex_get_client_parallel_data(parallel_data), ompt_multiplex_get_client_task_data(task_data), codeptr_ra); } } static void ompt_multiplex_callback_parallel_begin( ompt_data_t *parent_task_data, const ompt_frame_t *parent_task_frame, ompt_data_t *parallel_data, uint32_t requested_team_size, int flag, const void *codeptr_ra) { #ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA ompt_multiplex_allocate_data_pair(parallel_data); #endif if (ompt_multiplex_own_callbacks.ompt_callback_parallel_begin) { ompt_multiplex_own_callbacks.ompt_callback_parallel_begin( ompt_multiplex_get_own_task_data(parent_task_data), parent_task_frame, ompt_multiplex_get_own_parallel_data(parallel_data), requested_team_size, flag, codeptr_ra); } if (ompt_multiplex_client_callbacks.ompt_callback_parallel_begin) { ompt_multiplex_client_callbacks.ompt_callback_parallel_begin( ompt_multiplex_get_client_task_data(parent_task_data), parent_task_frame, ompt_multiplex_get_client_parallel_data(parallel_data), requested_team_size, flag, codeptr_ra); } } static void ompt_multiplex_callback_parallel_end(ompt_data_t *parallel_data, ompt_data_t *task_data, int flag, const void *codeptr_ra) { // defines to make sure, callbacks are called in correct order depending on // defines set by the user #if defined(OMPT_MULTIPLEX_CUSTOM_DELETE_PARALLEL_DATA) || \ !defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA) if (ompt_multiplex_own_callbacks.ompt_callback_parallel_end) { ompt_multiplex_own_callbacks.ompt_callback_parallel_end( ompt_multiplex_get_own_parallel_data(parallel_data), ompt_multiplex_get_own_task_data(task_data), flag, codeptr_ra); } #endif if (ompt_multiplex_client_callbacks.ompt_callback_parallel_end) { ompt_multiplex_client_callbacks.ompt_callback_parallel_end( ompt_multiplex_get_client_parallel_data(parallel_data), ompt_multiplex_get_client_task_data(task_data), flag, codeptr_ra); } #if defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA) && \ !defined(OMPT_MULTIPLEX_CUSTOM_DELETE_PARALLEL_DATA) if (ompt_multiplex_own_callbacks.ompt_callback_parallel_end) { ompt_multiplex_own_callbacks.ompt_callback_parallel_end( ompt_multiplex_get_own_parallel_data(parallel_data), ompt_multiplex_get_own_task_data(task_data), flag, codeptr_ra); } #endif #ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA ompt_multiplex_free_data_pair(parallel_data); #endif #if defined(OMPT_MULTIPLEX_CUSTOM_DELETE_PARALLEL_DATA) OMPT_MULTIPLEX_CUSTOM_DELETE_PARALLEL_DATA(parallel_data); #endif } static void ompt_multiplex_callback_task_create( ompt_data_t *parent_task_data, const ompt_frame_t *parent_frame, ompt_data_t *new_task_data, int type, int has_dependences, const void *codeptr_ra) { #ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA ompt_multiplex_allocate_data_pair(new_task_data); #endif #ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA if (type & ompt_task_initial) { ompt_data_t *parallel_data; ompt_multiplex_get_parallel_info(0, ¶llel_data, NULL); ompt_multiplex_allocate_data_pair(parallel_data); } #endif if (ompt_multiplex_own_callbacks.ompt_callback_task_create) { ompt_multiplex_own_callbacks.ompt_callback_task_create( ompt_multiplex_get_own_task_data(parent_task_data), parent_frame, ompt_multiplex_get_own_task_data(new_task_data), type, has_dependences, codeptr_ra); } if (ompt_multiplex_client_callbacks.ompt_callback_task_create) { ompt_multiplex_client_callbacks.ompt_callback_task_create( ompt_multiplex_get_client_task_data(parent_task_data), parent_frame, ompt_multiplex_get_client_task_data(new_task_data), type, has_dependences, codeptr_ra); } } static void ompt_multiplex_callback_task_schedule(ompt_data_t *first_task_data, ompt_task_status_t prior_task_status, ompt_data_t *second_task_data) { if (prior_task_status != ompt_task_complete) { if (ompt_multiplex_own_callbacks.ompt_callback_task_schedule) { ompt_multiplex_own_callbacks.ompt_callback_task_schedule( ompt_multiplex_get_own_task_data(first_task_data), prior_task_status, ompt_multiplex_get_own_task_data(second_task_data)); } if (ompt_multiplex_client_callbacks.ompt_callback_task_schedule) { ompt_multiplex_client_callbacks.ompt_callback_task_schedule( ompt_multiplex_get_client_task_data(first_task_data), prior_task_status, ompt_multiplex_get_client_task_data(second_task_data)); } } else { // defines to make sure, callbacks are called in correct order depending on // defines set by the user #if defined(OMPT_MULTIPLEX_CUSTOM_DELETE_TASK_DATA) || \ !defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA) if (ompt_multiplex_own_callbacks.ompt_callback_task_schedule) { ompt_multiplex_own_callbacks.ompt_callback_task_schedule( ompt_multiplex_get_own_task_data(first_task_data), prior_task_status, ompt_multiplex_get_own_task_data(second_task_data)); } #endif if (ompt_multiplex_client_callbacks.ompt_callback_task_schedule) { ompt_multiplex_client_callbacks.ompt_callback_task_schedule( ompt_multiplex_get_client_task_data(first_task_data), prior_task_status, ompt_multiplex_get_client_task_data(second_task_data)); } #if defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA) && \ !defined(OMPT_MULTIPLEX_CUSTOM_DELETE_TASK_DATA) if (ompt_multiplex_own_callbacks.ompt_callback_task_schedule) { ompt_multiplex_own_callbacks.ompt_callback_task_schedule( ompt_multiplex_get_own_task_data(first_task_data), prior_task_status, ompt_multiplex_get_own_task_data(second_task_data)); } #endif #ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA ompt_multiplex_free_data_pair(first_task_data); #endif #if defined(OMPT_MULTIPLEX_CUSTOM_DELETE_TASK_DATA) OMPT_MULTIPLEX_CUSTOM_DELETE_TASK_DATA(first_task_data); #endif } } static void ompt_multiplex_callback_dependences(ompt_data_t *task_data, const ompt_dependence_t *deps, int ndeps) { if (ompt_multiplex_own_callbacks.ompt_callback_dependences) { ompt_multiplex_own_callbacks.ompt_callback_dependences( ompt_multiplex_get_own_task_data(task_data), deps, ndeps); } if (ompt_multiplex_client_callbacks.ompt_callback_dependences) { ompt_multiplex_client_callbacks.ompt_callback_dependences( ompt_multiplex_get_client_task_data(task_data), deps, ndeps); } } static void ompt_multiplex_callback_task_dependence(ompt_data_t *first_task_data, ompt_data_t *second_task_data) { if (ompt_multiplex_own_callbacks.ompt_callback_task_dependence) { ompt_multiplex_own_callbacks.ompt_callback_task_dependence( ompt_multiplex_get_own_task_data(first_task_data), ompt_multiplex_get_own_task_data(second_task_data)); } if (ompt_multiplex_client_callbacks.ompt_callback_task_dependence) { ompt_multiplex_client_callbacks.ompt_callback_task_dependence( ompt_multiplex_get_client_task_data(first_task_data), ompt_multiplex_get_client_task_data(second_task_data)); } } static void ompt_multiplex_callback_thread_begin(ompt_thread_t thread_type, ompt_data_t *thread_data) { #ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_THREAD_DATA ompt_multiplex_allocate_data_pair(thread_data); #endif if (ompt_multiplex_own_callbacks.ompt_callback_thread_begin) { ompt_multiplex_own_callbacks.ompt_callback_thread_begin( thread_type, ompt_multiplex_get_own_thread_data(thread_data)); } if (ompt_multiplex_client_callbacks.ompt_callback_thread_begin) { ompt_multiplex_client_callbacks.ompt_callback_thread_begin( thread_type, ompt_multiplex_get_client_thread_data(thread_data)); } } static void ompt_multiplex_callback_thread_end(ompt_data_t *thread_data) { // defines to make sure, callbacks are called in correct order depending on // defines set by the user #if defined(OMPT_MULTIPLEX_CUSTOM_DELETE_THREAD_DATA) || \ !defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_THREAD_DATA) if (ompt_multiplex_own_callbacks.ompt_callback_thread_end) { ompt_multiplex_own_callbacks.ompt_callback_thread_end( ompt_multiplex_get_own_thread_data(thread_data)); } #endif if (ompt_multiplex_client_callbacks.ompt_callback_thread_end) { ompt_multiplex_client_callbacks.ompt_callback_thread_end( ompt_multiplex_get_client_thread_data(thread_data)); } #if defined(OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_THREAD_DATA) && \ !defined(OMPT_MULTIPLEX_CUSTOM_DELETE_THREAD_DATA) if (ompt_multiplex_own_callbacks.ompt_callback_thread_end) { ompt_multiplex_own_callbacks.ompt_callback_thread_end( ompt_multiplex_get_own_thread_data(thread_data)); } #endif #ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_THREAD_DATA ompt_multiplex_free_data_pair(thread_data); #endif #if defined(OMPT_MULTIPLEX_CUSTOM_DELETE_THREAD_DATA) OMPT_MULTIPLEX_CUSTOM_DELETE_THREAD_DATA(thread_data); #endif } static int ompt_multiplex_callback_control_tool(uint64_t command, uint64_t modifier, void *arg, const void *codeptr_ra) { int ownRet = 0, clientRet = 0; if (ompt_multiplex_own_callbacks.ompt_callback_control_tool) { ownRet = ompt_multiplex_own_callbacks.ompt_callback_control_tool( command, modifier, arg, codeptr_ra); } if (ompt_multiplex_client_callbacks.ompt_callback_control_tool) { clientRet = ompt_multiplex_client_callbacks.ompt_callback_control_tool( command, modifier, arg, codeptr_ra); } return ownRet < clientRet ? ownRet : clientRet; } static void ompt_multiplex_callback_target( ompt_target_t kind, ompt_scope_endpoint_t endpoint, int device_num, ompt_data_t *task_data, ompt_id_t target_id, const void *codeptr_ra) { if (ompt_multiplex_own_callbacks.ompt_callback_target) { ompt_multiplex_own_callbacks.ompt_callback_target( kind, endpoint, device_num, ompt_multiplex_get_own_task_data(task_data), target_id, codeptr_ra); } if (ompt_multiplex_client_callbacks.ompt_callback_target) { ompt_multiplex_client_callbacks.ompt_callback_target( kind, endpoint, device_num, ompt_multiplex_get_client_task_data(task_data), target_id, codeptr_ra); } } static void ompt_multiplex_callback_target_data_op( ompt_id_t target_id, ompt_id_t host_op_id, ompt_target_data_op_t optype, void *src_addr, int src_device_num, void *dest_addr, int dest_device_num, size_t bytes, const void *codeptr_ra) { if (ompt_multiplex_own_callbacks.ompt_callback_target_data_op) { ompt_multiplex_own_callbacks.ompt_callback_target_data_op( target_id, host_op_id, optype, src_addr, src_device_num, dest_addr, dest_device_num, bytes, codeptr_ra); } if (ompt_multiplex_client_callbacks.ompt_callback_target_data_op) { ompt_multiplex_client_callbacks.ompt_callback_target_data_op( target_id, host_op_id, optype, src_addr, src_device_num, dest_addr, dest_device_num, bytes, codeptr_ra); } } static void ompt_multiplex_callback_target_submit(ompt_id_t target_id, ompt_id_t host_op_id, unsigned int requested_num_teams) { if (ompt_multiplex_own_callbacks.ompt_callback_target_submit) { ompt_multiplex_own_callbacks.ompt_callback_target_submit( target_id, host_op_id, requested_num_teams); } if (ompt_multiplex_client_callbacks.ompt_callback_target_submit) { ompt_multiplex_client_callbacks.ompt_callback_target_submit( target_id, host_op_id, requested_num_teams); } } static void ompt_multiplex_callback_device_initialize( int device_num, const char *type, ompt_device_t *device, ompt_function_lookup_t lookup, const char *documentation) { if (ompt_multiplex_own_callbacks.ompt_callback_device_initialize) { ompt_multiplex_own_callbacks.ompt_callback_device_initialize( device_num, type, device, lookup, documentation); } if (ompt_multiplex_client_callbacks.ompt_callback_device_initialize) { ompt_multiplex_client_callbacks.ompt_callback_device_initialize( device_num, type, device, lookup, documentation); } } static void ompt_multiplex_callback_device_finalize(int device_num) { if (ompt_multiplex_own_callbacks.ompt_callback_device_finalize) { ompt_multiplex_own_callbacks.ompt_callback_device_finalize(device_num); } if (ompt_multiplex_client_callbacks.ompt_callback_device_finalize) { ompt_multiplex_client_callbacks.ompt_callback_device_finalize(device_num); } } static void ompt_multiplex_callback_device_load(int device_num, const char *filename, int64_t offset_in_file, void *vma_in_file, size_t bytes, void *host_addr, void *device_addr, uint64_t module_id) { if (ompt_multiplex_own_callbacks.ompt_callback_device_load) { ompt_multiplex_own_callbacks.ompt_callback_device_load( device_num, filename, offset_in_file, vma_in_file, bytes, host_addr, device_addr, module_id); } if (ompt_multiplex_client_callbacks.ompt_callback_device_load) { ompt_multiplex_client_callbacks.ompt_callback_device_load( device_num, filename, offset_in_file, vma_in_file, bytes, host_addr, device_addr, module_id); } } static void ompt_multiplex_callback_device_unload(int device_num, uint64_t module_id) { if (ompt_multiplex_own_callbacks.ompt_callback_device_unload) { ompt_multiplex_own_callbacks.ompt_callback_device_unload(device_num, module_id); } if (ompt_multiplex_client_callbacks.ompt_callback_device_unload) { ompt_multiplex_client_callbacks.ompt_callback_device_unload(device_num, module_id); } } static void ompt_multiplex_callback_target_map(ompt_id_t target_id, unsigned int nitems, void **host_addr, void **device_addr, size_t *bytes, unsigned int *mapping_flags, const void *codeptr_ra) { if (ompt_multiplex_own_callbacks.ompt_callback_target_map) { ompt_multiplex_own_callbacks.ompt_callback_target_map( target_id, nitems, host_addr, device_addr, bytes, mapping_flags, codeptr_ra); } if (ompt_multiplex_client_callbacks.ompt_callback_target_map) { ompt_multiplex_client_callbacks.ompt_callback_target_map( target_id, nitems, host_addr, device_addr, bytes, mapping_flags, codeptr_ra); } } static void ompt_multiplex_callback_reduction(ompt_sync_region_t kind, ompt_scope_endpoint_t endpoint, ompt_data_t *parallel_data, ompt_data_t *task_data, const void *codeptr_ra) { if (ompt_multiplex_own_callbacks.ompt_callback_reduction) { ompt_multiplex_own_callbacks.ompt_callback_reduction( kind, endpoint, ompt_multiplex_get_own_parallel_data(parallel_data), ompt_multiplex_get_own_task_data(task_data), codeptr_ra); } if (ompt_multiplex_client_callbacks.ompt_callback_reduction) { ompt_multiplex_client_callbacks.ompt_callback_reduction( kind, endpoint, ompt_multiplex_get_client_parallel_data(parallel_data), ompt_multiplex_get_client_task_data(task_data), codeptr_ra); } } static void ompt_multiplex_callback_dispatch(ompt_data_t *parallel_data, ompt_data_t *task_data, ompt_dispatch_t kind, ompt_data_t instance) { if (ompt_multiplex_own_callbacks.ompt_callback_dispatch) { ompt_multiplex_own_callbacks.ompt_callback_dispatch( ompt_multiplex_get_own_parallel_data(parallel_data), ompt_multiplex_get_own_task_data(task_data), kind, instance); } if (ompt_multiplex_client_callbacks.ompt_callback_dispatch) { ompt_multiplex_client_callbacks.ompt_callback_dispatch( ompt_multiplex_get_client_parallel_data(parallel_data), ompt_multiplex_get_client_task_data(task_data), kind, instance); } } // runtime entry functions int ompt_multiplex_own_get_task_info(int ancestor_level, int *type, ompt_data_t **task_data, ompt_frame_t **task_frame, ompt_data_t **parallel_data, int *thread_num) { int ret = ompt_multiplex_get_task_info(ancestor_level, type, task_data, task_frame, parallel_data, thread_num); #ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA if (task_data) *task_data = ompt_multiplex_get_own_ompt_data(*task_data); #endif #ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA if (parallel_data) *parallel_data = ompt_multiplex_get_own_ompt_data(*parallel_data); #endif return ret; } int ompt_multiplex_client_get_task_info(int ancestor_level, int *type, ompt_data_t **task_data, ompt_frame_t **task_frame, ompt_data_t **parallel_data, int *thread_num) { int ret = ompt_multiplex_get_task_info(ancestor_level, type, task_data, task_frame, parallel_data, thread_num); if (task_data) #ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA *task_data = ompt_multiplex_get_client_ompt_data(*task_data); #else *task_data = OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA(*task_data); #endif if (parallel_data) #ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA *parallel_data = ompt_multiplex_get_client_ompt_data(*parallel_data); #else *parallel_data = OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA(*parallel_data); #endif return ret; } ompt_data_t *ompt_multiplex_own_get_thread_data() { ompt_data_t *ret; #ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_THREAD_DATA ret = ompt_multiplex_get_own_ompt_data(ompt_multiplex_get_thread_data()); #else ret = ompt_multiplex_get_thread_data(); #endif return ret; } ompt_data_t *ompt_multiplex_client_get_thread_data() { ompt_data_t *ret; #ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_THREAD_DATA ret = ompt_multiplex_get_client_ompt_data(ompt_multiplex_get_thread_data()); #else ret = OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_THREAD_DATA( ompt_multiplex_get_thread_data()); #endif return ret; } int ompt_multiplex_own_get_parallel_info(int ancestor_level, ompt_data_t **parallel_data, int *team_size) { int ret = ompt_multiplex_get_parallel_info(ancestor_level, parallel_data, team_size); if (parallel_data) *parallel_data = ompt_multiplex_get_own_parallel_data(*parallel_data); return ret; } int ompt_multiplex_client_get_parallel_info(int ancestor_level, ompt_data_t **parallel_data, int *team_size) { int ret = ompt_multiplex_get_parallel_info(ancestor_level, parallel_data, team_size); if (parallel_data) #ifndef OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA *parallel_data = ompt_multiplex_get_client_ompt_data(*parallel_data); #else *parallel_data = OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA(*parallel_data); #endif return ret; } OMPT_API_ROUTINE int ompt_multiplex_own_set_callback(ompt_callbacks_t which, ompt_callback_t callback) { switch (which) { #define ompt_event_macro(event_name, callback_type, event_id) \ case ompt_##event_name: \ ompt_multiplex_own_callbacks.ompt_##event_name = (callback_type)callback; \ if (ompt_multiplex_implementation_status.ompt_##event_name == -1) \ return ompt_multiplex_implementation_status.ompt_##event_name = \ ompt_multiplex_set_callback( \ ompt_##event_name, \ (ompt_callback_t)&ompt_multiplex_##event_name); \ else \ return ompt_multiplex_implementation_status.ompt_##event_name OMPT_LOAD_CLIENT_FOREACH_OMPT_EVENT(ompt_event_macro) #undef ompt_event_macro default: return ompt_set_error; } } OMPT_API_ROUTINE int ompt_multiplex_client_set_callback(ompt_callbacks_t which, ompt_callback_t callback) { switch (which) { #define ompt_event_macro(event_name, callback_type, event_id) \ case ompt_##event_name: \ ompt_multiplex_client_callbacks.ompt_##event_name = \ (callback_type)callback; \ if (ompt_multiplex_implementation_status.ompt_##event_name == -1) \ return ompt_multiplex_implementation_status.ompt_##event_name = \ ompt_multiplex_set_callback( \ ompt_##event_name, \ (ompt_callback_t)&ompt_multiplex_##event_name); \ else \ return ompt_multiplex_implementation_status.ompt_##event_name OMPT_LOAD_CLIENT_FOREACH_OMPT_EVENT(ompt_event_macro) #undef ompt_event_macro default: return ompt_set_error; } } ompt_interface_fn_t ompt_multiplex_own_lookup(const char *name) { if (!strcmp(name, "ompt_set_callback")) return (ompt_interface_fn_t)&ompt_multiplex_own_set_callback; else if (!strcmp(name, "ompt_get_task_info")) return (ompt_interface_fn_t)&ompt_multiplex_own_get_task_info; else if (!strcmp(name, "ompt_get_thread_data")) return (ompt_interface_fn_t)&ompt_multiplex_own_get_thread_data; else if (!strcmp(name, "ompt_get_parallel_info")) return (ompt_interface_fn_t)&ompt_multiplex_own_get_parallel_info; else return ompt_multiplex_lookup_function(name); } ompt_interface_fn_t ompt_multiplex_client_lookup(const char *name) { if (!strcmp(name, "ompt_set_callback")) return (ompt_interface_fn_t)&ompt_multiplex_client_set_callback; else if (!strcmp(name, "ompt_get_task_info")) return (ompt_interface_fn_t)&ompt_multiplex_client_get_task_info; else if (!strcmp(name, "ompt_get_thread_data")) return (ompt_interface_fn_t)&ompt_multiplex_client_get_thread_data; else if (!strcmp(name, "ompt_get_parallel_info")) return (ompt_interface_fn_t)&ompt_multiplex_client_get_parallel_info; else return ompt_multiplex_lookup_function(name); } int ompt_multiplex_initialize(ompt_function_lookup_t lookup, int initial_device_num, ompt_data_t *data) { ompt_multiplex_lookup_function = lookup; ompt_multiplex_set_callback = (ompt_set_callback_t)lookup("ompt_set_callback"); ompt_multiplex_get_task_info = (ompt_get_task_info_t)lookup("ompt_get_task_info"); ompt_multiplex_get_thread_data = (ompt_get_thread_data_t)lookup("ompt_get_thread_data"); ompt_multiplex_get_parallel_info = (ompt_get_parallel_info_t)lookup("ompt_get_parallel_info"); // initialize ompt_multiplex_implementation_status #define ompt_event_macro(event_name, callback_type, event_id) \ ompt_multiplex_implementation_status.ompt_##event_name = -1 OMPT_LOAD_CLIENT_FOREACH_OMPT_EVENT(ompt_event_macro) #undef ompt_event_macro int ownRet = ompt_multiplex_own_fns->initialize( ompt_multiplex_own_lookup, initial_device_num, &(ompt_multiplex_own_fns->tool_data)); int clientRet = 0; if (ompt_multiplex_client_fns) clientRet = ompt_multiplex_client_fns->initialize( ompt_multiplex_client_lookup, initial_device_num, &(ompt_multiplex_client_fns->tool_data)); return ownRet > clientRet ? ownRet : clientRet; } void ompt_multiplex_finalize(ompt_data_t *fns) { if (ompt_multiplex_client_fns) ompt_multiplex_client_fns->finalize( &(ompt_multiplex_client_fns->tool_data)); ompt_multiplex_own_fns->finalize(&(ompt_multiplex_own_fns->tool_data)); } #ifdef __cplusplus extern "C" { #endif // forward declaration because of name shifting from ompt_start_tool // to ompt_multiplex_own_start_tool below ompt_start_tool_result_t * ompt_multiplex_own_start_tool(unsigned int omp_version, const char *runtime_version); ompt_start_tool_result_t *ompt_start_tool(unsigned int omp_version, const char *runtime_version) { setup_verbose_init(); OMPT_VERBOSE_INIT_PRINT( "----- START LOGGING OF CLIENT TOOL REGISTRATION -----\n"); // try loading client tool OMPT_VERBOSE_INIT_PRINT("Search for " CLIENT_TOOL_LIBRARIES_VAR " env var... "); const char *tool_libs = getenv(CLIENT_TOOL_LIBRARIES_VAR); if (tool_libs) { OMPT_VERBOSE_INIT_CONTINUED_PRINT("Sucess.\n"); OMPT_VERBOSE_INIT_PRINT(CLIENT_TOOL_LIBRARIES_VAR " = %s\n", tool_libs); // copy environement variable char *tool_libs_buffer = strdup(tool_libs); if (!tool_libs_buffer) { printf("strdup Error (%i)\n", errno); exit(-1); } int progress = 0; // Reset dl-error dlerror(); while (progress < strlen(tool_libs)) { ompt_multiplex_client_fns = NULL; ompt_start_tool_result_t *(*client_start_tool)(unsigned int, const char *) = NULL; OMPT_VERBOSE_INIT_PRINT( "Look for candidates within " CLIENT_TOOL_LIBRARIES_VAR "...\n"); int tmp_progress = progress; while (tmp_progress < strlen(tool_libs) && tool_libs_buffer[tmp_progress] != ':') tmp_progress++; if (tmp_progress < strlen(tool_libs)) tool_libs_buffer[tmp_progress] = 0; OMPT_VERBOSE_INIT_PRINT("Try out one candidate...\n"); char *fname = tool_libs_buffer + progress; OMPT_VERBOSE_INIT_PRINT("Opening %s... ", fname); void *h = dlopen(fname, RTLD_LAZY); if (h) { client_start_tool = (ompt_start_tool_result_t * (*)(unsigned int, const char *)) dlsym(h, "ompt_start_tool"); if (client_start_tool && (ompt_multiplex_client_fns = (*client_start_tool)(omp_version, runtime_version))) { OMPT_VERBOSE_INIT_CONTINUED_PRINT("Sucess.\n"); OMPT_VERBOSE_INIT_PRINT( "Tool was started and is using the OMPT interface.\n"); break; } else { OMPT_VERBOSE_INIT_CONTINUED_PRINT( "Failed: client_start_tool = %p, ompt_multiplex_client_fns = %p, " "%s\n", client_start_tool, ompt_multiplex_client_fns, dlerror()); } } else { OMPT_VERBOSE_INIT_CONTINUED_PRINT("Failed: %s\n", dlerror()); printf("Loading %s from %s failed with: %s\n", tool_libs_buffer + progress, CLIENT_TOOL_LIBRARIES_VAR, dlerror()); } progress = tmp_progress + 1; } free(tool_libs_buffer); OMPT_VERBOSE_INIT_PRINT( "----- END LOGGING OF CLIENT TOOL REGISTRATION -----\n"); } // load own tool OMPT_VERBOSE_INIT_PRINT( "----- START LOGGING OF OWN TOOL REGISTRATION -----\n"); ompt_multiplex_own_fns = ompt_multiplex_own_start_tool(omp_version, runtime_version); OMPT_VERBOSE_INIT_PRINT("ompt_multiplex_own_fns = %p\n", ompt_multiplex_own_fns); OMPT_VERBOSE_INIT_PRINT("----- END LOGGING OF OWN TOOL REGISTRATION -----\n"); // return multiplexed versions static ompt_start_tool_result_t ompt_start_tool_result = { &ompt_multiplex_initialize, &ompt_multiplex_finalize, {0}}; if (verbose_init && verbose_file != stderr && verbose_file != stdout) fclose(verbose_file); if (!ompt_multiplex_client_fns) return ompt_multiplex_own_fns; if (!ompt_multiplex_own_fns) return ompt_multiplex_client_fns; return &ompt_start_tool_result; } #ifdef __cplusplus } #endif // We rename the ompt_start_tool function of the OMPT tool and call the // renamed function from the ompt_start_tool function defined above. #define ompt_start_tool ompt_multiplex_own_start_tool #endif /* OMPT_MULTIPLEX_H */