forked from llnl/wrap
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFAQ
More file actions
17 lines (11 loc) · 652 Bytes
/
FAQ
File metadata and controls
17 lines (11 loc) · 652 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Q: I'm compiling a shared library to be used for the NAS Parallel
Benchmarks. What do I do?
A: This works:
./wrap.py -f -g -o end2end.c end2end.w
mpicc -DPIC -fPIC -I.. -DARCH_SANDY_BRIDGE -DARCH_062D -c end2end.c
mpicc -shared -Wl,-soname,libend2end.so -o ../lib/libend2end.so ../msr_core.o ../msr_rapl.o ../blr_util.o end2end.o
mpicc -L../lib -o harness.end2end harness.c -lend2end
Items of interest:
1) The flags to wrap.py will generate fortran wrappers and well as re-entry guards.
2) DPIC must be used along with fPIC.
3) The above relies on LD_LIBRARY_PATH being correct and it probably shouldn't.