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
d271b4f1
Commit
d271b4f1
authored
7 years ago
by
Peter W. Draper
Browse files
Options
Downloads
Patches
Plain Diff
Check for ParMETIS flavour of METIS
parent
b1feecff
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!506
Add ParMETIS support
,
!503
WIP: Use ParMETIS to reduce the amount of particle movement
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
configure.ac
+77
-54
77 additions, 54 deletions
configure.ac
with
77 additions
and
54 deletions
configure.ac
+
77
−
54
View file @
d271b4f1
...
@@ -426,35 +426,57 @@ AC_CHECK_LIB(pthread, posix_fallocate,
...
@@ -426,35 +426,57 @@ AC_CHECK_LIB(pthread, posix_fallocate,
AC_DEFINE([HAVE_POSIX_FALLOCATE], [1], [The posix library implements file allocation functions.]),
AC_DEFINE([HAVE_POSIX_FALLOCATE], [1], [The posix library implements file allocation functions.]),
AC_MSG_WARN(POSIX implementation does not have file allocation functions.))
AC_MSG_WARN(POSIX implementation does not have file allocation functions.))
# Check for METIS. Note AX_LIB_METIS exists, but cannot be configured
# Check for METIS or PARMETIS.
# to be default off (i.e. given no option it tries to locate METIS), so we
# don't use that.
have_metis="no"
have_metis="no"
have_parmetis="no"
AC_ARG_WITH([metis],
AC_ARG_WITH([metis],
[AS_HELP_STRING([--with-metis=PATH],
[AS_HELP_STRING([--with-metis=PATH],
[root directory where metis is installed @<:@yes/no@:>@]
[root directory where metis
or parmetis
is installed @<:@yes/no@:>@]
)],
)],
[],
[],
[with_metis="no"]
[with_metis="no"]
)
)
if test "x$with_metis" != "xno"; then
if test "x$with_metis" != "xno"; then
# Check if we have ParMETIS.
if test "x$with_metis" != "xyes" -a "x$with_metis" != "x"; then
if test "x$with_metis" != "xyes" -a "x$with_metis" != "x"; then
METIS_LIBS="-L$with_metis/lib -lmetis"
METIS_LIBS="-L$with_metis/lib
-lparmetis
-lmetis"
METIS_INCS="-I$with_metis/include"
METIS_INCS="-I$with_metis/include"
else
else
METIS_LIBS="-lmetis"
METIS_LIBS="
-lparmetis
-lmetis"
METIS_INCS=""
METIS_INCS=""
fi
fi
have_metis="yes"
AC_CHECK_LIB([metis],[ParMETIS_V3_RefineKway], [have_parmetis="yes"],
AC_CHECK_LIB([metis],[METIS_PartGraphKway],
[have_parmetis="no"], $METIS_LIBS)
AC_DEFINE([HAVE_METIS],1,[The metis library appears to be present.]),
if test "$have_parmetis" == "no"; then
AC_MSG_ERROR(something is wrong with the metis library!),$METIS_LIBS)
# Check for serial METIS.
if test "x$with_metis" != "xyes" -a "x$with_metis" != "x"; then
METIS_LIBS="-L$with_metis/lib -lmetis"
METIS_INCS="-I$with_metis/include"
else
METIS_LIBS="-lmetis"
METIS_INCS=""
fi
AC_CHECK_LIB([metis],[METIS_PartGraphKway],[have_metis="yes"],
[have_metis="no"], $METIS_LIBS)
if test "$have_metis" == "yes"; then
AC_DEFINE([HAVE_METIS],1,[The metis library appears to be present.])
else
AC_MSG_ERROR(something is wrong with the metis library!)
fi
else
AC_DEFINE([HAVE_METIS],1,[The METIS library appears to be present.])
AC_DEFINE([HAVE_PARMETIS],1,[The ParMETIS library is also present.])
fi
fi
fi
AC_SUBST([METIS_LIBS])
AC_SUBST([METIS_LIBS])
AC_SUBST([METIS_INCS])
AC_SUBST([METIS_INCS])
AM_CONDITIONAL([HAVEMETIS],[test -n "$METIS_LIBS"])
AM_CONDITIONAL([HAVEMETIS],[test -n "$METIS_LIBS"])
# Check for grackle.
# Check for grackle.
have_grackle="no"
have_grackle="no"
AC_ARG_WITH([grackle],
AC_ARG_WITH([grackle],
[AS_HELP_STRING([--with-grackle=PATH],
[AS_HELP_STRING([--with-grackle=PATH],
...
@@ -473,9 +495,9 @@ if test "x$with_grackle" != "xno"; then
...
@@ -473,9 +495,9 @@ if test "x$with_grackle" != "xno"; then
GRACKLE_LIBS="-lgrackle"
GRACKLE_LIBS="-lgrackle"
GRACKLE_INCS=""
GRACKLE_INCS=""
fi
fi
have_grackle="yes"
have_grackle="yes"
AC_CHECK_LIB(
AC_CHECK_LIB(
[grackle],
[grackle],
[initialize_chemistry_data],
[initialize_chemistry_data],
...
@@ -734,22 +756,22 @@ AC_ARG_WITH([hydro],
...
@@ -734,22 +756,22 @@ AC_ARG_WITH([hydro],
case "$with_hydro" in
case "$with_hydro" in
gadget2)
gadget2)
AC_DEFINE([GADGET2_SPH], [1], [Gadget-2 SPH])
AC_DEFINE([GADGET2_SPH], [1], [Gadget-2 SPH])
;;
;;
minimal)
minimal)
AC_DEFINE([MINIMAL_SPH], [1], [Minimal SPH])
AC_DEFINE([MINIMAL_SPH], [1], [Minimal SPH])
;;
;;
hopkins)
hopkins)
AC_DEFINE([HOPKINS_PE_SPH], [1], [Pressure-Entropy SPH])
AC_DEFINE([HOPKINS_PE_SPH], [1], [Pressure-Entropy SPH])
;;
;;
default)
default)
AC_DEFINE([DEFAULT_SPH], [1], [Default SPH])
AC_DEFINE([DEFAULT_SPH], [1], [Default SPH])
;;
;;
gizmo)
gizmo)
AC_DEFINE([GIZMO_SPH], [1], [GIZMO SPH])
AC_DEFINE([GIZMO_SPH], [1], [GIZMO SPH])
;;
;;
shadowfax)
shadowfax)
AC_DEFINE([SHADOWFAX_SPH], [1], [Shadowfax SPH])
AC_DEFINE([SHADOWFAX_SPH], [1], [Shadowfax SPH])
;;
;;
*)
*)
AC_MSG_ERROR([Unknown hydrodynamics scheme: $with_hydro])
AC_MSG_ERROR([Unknown hydrodynamics scheme: $with_hydro])
...
@@ -774,7 +796,7 @@ if test "$enable_debug_interactions" != "no"; then
...
@@ -774,7 +796,7 @@ if test "$enable_debug_interactions" != "no"; then
AC_DEFINE_UNQUOTED([MAX_NUM_OF_NEIGHBOURS], [$enableval] ,[The maximum number of particle neighbours to be logged])
AC_DEFINE_UNQUOTED([MAX_NUM_OF_NEIGHBOURS], [$enableval] ,[The maximum number of particle neighbours to be logged])
[enable_debug_interactions="yes (Logging up to $enableval neighbours)"]
[enable_debug_interactions="yes (Logging up to $enableval neighbours)"]
fi
fi
else
else
[enable_debug_interactions="no (only available for gadget2 hydro scheme)"]
[enable_debug_interactions="no (only available for gadget2 hydro scheme)"]
fi
fi
fi
fi
...
@@ -790,22 +812,22 @@ AC_ARG_WITH([kernel],
...
@@ -790,22 +812,22 @@ AC_ARG_WITH([kernel],
case "$with_kernel" in
case "$with_kernel" in
cubic-spline)
cubic-spline)
AC_DEFINE([CUBIC_SPLINE_KERNEL], [1], [Cubic spline kernel])
AC_DEFINE([CUBIC_SPLINE_KERNEL], [1], [Cubic spline kernel])
;;
;;
quartic-spline)
quartic-spline)
AC_DEFINE([QUARTIC_SPLINE_KERNEL], [1], [Quartic spline kernel])
AC_DEFINE([QUARTIC_SPLINE_KERNEL], [1], [Quartic spline kernel])
;;
;;
quintic-spline)
quintic-spline)
AC_DEFINE([QUINTIC_SPLINE_KERNEL], [1], [Quintic spline kernel])
AC_DEFINE([QUINTIC_SPLINE_KERNEL], [1], [Quintic spline kernel])
;;
;;
wendland-C2)
wendland-C2)
AC_DEFINE([WENDLAND_C2_KERNEL], [1], [Wendland-C2 kernel])
AC_DEFINE([WENDLAND_C2_KERNEL], [1], [Wendland-C2 kernel])
;;
;;
wendland-C4)
wendland-C4)
AC_DEFINE([WENDLAND_C4_KERNEL], [1], [Wendland-C4 kernel])
AC_DEFINE([WENDLAND_C4_KERNEL], [1], [Wendland-C4 kernel])
;;
;;
wendland-C6)
wendland-C6)
AC_DEFINE([WENDLAND_C6_KERNEL], [1], [Wendland-C6 kernel])
AC_DEFINE([WENDLAND_C6_KERNEL], [1], [Wendland-C6 kernel])
;;
;;
*)
*)
AC_MSG_ERROR([Unknown kernel function: $with_kernel])
AC_MSG_ERROR([Unknown kernel function: $with_kernel])
;;
;;
...
@@ -822,13 +844,13 @@ AC_ARG_WITH([hydro-dimension],
...
@@ -822,13 +844,13 @@ AC_ARG_WITH([hydro-dimension],
case "$with_dimension" in
case "$with_dimension" in
1)
1)
AC_DEFINE([HYDRO_DIMENSION_1D], [1], [1D solver])
AC_DEFINE([HYDRO_DIMENSION_1D], [1], [1D solver])
;;
;;
2)
2)
AC_DEFINE([HYDRO_DIMENSION_2D], [2], [2D solver])
AC_DEFINE([HYDRO_DIMENSION_2D], [2], [2D solver])
;;
;;
3)
3)
AC_DEFINE([HYDRO_DIMENSION_3D], [3], [3D solver])
AC_DEFINE([HYDRO_DIMENSION_3D], [3], [3D solver])
;;
;;
*)
*)
AC_MSG_ERROR([Dimensionality must be 1, 2 or 3])
AC_MSG_ERROR([Dimensionality must be 1, 2 or 3])
;;
;;
...
@@ -845,10 +867,10 @@ AC_ARG_WITH([equation-of-state],
...
@@ -845,10 +867,10 @@ AC_ARG_WITH([equation-of-state],
case "$with_eos" in
case "$with_eos" in
ideal-gas)
ideal-gas)
AC_DEFINE([EOS_IDEAL_GAS], [1], [Ideal gas equation of state])
AC_DEFINE([EOS_IDEAL_GAS], [1], [Ideal gas equation of state])
;;
;;
isothermal-gas)
isothermal-gas)
AC_DEFINE([EOS_ISOTHERMAL_GAS], [1], [Isothermal gas equation of state])
AC_DEFINE([EOS_ISOTHERMAL_GAS], [1], [Isothermal gas equation of state])
;;
;;
*)
*)
AC_MSG_ERROR([Unknown equation of state: $with_eos])
AC_MSG_ERROR([Unknown equation of state: $with_eos])
;;
;;
...
@@ -865,16 +887,16 @@ AC_ARG_WITH([adiabatic-index],
...
@@ -865,16 +887,16 @@ AC_ARG_WITH([adiabatic-index],
case "$with_gamma" in
case "$with_gamma" in
5/3)
5/3)
AC_DEFINE([HYDRO_GAMMA_5_3], [5./3.], [Adiabatic index is 5/3])
AC_DEFINE([HYDRO_GAMMA_5_3], [5./3.], [Adiabatic index is 5/3])
;;
;;
7/5)
7/5)
AC_DEFINE([HYDRO_GAMMA_7_5], [7./5.], [Adiabatic index is 7/5])
AC_DEFINE([HYDRO_GAMMA_7_5], [7./5.], [Adiabatic index is 7/5])
;;
;;
4/3)
4/3)
AC_DEFINE([HYDRO_GAMMA_4_3], [4./3.], [Adiabatic index is 4/3])
AC_DEFINE([HYDRO_GAMMA_4_3], [4./3.], [Adiabatic index is 4/3])
;;
;;
2)
2)
AC_DEFINE([HYDRO_GAMMA_2_1], [2.], [Adiabatic index is 2])
AC_DEFINE([HYDRO_GAMMA_2_1], [2.], [Adiabatic index is 2])
;;
;;
*)
*)
AC_MSG_ERROR([Unknown adiabatic index: $with_gamma])
AC_MSG_ERROR([Unknown adiabatic index: $with_gamma])
;;
;;
...
@@ -891,16 +913,16 @@ AC_ARG_WITH([riemann-solver],
...
@@ -891,16 +913,16 @@ AC_ARG_WITH([riemann-solver],
case "$with_riemann" in
case "$with_riemann" in
none)
none)
AC_DEFINE([RIEMANN_SOLVER_NONE], [1], [No Riemann solver])
AC_DEFINE([RIEMANN_SOLVER_NONE], [1], [No Riemann solver])
;;
;;
exact)
exact)
AC_DEFINE([RIEMANN_SOLVER_EXACT], [1], [Exact Riemann solver])
AC_DEFINE([RIEMANN_SOLVER_EXACT], [1], [Exact Riemann solver])
;;
;;
trrs)
trrs)
AC_DEFINE([RIEMANN_SOLVER_TRRS], [1], [Two Rarefaction Riemann Solver])
AC_DEFINE([RIEMANN_SOLVER_TRRS], [1], [Two Rarefaction Riemann Solver])
;;
;;
hllc)
hllc)
AC_DEFINE([RIEMANN_SOLVER_HLLC], [1], [Harten-Lax-van Leer-Contact Riemann solver])
AC_DEFINE([RIEMANN_SOLVER_HLLC], [1], [Harten-Lax-van Leer-Contact Riemann solver])
;;
;;
*)
*)
AC_MSG_ERROR([Unknown Riemann solver: $with_riemann])
AC_MSG_ERROR([Unknown Riemann solver: $with_riemann])
;;
;;
...
@@ -917,19 +939,19 @@ AC_ARG_WITH([cooling],
...
@@ -917,19 +939,19 @@ AC_ARG_WITH([cooling],
case "$with_cooling" in
case "$with_cooling" in
none)
none)
AC_DEFINE([COOLING_NONE], [1], [No cooling function])
AC_DEFINE([COOLING_NONE], [1], [No cooling function])
;;
;;
const-du)
const-du)
AC_DEFINE([COOLING_CONST_DU], [1], [Const du/dt cooling function])
AC_DEFINE([COOLING_CONST_DU], [1], [Const du/dt cooling function])
;;
;;
const-lambda)
const-lambda)
AC_DEFINE([COOLING_CONST_LAMBDA], [1], [Const Lambda cooling function])
AC_DEFINE([COOLING_CONST_LAMBDA], [1], [Const Lambda cooling function])
;;
;;
grackle)
grackle)
AC_DEFINE([COOLING_GRACKLE], [1], [Cooling via the grackle library])
AC_DEFINE([COOLING_GRACKLE], [1], [Cooling via the grackle library])
;;
;;
EAGLE)
EAGLE)
AC_DEFINE([COOLING_EAGLE], [1], [Cooling following the EAGLE model])
AC_DEFINE([COOLING_EAGLE], [1], [Cooling following the EAGLE model])
;;
;;
*)
*)
AC_MSG_ERROR([Unknown cooling function: $with_cooling])
AC_MSG_ERROR([Unknown cooling function: $with_cooling])
;;
;;
...
@@ -946,13 +968,13 @@ AC_ARG_WITH([chemistry],
...
@@ -946,13 +968,13 @@ AC_ARG_WITH([chemistry],
case "$with_chemistry" in
case "$with_chemistry" in
none)
none)
AC_DEFINE([CHEMISTRY_NONE], [1], [No chemistry function])
AC_DEFINE([CHEMISTRY_NONE], [1], [No chemistry function])
;;
;;
gear)
gear)
AC_DEFINE([CHEMISTRY_GEAR], [1], [Chemistry taken from the GEAR model])
AC_DEFINE([CHEMISTRY_GEAR], [1], [Chemistry taken from the GEAR model])
;;
;;
EAGLE)
EAGLE)
AC_DEFINE([CHEMISTRY_EAGLE], [1], [Chemistry taken from the EAGLE model])
AC_DEFINE([CHEMISTRY_EAGLE], [1], [Chemistry taken from the EAGLE model])
;;
;;
*)
*)
AC_MSG_ERROR([Unknown chemistry function: $with_chemistry])
AC_MSG_ERROR([Unknown chemistry function: $with_chemistry])
;;
;;
...
@@ -969,19 +991,19 @@ AC_ARG_WITH([ext-potential],
...
@@ -969,19 +991,19 @@ AC_ARG_WITH([ext-potential],
case "$with_potential" in
case "$with_potential" in
none)
none)
AC_DEFINE([EXTERNAL_POTENTIAL_NONE], [1], [No external potential])
AC_DEFINE([EXTERNAL_POTENTIAL_NONE], [1], [No external potential])
;;
;;
point-mass)
point-mass)
AC_DEFINE([EXTERNAL_POTENTIAL_POINTMASS], [1], [Point-mass external potential])
AC_DEFINE([EXTERNAL_POTENTIAL_POINTMASS], [1], [Point-mass external potential])
;;
;;
isothermal)
isothermal)
AC_DEFINE([EXTERNAL_POTENTIAL_ISOTHERMAL], [1], [Isothermal external potential])
AC_DEFINE([EXTERNAL_POTENTIAL_ISOTHERMAL], [1], [Isothermal external potential])
;;
;;
disc-patch)
disc-patch)
AC_DEFINE([EXTERNAL_POTENTIAL_DISC_PATCH], [1], [Disc-patch external potential])
AC_DEFINE([EXTERNAL_POTENTIAL_DISC_PATCH], [1], [Disc-patch external potential])
;;
;;
sine-wave)
sine-wave)
AC_DEFINE([EXTERNAL_POTENTIAL_SINE_WAVE], [1], [Sine wave external potential in 1D])
AC_DEFINE([EXTERNAL_POTENTIAL_SINE_WAVE], [1], [Sine wave external potential in 1D])
;;
;;
*)
*)
AC_MSG_ERROR([Unknown external potential: $with_potential])
AC_MSG_ERROR([Unknown external potential: $with_potential])
;;
;;
...
@@ -1029,7 +1051,7 @@ touch src/version.c
...
@@ -1029,7 +1051,7 @@ touch src/version.c
AC_OUTPUT
AC_OUTPUT
# Report general configuration.
# Report general configuration.
AC_MSG_RESULT([
AC_MSG_RESULT([
------- Summary --------
------- Summary --------
$PACKAGE_NAME v.$PACKAGE_VERSION
$PACKAGE_NAME v.$PACKAGE_VERSION
...
@@ -1042,6 +1064,7 @@ AC_MSG_RESULT([
...
@@ -1042,6 +1064,7 @@ AC_MSG_RESULT([
HDF5 enabled : $with_hdf5
HDF5 enabled : $with_hdf5
- parallel : $have_parallel_hdf5
- parallel : $have_parallel_hdf5
Metis enabled : $have_metis
Metis enabled : $have_metis
ParMETIS enabled : $have_parmetis
FFTW3 enabled : $have_fftw3
FFTW3 enabled : $have_fftw3
libNUMA enabled : $have_numa
libNUMA enabled : $have_numa
GRACKLE enabled : $have_grackle
GRACKLE enabled : $have_grackle
...
@@ -1058,7 +1081,7 @@ AC_MSG_RESULT([
...
@@ -1058,7 +1081,7 @@ AC_MSG_RESULT([
Riemann solver : $with_riemann
Riemann solver : $with_riemann
Cooling function : $with_cooling
Cooling function : $with_cooling
Chemistry : $with_chemistry
Chemistry : $with_chemistry
External potential : $with_potential
External potential : $with_potential
Multipole order : $with_multipole_order
Multipole order : $with_multipole_order
No gravity below ID : $no_gravity_below_id
No gravity below ID : $no_gravity_below_id
...
...
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