Skip to content

Commit 645eabe

Browse files
committed
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.
1 parent ef015a6 commit 645eabe

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

utest/Makefile

+1-4
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ endif
2626
#this does not work with OpenMP nor with native Windows or Android threads
2727
# FIXME TBD if this works on OSX, SunOS, POWER and zarch
2828
ifeq ($(OSNAME), $(filter $(OSNAME),Linux CYGWIN_NT))
29-
ifneq ($(USE_OPENMP), 1)
30-
OBJS += test_fork.o
31-
endif
32-
OBJS += test_post_fork.o
29+
OBJS += test_fork.o test_post_fork.o
3330
endif
3431

3532
ifeq ($(C_COMPILER), PGI)

utest/test_fork.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static void check_dgemm(double *a, double *b, double *result, double *expected,
6464

6565
CTEST(fork, safety)
6666
{
67-
#ifndef BUILD_DOUBLE
67+
#if !defined(BUILD_DOUBLE) || (defined(_OPENMP) && _OPENMP < 201811)
6868
exit(0);
6969
#else
7070
blasint n = 1000;

0 commit comments

Comments
 (0)