Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nek5000
giraffe
Commits
76610cd8
Commit
76610cd8
authored
Dec 20, 2016
by
Ron Rahaman
Browse files
Separated nek's preprocessor macros from autoconf's
parent
8e6dca73
Changes
2
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
76610cd8
...
...
@@ -197,6 +197,8 @@ AC_SUBST([nek_real8_flags])
# SET NEK's PREPROCESSOR MACROS
###############################################################################
nek_DEFS=""
# Enable debug flags
if test "x$debug" = "xyes"; then
nek_debug_flags="-g"
...
...
@@ -213,17 +215,17 @@ AC_SUBST([nek_opt_flags])
# Check if pointer size == 8
if test "$ac_cv_sizeof_int_p" -eq 8; then
AC
_DEF
INE([
PTRSIZE8
], 1, [If sizeof *int is 8])
nek
_DEF
S="-D
PTRSIZE8
$nek_DEFS"
fi
# See if 'underscore' is in mangling scheme.
if echo "$ac_cv_f77_mangling"| tr -d @<:@:blank:@:>@ | grep '\<underscore\>' > /dev/null ; then
AC
_DEF
INE([
UNDERSCORE
], 1, [If Fortran name-mangling scheme adds an underscore])
nek
_DEF
S="-D
UNDERSCORE
$nek_DEFS"
fi
# See if MPI is enabled
if test "x$mpi" = "xyes"; then
AC
_DEF
INE([MPI], 1, [If MPI is enabled])
nek
_DEF
S="-DMPI $nek_DEFS"
nek_mpi_obj="byte_mpi comm_mpi"
else
nek_mpi_obj="byte_mpi comm_mpi mpi_dummy"
...
...
@@ -233,7 +235,7 @@ AC_SUBST([nek_mpi_obj])
# Always define jl_prefix
AC_SUBST([jl_prefix], [jl_])
AC
_DEF
INE([
PREFIX
], [jl_], [prefix for JL subroutines])
nek
_DEF
S="-D
PREFIX
=jl_ $nek_DEFS"
# See if AMG is enabled
if test "x$amg" = "xyes"; then
...
...
@@ -245,12 +247,12 @@ AC_SUBST([jl_cgs_obj])
# See if AMG_DUMP is enabled
if test "x$amg_dump" = "xyes"; then
AC
_DEF
INE([
AMG_DUMP
], 1, [if AMG dump is enabled])
nek
_DEF
S="-D
AMG_DUMP
$nek_DEFS"
fi
# See if CMT is enabled
if test "x$cmt" = "xyes"; then
AC
_DEF
INE([CMT], 1, [If CMT is enabled])
nek
_DEF
S="-DCMT $nek_DEFS"
nek_cmt_obj="drive1_cmt drive2_cmt driver3_cmt face ausm MixtPerf intpdiff diffusive_cmt eqnsolver_cmt surface_fluxes bc inflow_bc outflow_bc wall_bc step filters_cmt diagnostics"
else
nek_cmt_obj="cmt_dummy"
...
...
@@ -259,22 +261,22 @@ AC_SUBST([nek_cmt_obj])
# Check if sizeof long int == 8
if test "$ac_cv_sizeof_long_int" -eq 8; then
AC
_DEF
INE([
LONGINT8
], 1, [If sizeof long int is 8])
nek
_DEF
S="-D
LONGINT8
$nek_DEFS"
fi
# See if timer is enabled
if test "x$timer" = "xno"; then
AC
_DEF
INE([
NOTIMER
], 1, [If timer is disabled])
nek
_DEF
S="-D
NOTIMER
$nek_DEFS"
fi
# Always set GLOBAL_LONG_LONG
AC
_DEF
INE([
GLOBAL_LONG_LONG
], 1, [Use global long long])
nek
_DEF
S="-D
GLOBAL_LONG_LONG
$nek_DEFS"
# TODO: Set defs for MOAB
# See if neknek is enabled
if test "x$neknek" = "xyes"; then
AC
_DEF
INE([
NEKNEK
], 1, [if neknek is enabled])
nek
_DEF
S="-D
NEKNEK
$nek_DEFS"
nek_neknek_obj="multimesh"
else
nek_neknek_obj="singlmesh"
...
...
@@ -293,12 +295,12 @@ AC_SUBST([nek_neknek_obj])
# * Consistency check between options
# * If automake, AM_CONDITIONAL([BGQ], [test "x$bgq" = "xyes"]), etc.
if test "x$bgq" = "xyes"; then
AC
_DEF
INE([BGQ], 1, [if using IBM
BG
/
Q
optimizations])
nek
_DEF
S="-D
BGQ
$nek_DEFS"
nek_blas_obj=""
nek_mxm_obj="mxm_std mxm_bgq"
else
if test "x$xsmm" = "xyes"; then
AC
_DEF
INE([XSMM], 1, [if using libxsmm for mxm])
nek
_DEF
S="-DXSMM $nek_DEFS"
nek_blas_obj="blas"
nek_mxm_obj="mxm_std"
else
...
...
@@ -306,7 +308,7 @@ else
nek_blas_obj="blas"
nek_mxm_obj="mxm_std"
else
AC
_DEF
INE([
BLAS_MXM
], 1, [if not using Nek5000 BLAS mxm routines])
nek
_DEF
S="-D
BLAS_MXM
$nek_DEFS"
nek_blas_obj=""
nek_mxm_obj="mxm_std"
fi
...
...
@@ -321,11 +323,13 @@ AC_SUBST([nek_mxm_obj])
if test "x$nek_lapack" = "xyes"; then
nek_lapack_obj="dsygv ssygv"
else
AC
_DEF
INE([
NO_LAPACK
], 1, [if not using Nek5000 LAPACK routines])
nek
_DEF
S="-D
NO_LAPACK
$nek_DEFS"
nek_lapack_obj=""
fi
AC_SUBST([nek_lapack_obj])
AC_SUBST([nek_DEFS])
###############################################################################
# SIZE FILE HANDLING
###############################################################################
...
...
nek.mk.in
View file @
76610cd8
...
...
@@ -8,11 +8,11 @@ nek_includedir := @builddir@/include
# == Discovered by autoconf script
nek_CFLAGS := @CFLAGS@
nek_INCLUDES := -I$(builddir) -I$(nek_includedir) -I$(srcdir)/Nek5000/core -I$(srcdir)/Nek5000/core/cmt -I$(srcdir)/Nek5000/core/3rd_party -I$(srcdir)/Nek5000/jl
nek_CPPFLAGS := @CPPFLAGS@ @DEFS@ $(nek_INCLUDES)
nek_CPPFLAGS := @CPPFLAGS@ @DEFS@
@nek_DEFS@
$(nek_INCLUDES)
nek_LDFLAGS := @LDFLAGS@
nek_LIBS := @LIBS@
nek_FFLAGS := @FFLAGS@ @FCFLAGS_f@ $(subst -D, @FC_DEFINE@, @DEFS@) $(nek_INCLUDES)
nek_FFLAGS := @FFLAGS@ @FCFLAGS_f@ $(subst -D, @FC_DEFINE@, @DEFS@
@nek_DEFS@
) $(nek_INCLUDES)
nek_FLIBS := @FLIBS@
nek_debug_flags := @nek_debug_flags@
...
...
@@ -60,8 +60,7 @@ nek_clib_obj := $(nek_core_c_obj) $(jl_core_obj) $(jl_interp_obj) $(jl_cgs_obj
# Recursive definition (= rather than :=) is probably the right usage, since they're probably
# defined here after they're referenced by MOOSE makefile
ADDITIONAL_CPPFLAGS = @CPPFLAGS@ # Used by pattern rules in moose/framework/build.mk
# Can't use Nek's DEFS here because the interfere with MOOSE
ADDITIONAL_CPPFLAGS = @CPPFLAGS@ @DEFS@ # Used by pattern rules in moose/framework/build.mk
ADDITIONAL_INCLUDES = $(nek_INCLUDES) # Used by pattern rules in moose/framework/build.mk (through app_INCLUDES)
ADDITIONAL_LIBS = $(nek_LIBS) $(nek_FLIBS) # Used during linking in moose/framework/app.mk
ADDITIONAL_APP_OBJECTS = $(nek_flib_obj) $(nek_clib_obj) # Added to dependencies in moose/framework/app.mk
...
...
@@ -70,27 +69,27 @@ ADDITIONAL_APP_OBJECTS = $(nek_flib_obj) $(nek_clib_obj) # Added to dependencies
nek5000: $(nek_drive_obj) $(nek_flib_obj) $(nek_clib_obj)
@echo "Linking Executable "$@"..."
@$(libmesh_LIBTOOL) --tag=F77 $(LIBTOOLFLAGS) --mode=link
--quiet
\
@$(libmesh_LIBTOOL) --tag=F77 $(LIBTOOLFLAGS) --mode=link \
$(libmesh_F77) $(libmesh_FFLAGS) -o $@ $^ $(libmesh_LIBS) $(libmesh_LDFLAGS) $(nek_LIBS) $(nek_LDFLAGS) $(nek_FLIBS)
$(nek_drive_obj) $(nek_core_f_obj) $(nek_cmt_obj) $(nek_math_obj) $(nek_mxm_obj): $(nek_objdir)/%.$(obj-suffix): %.f SIZE | $(nek_objdir)
@echo "Nek5000 Compiling Fortran (in "$(METHOD)" mode) "$<"..."
@$(libmesh_LIBTOOL) --tag=F77 $(LIBTOOLFLAGS) --mode=compile
--quiet
\
@$(libmesh_LIBTOOL) --tag=F77 $(LIBTOOLFLAGS) --mode=compile \
$(libmesh_F77) $(nek_FFLAGS) $(nek_real8_flags) -c $< -o $@
$(nek_mpi_obj) $(nek_neknek_obj): $(nek_objdir)/%.$(obj-suffix): %.f SIZE mpiheader | $(nek_objdir)
@echo "Nek5000 Compiling Fortran (in "$(METHOD)" mode) "$<"..."
@$(libmesh_LIBTOOL) --tag=F77 $(LIBTOOLFLAGS) --mode=compile
--quiet
\
@$(libmesh_LIBTOOL) --tag=F77 $(LIBTOOLFLAGS) --mode=compile \
$(libmesh_F77) $(nek_FFLAGS) $(nek_real8_flags) -c $< -o $@
$(nek_core_c_obj): $(nek_objdir)/%.$(obj-suffix): %.c | $(nek_objdir)
@echo "Nek5000 Compiling C (in "$(METHOD)" mode) "$<"..."
@$(libmesh_LIBTOOL) --tag=CC $(LIBTOOLFLAGS) --mode=compile
--quiet
\
@$(libmesh_LIBTOOL) --tag=CC $(LIBTOOLFLAGS) --mode=compile \
$(libmesh_CC) $(nek_CPPFLAGS) $(nek_CFLAGS) -MMD -MP -MF $@.d -MT $@ -c $< -o $@
$(jl_core_obj) $(jl_interp_obj) $(jl_cgs_obj): $(nek_objdir)/$(jl_prefix)%.$(obj-suffix): %.c | $(nek_objdir)
@echo "Nek5000 Compiling C (in "$(METHOD)" mode) "$<"..."
@$(libmesh_LIBTOOL) --tag=CC $(LIBTOOLFLAGS) --mode=compile
--quiet
\
@$(libmesh_LIBTOOL) --tag=CC $(LIBTOOLFLAGS) --mode=compile \
$(libmesh_CC) $(nek_CPPFLAGS) $(nek_CFLAGS) -MMD -MP -MF $@.d -MT $@ -c $< -o $@
mpiheader: | $(nek_includedir)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment