Changeset 4010


Ignore:
Timestamp:
Sep 12, 2019 9:58:57 AM (4 weeks ago)
Author:
stefan
Message:

enable openmp, if available

Location:
ThirdParty/Mumps/branches/mumps5
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ThirdParty/Mumps/branches/mumps5/Makefile.in

    r4008 r4010  
    412412OBJDUMP = @OBJDUMP@
    413413OBJEXT = @OBJEXT@
     414OPENMP_FCFLAGS = @OPENMP_FCFLAGS@
    414415OTOOL = @OTOOL@
    415416OTOOL64 = @OTOOL64@
  • ThirdParty/Mumps/branches/mumps5/configure

    r4008 r4010  
    661661MUMPS_CFLAGS
    662662MY_DEFS
     663OPENMP_FCFLAGS
    663664FCLIBS
    664665LT_LDFLAGS
     
    802803enable_libtool_lock
    803804enable_pthread_mumps
     805enable_openmp
    804806with_lapack
    805807with_lapack_lflags
     
    14591461  --disable-libtool-lock  avoid locking (might break parallel builds)
    14601462  --disable-pthread-mumps disable use of pthread library
     1463  --disable-openmp        do not use OpenMP
    14611464
    14621465Optional Packages:
     
    1680016803fi
    1680116804
     16805# Mumps can use OpenMP
     16806ac_ext=${ac_fc_srcext-f}
     16807ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
     16808ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
     16809ac_compiler_gnu=$ac_cv_fc_compiler_gnu
     16810
     16811
     16812  OPENMP_FCFLAGS=
     16813  # Check whether --enable-openmp was given.
     16814if test "${enable_openmp+set}" = set; then :
     16815  enableval=$enable_openmp;
     16816fi
     16817
     16818  if test "$enable_openmp" != no; then
     16819    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $FC option to support OpenMP" >&5
     16820$as_echo_n "checking for $FC option to support OpenMP... " >&6; }
     16821if ${ac_cv_prog_fc_openmp+:} false; then :
     16822  $as_echo_n "(cached) " >&6
     16823else
     16824  cat > conftest.$ac_ext <<_ACEOF
     16825
     16826      program main
     16827      implicit none
     16828!$    integer tid
     16829      tid = 42
     16830      call omp_set_num_threads(2)
     16831      end
     16832
     16833_ACEOF
     16834if ac_fn_fc_try_link "$LINENO"; then :
     16835  ac_cv_prog_fc_openmp='none needed'
     16836else
     16837  ac_cv_prog_fc_openmp='unsupported'
     16838                                                                                                                                          for ac_option in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp -homp \
     16839                           -Popenmp --openmp; do
     16840            ac_save_FCFLAGS=$FCFLAGS
     16841            FCFLAGS="$FCFLAGS $ac_option"
     16842            cat > conftest.$ac_ext <<_ACEOF
     16843
     16844      program main
     16845      implicit none
     16846!$    integer tid
     16847      tid = 42
     16848      call omp_set_num_threads(2)
     16849      end
     16850
     16851_ACEOF
     16852if ac_fn_fc_try_link "$LINENO"; then :
     16853  ac_cv_prog_fc_openmp=$ac_option
     16854fi
     16855rm -f core conftest.err conftest.$ac_objext \
     16856    conftest$ac_exeext conftest.$ac_ext
     16857            FCFLAGS=$ac_save_FCFLAGS
     16858            if test "$ac_cv_prog_fc_openmp" != unsupported; then
     16859              break
     16860            fi
     16861          done
     16862fi
     16863rm -f core conftest.err conftest.$ac_objext \
     16864    conftest$ac_exeext conftest.$ac_ext
     16865fi
     16866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_openmp" >&5
     16867$as_echo "$ac_cv_prog_fc_openmp" >&6; }
     16868    case $ac_cv_prog_fc_openmp in #(
     16869      "none needed" | unsupported)
     16870        ;; #(
     16871      *)
     16872        OPENMP_FCFLAGS=$ac_cv_prog_fc_openmp ;;
     16873    esac
     16874  fi
     16875
     16876
     16877FCFLAGS="$FCFLAGS $OPENMP_FCFLAGS"
     16878MUMPS_LFLAGS="$MUMPS_LFLAGS $OPENMP_FCFLAGS"
     16879ac_ext=c
     16880ac_cpp='$CPP $CPPFLAGS'
     16881ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     16882ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     16883ac_compiler_gnu=$ac_cv_c_compiler_gnu
     16884
     16885
    1680216886MY_DEFS="$MY_DEFS -DMUMPS_ARITH=MUMPS_ARITH_d"
    1680316887
     
    1805518139
    1805618140
    18057 # If the BLAS library includes the GEMMT level-3 BLAS extension, it is strongly recommend to use it.
     18141# if the BLAS library includes the GEMMT level-3 BLAS extension, it is strongly recommend to use it
    1805818142
    1805918143  # setup LIBS by adding $lapack_lflags and those from $lapack_pcfiles
  • ThirdParty/Mumps/branches/mumps5/configure.ac

    r4008 r4010  
    7373fi
    7474
     75# Mumps can use OpenMP
     76AC_LANG_PUSH(Fortran)
     77AC_OPENMP
     78FCFLAGS="$FCFLAGS $OPENMP_FCFLAGS"
     79MUMPS_LFLAGS="$MUMPS_LFLAGS $OPENMP_FCFLAGS"
     80AC_LANG_POP(Fortran)
     81
    7582MY_DEFS="$MY_DEFS -DMUMPS_ARITH=MUMPS_ARITH_d"
    7683AC_SUBST(MY_DEFS)
     
    7885AC_COIN_CHK_LAPACK(MUMPS)
    7986
    80 # If the BLAS library includes the GEMMT level-3 BLAS extension, it is strongly recommend to use it.
     87# if the BLAS library includes the GEMMT level-3 BLAS extension, it is strongly recommend to use it
    8188AC_COIN_TRY_LINK([dgemmt],[$lapack_lflags],[$lapack_pcfiles],[MY_FDEFS="$MY_FDEFS -DGEMMT_AVAILABLE"])
    8289
Note: See TracChangeset for help on using the changeset viewer.