Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
SWIFT
SWIFTsim
Commits
9e4ad79c
Commit
9e4ad79c
authored
8 years ago
by
Peter W. Draper
Browse files
Options
Downloads
Plain Diff
Merge branch 'autotools-update' into 'master'
Add support for jemalloc Since it is available. See merge request
!295
parents
2ab1e4d0
1044f78e
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!295
Add support for jemalloc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
configure.ac
+36
-3
36 additions, 3 deletions
configure.ac
examples/Makefile.am
+1
-1
1 addition, 1 deletion
examples/Makefile.am
src/Makefile.am
+1
-1
1 addition, 1 deletion
src/Makefile.am
with
38 additions
and
5 deletions
configure.ac
+
36
−
3
View file @
9e4ad79c
...
...
@@ -351,7 +351,7 @@ AC_ARG_WITH([tcmalloc],
[with_tcmalloc="no"]
)
if test "x$with_tcmalloc" != "xno"; then
if test "x$with_tcmalloc" != "xyes"
&& test
"x$with_tcmalloc" != "x"; then
if test "x$with_tcmalloc" != "xyes"
-a
"x$with_tcmalloc" != "x"; then
tclibs="-L$with_tcmalloc -ltcmalloc"
else
tclibs="-ltcmalloc"
...
...
@@ -361,7 +361,7 @@ if test "x$with_tcmalloc" != "xno"; then
# Could just have the minimal version.
if test "$have_tcmalloc" = "no"; then
if test "x$with_tcmalloc" != "xyes"
&& test
"x$with_tcmalloc" != "x"; then
if test "x$with_tcmalloc" != "xyes"
-a
"x$with_tcmalloc" != "x"; then
tclibs="-L$with_tcmalloc -ltcmalloc_minimal"
else
tclibs="-ltcmalloc_minimal"
...
...
@@ -394,7 +394,7 @@ AC_ARG_WITH([profiler],
[with_profiler="yes"]
)
if test "x$with_profiler" != "xno"; then
if test "x$with_profiler" != "xyes"
&& test
"x$with_profiler" != "x"; then
if test "x$with_profiler" != "xyes"
-a
"x$with_profiler" != "x"; then
proflibs="-L$with_profiler -lprofiler"
else
proflibs="-lprofiler"
...
...
@@ -411,6 +411,38 @@ fi
AC_SUBST([PROFILER_LIBS])
AM_CONDITIONAL([HAVEPROFILER],[test -n "$PROFILER_LIBS"])
# Check for jemalloc another fast malloc that is good with contention.
have_jemalloc="no"
AC_ARG_WITH([jemalloc],
[AS_HELP_STRING([--with-jemalloc],
[use jemalloc library or specify the directory with lib @<:@yes/no@:>@]
)],
[with_jemalloc="$withval"],
[with_jemalloc="no"]
)
if test "x$with_jemalloc" != "xno"; then
if test "x$with_jemalloc" != "xyes" -a "x$with_jemalloc" != "x"; then
jelibs="-L$with_jemalloc -ljemalloc"
else
jelibs="-ljemalloc"
fi
AC_CHECK_LIB([jemalloc],[malloc_usable_size],[have_jemalloc="yes"],[have_jemalloc="no"],
$jelibs)
if test "$have_jemalloc" = "yes"; then
JEMALLOC_LIBS="$jelibs"
else
JEMALLOC_LIBS=""
fi
fi
AC_SUBST([JEMALLOC_LIBS])
AM_CONDITIONAL([HAVEJEMALLOC],[test -n "$JEMALLOC_LIBS"])
# Don't allow both tcmalloc and jemalloc.
if test "x$have_tcmalloc" != "xno" -a "x$have_jemalloc" != "xno"; then
AC_MSG_ERROR([Cannot use tcmalloc at same time as jemalloc])
fi
# Check for HDF5. This is required.
AX_LIB_HDF5
...
...
@@ -781,6 +813,7 @@ AC_MSG_RESULT([
FFTW3 enabled : $have_fftw3
libNUMA enabled : $have_numa
Using tcmalloc : $have_tcmalloc
Using jemalloc : $have_jemalloc
CPU profiler : $have_profiler
Hydro scheme : $with_hydro
...
...
This diff is collapsed.
Click to expand it.
examples/Makefile.am
+
1
−
1
View file @
9e4ad79c
...
...
@@ -24,7 +24,7 @@ AM_CFLAGS = -I$(top_srcdir)/src $(HDF5_CPPFLAGS)
AM_LDFLAGS
=
$(
HDF5_LDFLAGS
)
# Extra libraries.
EXTRA_LIBS
=
$(
HDF5_LIBS
)
$(
FFTW_LIBS
)
$(
PROFILER_LIBS
)
$(
TCMALLOC_LIBS
)
EXTRA_LIBS
=
$(
HDF5_LIBS
)
$(
FFTW_LIBS
)
$(
PROFILER_LIBS
)
$(
TCMALLOC_LIBS
)
$(
JEMALLOC_LIBS
)
# MPI libraries.
MPI_LIBS
=
$(
METIS_LIBS
)
$(
MPI_THREAD_LIBS
)
...
...
This diff is collapsed.
Click to expand it.
src/Makefile.am
+
1
−
1
View file @
9e4ad79c
...
...
@@ -25,7 +25,7 @@ AM_LDFLAGS = $(HDF5_LDFLAGS) $(FFTW_LIBS) -version-info 0:0:0
GIT_CMD
=
@GIT_CMD@
# Additional dependencies for shared libraries.
EXTRA_LIBS
=
$(
HDF5_LIBS
)
$(
PROFILER_LIBS
)
$(
TCMALLOC_LIBS
)
EXTRA_LIBS
=
$(
HDF5_LIBS
)
$(
PROFILER_LIBS
)
$(
TCMALLOC_LIBS
)
$(
JEMALLOC_LIBS
)
# MPI libraries.
MPI_LIBS
=
$(
METIS_LIBS
)
$(
MPI_THREAD_LIBS
)
...
...
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