@@ -842,6 +842,7 @@ ax_pthread_config
842842OPENMP_CXXFLAGS
843843OPENMP_FFLAGS
844844OPENMP_CFLAGS
845+ NVTX_INCLUDE
845846TPETRA_INCLUDES
846847TPETRA_LIBS
847848ML_INCLUDES
@@ -1275,6 +1276,8 @@ with_nox
12751276with_ml
12761277with_tpetra
12771278with_dtk
1279+ enable_nvtx
1280+ with_nvtx
12781281with_thread_model
12791282enable_openmp
12801283enable_pthreads
@@ -2101,6 +2104,7 @@ Optional Features:
21012104 configure
21022105 --disable-slepc build without SLEPc eigen solver support
21032106 --disable-trilinos build without Trilinos support
2107+ --disable-nvtx build without annotation support via NVTX
21042108 --disable-openmp build without OpenMP support
21052109 --disable-pthreads build without POSIX threading (pthreads) support
21062110 --disable-tbb build without threading support via Threading
@@ -2222,6 +2226,7 @@ Optional Packages:
22222226 --with-ml=PATH Specify the path to ML installation
22232227 --with-tpetra=PATH Specify the path to Tpetra installation
22242228 --with-dtk=PATH Specify the path to Dtk installation
2229+ --with-nvtx=PATH Specify the path where NVTX is installed
22252230 --with-thread-model=tbb,pthread,openmp,auto,none
22262231 Specify the thread model to use
22272232 --with-tbb=PATH Specify the path where Threading Building Blocks is
@@ -56275,6 +56280,149 @@ fi
5627556280# -------------------------------------------------------------
5627656281
5627756282
56283+ # -------------------------------------------------------------
56284+ # NVTX -- enabled by default
56285+ # -------------------------------------------------------------
56286+
56287+ # Check whether --enable-nvtx was given.
56288+ if test ${enable_nvtx+y}
56289+ then :
56290+ enableval=$enable_nvtx; case "${enableval}" in #(
56291+ yes) :
56292+ enablenvtx=yes ;; #(
56293+ no) :
56294+ enablenvtx=no ;; #(
56295+ *) :
56296+ as_fn_error $? "bad value ${enableval} for --enable-nvtx" "$LINENO" 5 ;;
56297+ esac
56298+ else case e in #(
56299+ e) enablenvtx=$enableoptional ;;
56300+ esac
56301+ fi
56302+
56303+
56304+ if test "x$enablenvtx" = "xyes"
56305+ then :
56306+
56307+
56308+ # Check whether --with-nvtx was given.
56309+ if test ${with_nvtx+y}
56310+ then :
56311+ withval=$with_nvtx; withnvtx=$withval
56312+ else case e in #(
56313+ e) withnvtx=$NVTX_DIR ;;
56314+ esac
56315+ fi
56316+
56317+
56318+ if test "$withnvtx" != no
56319+ then :
56320+
56321+ if test "x$withnvtx" = "x"
56322+ then :
56323+ withnvtx=/usr
56324+ fi
56325+ as_ac_Header=`printf "%s\n" "ac_cv_header_$withnvtx/include/nvtx3/nvtx3.hpp" | sed "$as_sed_sh"`
56326+ ac_fn_cxx_check_header_compile "$LINENO" "$withnvtx/include/nvtx3/nvtx3.hpp" "$as_ac_Header" "$ac_includes_default"
56327+ if eval test \"x\$"$as_ac_Header"\" = x"yes"
56328+ then :
56329+ NVTX_INCLUDE_PATH=$withnvtx/include
56330+ fi
56331+
56332+
56333+ fi
56334+
56335+ if test -r $NVTX_INCLUDE_PATH/nvtx3/nvtx3.hpp
56336+ then :
56337+
56338+ NVTX_INCLUDE=-I$NVTX_INCLUDE_PATH
56339+
56340+ else case e in #(
56341+ e) enablenvtx=no ;;
56342+ esac
56343+ fi
56344+
56345+ if test "x$enablenvtx" != "xno"
56346+ then :
56347+
56348+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nvtx3::mark support" >&5
56349+ printf %s "checking for nvtx3::mark support... " >&6; }
56350+ ac_ext=cpp
56351+ ac_cpp='$CXXCPP $CPPFLAGS'
56352+ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56353+ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56354+ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56355+
56356+
56357+ saveCXXFLAGS="$CXXFLAGS"
56358+ CXXFLAGS="$saveCXXFLAGS $NVTX_INCLUDE"
56359+
56360+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56361+ /* end confdefs.h. */
56362+
56363+ #include <nvtx3/nvtx3.hpp>
56364+
56365+ int
56366+ main (void)
56367+ {
56368+
56369+ nvtx3::mark("Hello world!");
56370+
56371+ ;
56372+ return 0;
56373+ }
56374+ _ACEOF
56375+ if ac_fn_cxx_try_compile "$LINENO"
56376+ then :
56377+
56378+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56379+ printf "%s\n" "yes" >&6; }
56380+ enablenvtx=yes
56381+
56382+ else case e in #(
56383+ e)
56384+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
56385+ printf "%s\n" "no" >&6; }
56386+ enablenvtx=no
56387+ ;;
56388+ esac
56389+ fi
56390+ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
56391+
56392+ CXXFLAGS=$saveCXXFLAGS
56393+
56394+ ac_ext=cpp
56395+ ac_cpp='$CXXCPP $CPPFLAGS'
56396+ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56397+ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56398+ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56399+
56400+
56401+ fi
56402+
56403+ if test "x$enablenvtx" != "xno"
56404+ then :
56405+
56406+
56407+
56408+ printf "%s\n" "#define HAVE_NVTX_API 1" >>confdefs.h
56409+
56410+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <<< Configuring library with NVTX annotation support >>>" >&5
56411+ printf "%s\n" "<<< Configuring library with NVTX annotation support >>>" >&6; }
56412+
56413+ fi
56414+
56415+ fi
56416+
56417+ if test "$enablenvtx" = yes
56418+ then :
56419+
56420+ libmesh_optional_INCLUDES="$NVTX_INCLUDE $libmesh_optional_INCLUDES"
56421+
56422+ fi
56423+ # --------------------------------------------------------------
56424+
56425+
5627856426# -------------------------------------------------------------
5627956427# Choose between TBB, OpenMP, and pthreads thread models.
5628056428# The user can control this by configuring with
@@ -68264,6 +68412,7 @@ then :
6826468412fi
6826568413 printf "%s\n" " netgen........................... : $enablenetgen"
6826668414 printf "%s\n" " nlopt............................ : $enablenlopt"
68415+ printf "%s\n" " nvtx............................. : $enablenvtx"
6826768416 printf "%s\n" " parmetis......................... : $enableparmetis"
6826868417 printf "%s\n" " petsc............................ : $enablepetsc"
6826968418 if test "x$enablepetsc" = "xyes"
0 commit comments