utest: test fork safety on OpenMP >= 5

In addition to testing fork safety on non-OpenMP builds, test it on
OpenMP >= 5.0, where we get the ability to release the locks at fork()
time.
This commit is contained in:
Ivan K 2023-06-10 21:20:58 +03:00
parent ef015a6830
commit 645eabe67f
2 changed files with 2 additions and 5 deletions

View File

@ -26,10 +26,7 @@ endif
#this does not work with OpenMP nor with native Windows or Android threads
# FIXME TBD if this works on OSX, SunOS, POWER and zarch
ifeq ($(OSNAME), $(filter $(OSNAME),Linux CYGWIN_NT))
ifneq ($(USE_OPENMP), 1)
OBJS += test_fork.o
endif
OBJS += test_post_fork.o
OBJS += test_fork.o test_post_fork.o
endif
ifeq ($(C_COMPILER), PGI)

View File

@ -64,7 +64,7 @@ static void check_dgemm(double *a, double *b, double *result, double *expected,
CTEST(fork, safety)
{
#ifndef BUILD_DOUBLE
#if !defined(BUILD_DOUBLE) || (defined(_OPENMP) && _OPENMP < 201811)
exit(0);
#else
blasint n = 1000;