File tree Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 412
412
413
413
[ " $USE_OPENMP " != 1 ] && openmp=' '
414
414
415
+ have_omp_pause_resource_all=0
416
+ if [ " $USE_OPENMP " = 1 ]; then
417
+ if $compiler_name $flags $openmp -o ctest3 ctest3.c; then
418
+ have_omp_pause_resource_all=1
419
+ fi
420
+ rm -f ctest3.o ctest3 ctest3.exe
421
+ fi
422
+
415
423
linker_L=" "
416
424
linker_l=" "
417
425
linker_a=" "
501
509
[ " $oldgcc " -eq 1 ] && printf " OLDGCC=1\n"
502
510
[ " $no_lsx " -eq 1 ] && printf " NO_LSX=1\n"
503
511
[ " $no_lasx " -eq 1 ] && printf " NO_LASX=1\n"
512
+ [ " $have_omp_pause_resource_all " -eq 1 ] && printf " HAVE_OMP_PAUSE_RESOURCE_ALL=1\n"
504
513
} >> " $makefile "
505
514
506
515
os=` echo " $os " | tr ' [[:lower:]]' ' [[:upper:]]' / `
@@ -518,6 +527,7 @@ compiler=`echo "$compiler" | tr '[[:lower:]]' '[[:upper:]]' `
518
527
[ " $c11_atomics " -eq 1 ] && printf " #define HAVE_C11\t1\n"
519
528
[ " $no_lsx " -eq 1 ] && printf " #define NO_LSX\t1\n"
520
529
[ " $no_lasx " -eq 1 ] && printf " #define NO_LASX\t1\n"
530
+ [ " $have_omp_pause_resource_all " -eq 1 ] && printf " #define HAVE_OMP_PAUSE_RESOURCE_ALL\t1\n"
521
531
} >> " $config "
522
532
523
533
Original file line number Diff line number Diff line change 394
394
395
395
$openmp = " " if $ENV {USE_OPENMP } != 1;
396
396
397
+ $have_omp_pause_resource_all =0;
398
+ if ($ENV {USE_OPENMP } == 1) {
399
+ if (system (" $compiler_name $flags $openmp -o ctest3 ctest3.c" ) == 0) {
400
+ $have_omp_pause_resource_all =1;
401
+ }
402
+ unlink " ctest3.o" , " ctest3" , " ctest3.exe" ;
403
+ }
404
+
397
405
$linker_L = " " ;
398
406
$linker_l = " " ;
399
407
$linker_a = " " ;
472
480
print MAKEFILE " OLDGCC=1\n " if $oldgcc eq 1;
473
481
print MAKEFILE " NO_LSX=1\n " if $no_lsx eq 1;
474
482
print MAKEFILE " NO_LASX=1\n " if $no_lasx eq 1;
483
+ print MAKEFILE " HAVE_OMP_PAUSE_RESOURCE_ALL=1\n " if $have_omp_pause_resource_all eq 1;
475
484
476
485
$os =~ tr / [a-z]/ [A-Z]/ ;
477
486
$architecture =~ tr / [a-z]/ [A-Z]/ ;
487
496
print CONFFILE " #define HAVE_C11\t 1\n " if $c11_atomics eq 1;
488
497
print CONFFILE " #define NO_LSX\t 1\n " if $no_lsx eq 1;
489
498
print CONFFILE " #define NO_LASX\t 1\n " if $no_lasx eq 1;
499
+ print CONFFILE " #define HAVE_OMP_PAUSE_RESOURCE_ALL\t 1\n " if $have_omp_pause_resource_all eq 1;
490
500
491
501
492
502
if ($os eq " LINUX" ) {
Original file line number Diff line number Diff line change
1
+ #include <omp.h>
2
+ int main (void ) { return omp_pause_resource_all (omp_pause_hard ); }
You can’t perform that action at this time.
0 commit comments