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 412412
413413[ " $USE_OPENMP " != 1 ] && openmp=' '
414414
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+
415423linker_L=" "
416424linker_l=" "
417425linker_a=" "
501509 [ " $oldgcc " -eq 1 ] && printf " OLDGCC=1\n"
502510 [ " $no_lsx " -eq 1 ] && printf " NO_LSX=1\n"
503511 [ " $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"
504513} >> " $makefile "
505514
506515os=` echo " $os " | tr ' [[:lower:]]' ' [[:upper:]]' / `
@@ -518,6 +527,7 @@ compiler=`echo "$compiler" | tr '[[:lower:]]' '[[:upper:]]' `
518527 [ " $c11_atomics " -eq 1 ] && printf " #define HAVE_C11\t1\n"
519528 [ " $no_lsx " -eq 1 ] && printf " #define NO_LSX\t1\n"
520529 [ " $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"
521531} >> " $config "
522532
523533
Original file line number Diff line number Diff line change 394394
395395$openmp = " " if $ENV {USE_OPENMP } != 1;
396396
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+
397405$linker_L = " " ;
398406$linker_l = " " ;
399407$linker_a = " " ;
472480print MAKEFILE " OLDGCC=1\n " if $oldgcc eq 1;
473481print MAKEFILE " NO_LSX=1\n " if $no_lsx eq 1;
474482print 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;
475484
476485$os =~ tr / [a-z]/ [A-Z]/ ;
477486$architecture =~ tr / [a-z]/ [A-Z]/ ;
487496print CONFFILE " #define HAVE_C11\t 1\n " if $c11_atomics eq 1;
488497print CONFFILE " #define NO_LSX\t 1\n " if $no_lsx eq 1;
489498print 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;
490500
491501
492502if ($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