Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dune-fem-dg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dune-fem
dune-fem-dg
Commits
c9451e31
Commit
c9451e31
authored
11 years ago
by
Robert Kloefkorn
Browse files
Options
Downloads
Patches
Plain Diff
added check for bgq l1 prefetch library.
parent
e0e1a4a4
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
m4/Makefile.am
+1
-1
1 addition, 1 deletion
m4/Makefile.am
m4/bgq_l1prefetch.m4
+105
-0
105 additions, 0 deletions
m4/bgq_l1prefetch.m4
m4/dune-fem-dg.m4
+3
-1
3 additions, 1 deletion
m4/dune-fem-dg.m4
with
109 additions
and
2 deletions
m4/Makefile.am
+
1
−
1
View file @
c9451e31
M4FILES
=
dune-fem-dg.m4
M4FILES
=
dune-fem-dg.m4
bgq_l1prefetch.m4
aclocaldir
=
$(
datadir
)
/aclocal
aclocal_DATA
=
$(
M4FILES
)
...
...
This diff is collapsed.
Click to expand it.
m4/bgq_l1prefetch.m4
0 → 100644
+
105
−
0
View file @
c9451e31
# searches for bgq_l1prefetch-headers and libs
AC_DEFUN([DUNE_PATH_BGQ_L1PREFETCH],[
AC_REQUIRE([AC_PROG_CC])
AC_ARG_WITH(bgq_l1prefetch,
AC_HELP_STRING([--with-bgq_l1prefetch=PATH],[directory with BGQ_L1PREFETCH inside]))
# store old values
ac_save_LDFLAGS="$LDFLAGS"
ac_save_CPPFLAGS="$CPPFLAGS"
ac_save_LIBS="$LIBS"
BGQ_L1PREFETCHYES=0
## do nothing if no --with-bgq_l1prefetch was supplied
if test x$with_bgq_l1prefetch != x && test x$with_bgq_l1prefetch != xno ; then
BGQ_L1PREFETCHYES=1
fi
if test x$BGQ_L1PREFETCHYES = x1 ; then
# is --with-bgq_l1prefetch=bla used?
if test "x$with_bgq_l1prefetch" != x ; then
BGQ_L1PREFETCHROOT=`cd $with_bgq_l1prefetch && pwd`
if ! test -d $BGQ_L1PREFETCHROOT; then
AC_MSG_WARN([BGQ_L1PREFETCH directory $with_bgq_l1prefetch does not exist])
fi
if test "x$BGQ_L1PREFETCHROOT" = x; then
# use some default value...
BGQ_L1PREFETCHROOT="/usr/local/bgq_l1prefetch"
fi
BGQ_L1PREFETCH_LIB_PATH="$BGQ_L1PREFETCHROOT/lib"
BGQ_L1PREFETCH_INCLUDE_PATH="$BGQ_L1PREFETCHROOT/include"
fi
# set variables so that tests can use them
REM_CPPFLAGS=$CPPFLAGS
LDFLAGS="$LDFLAGS -L$BGQ_L1PREFETCH_LIB_PATH"
BGQ_L1PREFETCH_INC_FLAG="-I$BGQ_L1PREFETCH_INCLUDE_PATH -DENABLE_BGQ_L1PREFETCH=1"
CPPFLAGS="$CPPFLAGS $BGQ_L1PREFETCH_INC_FLAG"
# check for header
AC_LANG_PUSH([C])
AC_CHECK_HEADERS([l1p/pprefetch.h],
[BGQ_L1PREFETCH_CPPFLAGS="$BGQ_L1PREFETCH_INC_FLAG"
HAVE_BGQ_L1PREFETCH="1"],
AC_MSG_WARN([pprefetch.h not found in $BGQ_L1PREFETCH_INCLUDE_PATH]))
CPPFLAGS="$REM_CPPFLAGS"
REM_CPPFLAGS=
REM_LDFLAGS=$LDFLAGS
# if header is found...
if test x$HAVE_BGQ_L1PREFETCH = x1 ; then
LIBNAME="SPI_l1p"
AC_CHECK_LIB($LIBNAME,[BGQ_L1PREFETCH_flops],
[BGQ_L1PREFETCH_LIBS="-l$LIBNAME"
BGQ_L1PREFETCH_LDFLAGS="-L$BGQ_L1PREFETCH_LIB_PATH"],
[HAVE_BGQ_L1PREFETCH="0"
AC_MSG_WARN(lib$LIBNAME not found!)])
fi
LDFLAGS=$REM_LDFLAGS
AC_LANG_POP
fi
# survived all tests?
if test x$HAVE_BGQ_L1PREFETCH = x1 ; then
AC_SUBST(BGQ_L1PREFETCH_LIBS, $BGQ_L1PREFETCH_LIBS)
AC_SUBST(BGQ_L1PREFETCH_LDFLAGS, $BGQ_L1PREFETCH_LDFLAGS)
AC_SUBST(BGQ_L1PREFETCH_CPPFLAGS, $BGQ_L1PREFETCH_CPPFLAGS)
AC_DEFINE(HAVE_BGQ_L1PREFETCH, ENABLE_BGQ_L1PREFETCH,
[This is only true if bgq_l1prefetch-library was found by configure
_and_ if the application uses the BGQ_L1PREFETCH_CPPFLAGS])
# add to global list
DUNE_ADD_ALL_PKG([BGQ_L1PREFETCH], [\${BGQ_L1PREFETCH_CPPFLAGS}],
[\${BGQ_L1PREFETCH_LDFLAGS}], [\${BGQ_L1PREFETCH_LIBS}])
# set variable for summary
with_bgq_l1prefetch="yes"
else
AC_SUBST(BGQ_L1PREFETCH_LIBS, "")
AC_SUBST(BGQ_L1PREFETCH_LDFLAGS, "")
AC_SUBST(BGQ_L1PREFETCH_CPPFLAGS, "")
# set variable for summary
with_bgq_l1prefetch="no"
fi
# also tell automake
AM_CONDITIONAL(BGQ_L1PREFETCH, test x$HAVE_BGQ_L1PREFETCH = x1)
# reset old values
LIBS="$ac_save_LIBS"
CPPFLAGS="$ac_save_CPPFLAGS"
LDFLAGS="$ac_save_LDFLAGS"
DUNE_ADD_SUMMARY_ENTRY([BGQ_L1PREFETCH],[$with_bgq_l1prefetch])
])
This diff is collapsed.
Click to expand it.
m4/dune-fem-dg.m4
+
3
−
1
View file @
c9451e31
...
...
@@ -6,7 +6,9 @@ dnl -*- autoconf -*-
# Additional checks needed to build dune-fem-dg
# This macro should be invoked by every module which depends on dune-fem-dg, as
# well as by dune-fem-dg itself
AC_DEFUN([DUNE_FEM_DG_CHECKS])
AC_DEFUN([DUNE_FEM_DG_CHECKS],[
AC_REQUIRE([DUNE_PATH_BGQ_L1PREFETCH])
])
# Additional checks needed to find dune-fem-dg
# This macro should be invoked by every module which depends on dune-fem-dg, but
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment