|
From: Floyd, P. <pj...@wa...> - 2022-05-10 12:52:57
|
Hi I'm trying to work out the purpose of this script and how to get it to work correctly with clang-built systems. drd/tests/run_openmp_test script gets a list of dynamic libraries linked to the omp test application (e.g., omp_matinv). It then filters for libgomp.so and runs nm to try to determine if it can find gomp_barrier_init. On RHEL 7 nm says 'no symbols' so the test does not run under regtest. If I run it by hand it generates a load of spurious errors. So it looks like the script does its job correctly. At home on Fedora 34, iirc there are symbols and the test runs under regtest. On FreeBSD things are a bit messier. For a start, the script only handles Linux. For other OSes it just falls off the end (which is the equivalent of saying "OK"). Normallly I run tests built with clang, and we don't yet support the clang omp primitives so again there is a shower of errors. Now for the bit that I don't really understand. If I build everything with GCC on FreeBSD, the DRD OMP tests pass, but libgomp.so doesn't have symbols. Is the test for gomp_barrier_init really only required for Linux? I don't know if GCC on FreeBSD has an equivalent option (which would be for _umtx_op). What I'm thinking of doing is the rather simpler if [ "$(uname)" = FreeBSD ]; then ldd "$1" | grep libgomp > /dev/null exit $? fi The above change shouldn't impact Linux so I'll test and push it if it's good. A+ Paul |