Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PuReMD
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
SParTA
PuReMD
Commits
7e8e4485
Commit
7e8e4485
authored
6 years ago
by
Kurt A. O'Hearn
Browse files
Options
Downloads
Patches
Plain Diff
PuReMD: backport build system updates from branch full-far-nbrs-list-charge-matrix.
parent
569ada79
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
PuReMD/Makefile.am
+4
-7
4 additions, 7 deletions
PuReMD/Makefile.am
PuReMD/configure.ac
+89
-33
89 additions, 33 deletions
PuReMD/configure.ac
configure.ac
+1
-3
1 addition, 3 deletions
configure.ac
with
94 additions
and
43 deletions
PuReMD/Makefile.am
+
4
−
7
View file @
7e8e4485
ACLOCAL_AMFLAGS
=
-I
../m4
AM_CFLAGS
=
-Wall
-O3
-funroll-loops
-fstrict-aliasing
#-finline-functions -finline-limit=15 -qhot
bin_PROGRAMS
=
bin/puremd
bin_puremd_SOURCES
=
src/allocate.c src/basic_comm.c src/ffield.c src/grid.c src/list.c src/lookup.c
\
src/io_tools.c src/reset_tools.c src/restart.c src/random.c src/tool_box.c src/traj.c
\
src/vector.c src/analyze.c src/box.c src/system_props.c src/control.c src/comm_tools.c
\
src/geo_tools.c src/linear_solvers.c src/neighbors.c src/qEq.c src/bond_orders.c src/multi_body.c
\
src/bonds.c src/valence_angles.c src/hydrogen_bonds.c src/torsion_angles.c src/nonbonded.c src/forces.c
\
src/integrate.c src/init_md.c src/parallelreax.c
include_HEADERS
=
src/reax_defs.h src/reax_types.h
\
src/integrate.c src/init_md.c src/parallelreax.c
\
src/reax_defs.h src/reax_types.h
\
src/allocate.h src/basic_comm.h src/ffield.h src/grid.h src/list.h src/lookup.h
\
src/io_tools.h src/reset_tools.h src/restart.h src/random.h src/tool_box.h src/traj.h
\
src/vector.h src/analyze.h src/box.h src/system_props.h src/control.h src/comm_tools.h
\
...
...
@@ -18,5 +15,5 @@ include_HEADERS = src/reax_defs.h src/reax_types.h \
src/bonds.h src/valence_angles.h src/hydrogen_bonds.h src/torsion_angles.h src/nonbonded.h src/forces.h
\
src/integrate.h src/init_md.h
bin_puremd_CFLAGS
=
$(
AM_CFLAGS
)
$(
MPI_CFLAGS
)
bin_puremd_LD
FLAGS
=
$(
AM_LDFLAGS
)
$(
MPI_LDFLAG
S
)
bin_puremd_CFLAGS
=
$(
MPI_CFLAGS
)
bin_puremd_LD
ADD
=
$(
MPI_LIB
S
)
This diff is collapsed.
Click to expand it.
PuReMD/configure.ac
+
89
−
33
View file @
7e8e4485
...
...
@@ -4,6 +4,8 @@
AC_PREREQ([2.69])
AC_INIT([PuReMD], [1.0], [ohearnku@msu.edu hma@msu.edu])
# Do not allow AC_PROG_CC to set CFLAGS (this line must be after AC_INIT but before AC_PROG_CC)
save_CFLAGS="${CFLAGS}"
: ${CFLAGS=""}
AM_INIT_AUTOMAKE([1.15 subdir-objects -Wall -Werror foreign])
# Enable silent build rules by default.
...
...
@@ -13,20 +15,21 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], [AC_SUBST([AM_DEFAULT_VERB
AC_CONFIG_MACRO_DIR([../m4])
AC_LANG([C])
AC_CONFIG_SRCDIR([src/torsion_angles.h])
AC_CONFIG_HEADERS([src/config.h])
# Headline formatter
AC_DEFUN([CONFIGURE_HEADLINE],
[
echo; echo "+++ $1 +++"
])
AC_LANG([C])
# Checks for programs.
AC_PROG_CC([cc icc gcc])
AC_PROG_CPP
CFLAGS="${save_CFLAGS}"
AC_CONFIG_SRCDIR([src/torsion_angles.h])
AC_CONFIG_HEADERS([src/config.h])
# Checks for libraries.
AC_SEARCH_LIBS([exp], [m])
...
...
@@ -47,69 +50,122 @@ AC_FUNC_REALLOC
AC_FUNC_STRTOD
AC_CHECK_FUNCS([gettimeofday memset pow sqrt])
# Check for MPI support.
# Check for compiler vendor. If the compiler is recognized,
# the variable ax_cv_c_compiler_vendor is set accordingly.
AX_COMPILER_VENDOR
if test "x${ax_cv_c_compiler_vendor}" = "xgnu"; then
if test "x${BUILD_DEBUG}" = "x"; then
CFLAGS="-Wall -O2 -funroll-loops"
else
CFLAGS="-Wall -O0 -g2 -D_GLIBCXX_DEBUG"
fi
elif test "x${ax_cv_c_compiler_vendor}" = "xintel"; then
if test "x${BUILD_DEBUG}" = "x"; then
CFLAGS="-Wall -O2 -funroll-loops"
else
CFLAGS="-Wall -O0"
fi
fi
# Check for MPI support. If found, sets the following variables:
# Compiler-related: MPICC, MPICXX, MPIF77
# Library linking: MPILIBS
# Compilation support (via preprocessor def): HAVE_MPI
CONFIGURE_HEADLINE([ MPI compiler ])
ACX_MPI([], [AC_MSG_ERROR([could not find mpi library])])
AC_CHECK_PROG(MPIRUN, mpirun, mpirun)
AC_SUBST(MPIRUN)
# try to find if we are using OpenMPI / MPICH by looking inside mpi.h
sav_CC="$CC"
sav_CFLAGS="$CFLAGS"
CC="$MPICC"
CFLAGS="
$CFLAGS
"
sav
e
_CC="$
{
CC
}
"
sav
e
_CFLAGS="$
{
CFLAGS
}
"
CC="$
{
MPICC
}
"
CFLAGS=""
AC_CHECK_DECL([OPEN_MPI], [mpi_vendor="OpenMPI"],
[], [#include "mpi.h"])
# MPICH v2
AC_CHECK_DECL([MPICH2], [mpi_vendor="MPICH2"],
[], [#include "mpi.h"])
# MPICH v3
AC_CHECK_DECL([MPICH_VERSION], [mpi_vendor="MPICH3"],
[], [#include "mpi.h"])
CC="$sav_CC"
CFLAGS="$sav_CFLAGS"
CC="$
{
sav
e
_CC
}
"
CFLAGS="$
{
sav
e
_CFLAGS
}
"
#
# try to set MPI_CFLAGS and MPI_LDFLAGS
#
# try to set MPI_CFLAGS and MPI_LIBS
MPI_CFLAGS=
MPI_L
DFLAG
S=
if test "x$mpi_vendor" = "xOpenMPI"
MPI_L
IB
S=
if test "x$
{
mpi_vendor
}
" = "xOpenMPI"
then
MPI_CFLAGS=`$MPICC --showme:compile`
MPI_L
DFLAG
S=`$MPICC --showme:link`
MPI_CFLAGS=`$
{
MPICC
}
--showme:compile`
MPI_L
IB
S=`$
{
MPICC
}
--showme:link`
AC_MSG_NOTICE([OpenMPI found])
AC_MSG_NOTICE([MPI_CFLAGS=$MPI_CFLAGS])
AC_MSG_NOTICE([MPI_L
DFLAG
S=$MPI_L
DFLAGS
])
elif test "x$mpi_vendor" = "xMPICH2" || test "x$mpi_vendor" = "xMPICH3"
AC_MSG_NOTICE([MPI_CFLAGS=$
{
MPI_CFLAGS
}
])
AC_MSG_NOTICE([MPI_L
IB
S=$
{
MPI_L
IBS}
])
elif test "x$
{
mpi_vendor
}
" = "xMPICH2" || test "x$
{
mpi_vendor
}
" = "xMPICH3"
then
# build MPI_CFLAGS
tmp=`$MPICC -compile-info | awk '{$1=""; print $0 }'`
tmp=`$
{
MPICC
}
-compile-info | awk '{$1=""; print $0 }'`
MPI_CFLAGS=
for i in $tmp
do
case $
i
in
case $
{i}
in
-[[DIUbi]]*)
MPI_CFLAGS="$MPI_CFLAGS $
i
"
MPI_CFLAGS="$
{
MPI_CFLAGS
}
$
{i}
"
;;
esac
done
# build MPI_L
DFLAG
S
tmp=`$MPICC -link-info | awk '{$1=""; print $0 }'`
# build MPI_L
IB
S
tmp=`$
{
MPICC
}
-link-info | awk '{$1=""; print $0 }'`
for i in $tmp
do
case $
i
in
case $
{i}
in
[[\\/]]*.a | ?:[[\\/]]*.a | -[[lLRu]]* | -Wl* )
MPI_L
DFLAG
S="$MPI_L
DFLAGS $i
"
MPI_L
IB
S="$
{
MPI_L
IBS} ${i}
"
;;
esac
done
AC_MSG_NOTICE([MPICH found])
AC_MSG_NOTICE([MPI_CFLAGS=$MPI_CFLAGS])
AC_MSG_NOTICE([MPI_L
DFLAG
S=$MPI_L
DFLAGS
])
AC_MSG_NOTICE([MPI_CFLAGS=$
{
MPI_CFLAGS
}
])
AC_MSG_NOTICE([MPI_L
IB
S=$
{
MPI_L
IBS}
])
else
AC_MSG_WARN([Neither OpenMPI and MPICH have been recognized...])
fi
AC_SUBST(MPI_CFLAGS)
AC_SUBST(MPI_LDFLAGS)
AC_SUBST(MPI_LIBS)
# Check for LAPACKE
AC_CHECK_HEADERS([mkl.h], [MKL_FOUND_HEADERS="yes"])
if test "x${MKL_FOUND_HEADERS}" = "xyes"
then
AC_SEARCH_LIBS([LAPACKE_dgels], [mkl_intel_ilp64],
[MKL_FOUND_LIBS="yes"], [MKL_FOUND_LIBS="no"],
[-lmkl_sequential -lmkl_core -lpthread -lm -ldl])
AS_IF([test "x${MKL_FOUND_LIBS}" != "xyes"],
[AC_MSG_ERROR([Unable to find MKL LAPACKE library.])])
# dynamic linking
#LIBS="${LIBS} -lmkl_intel_ilp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl"
# static linking
LIBS="${LIBS} -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_ilp64.a ${MKLROOT}/lib/intel64/libmkl_sequential.a ${MKLROOT}/lib/intel64/libmkl_core.a -Wl,--end-group -lpthread -lm -ldl"
AC_DEFINE([HAVE_LAPACKE_MKL], [1], [Define to 1 if you have MKL LAPACKE support enabled.])
else
AC_CHECK_HEADERS([lapacke.h], [LAPACKE_FOUND_HEADERS="yes"])
if test "x${LAPACKE_FOUND_HEADERS}" = "xyes"
then
AC_SEARCH_LIBS([LAPACKE_dgels], [lapacke],
[LAPACKE_FOUND_LIBS="yes"], [LAPACKE_FOUND_LIBS="no"],
[-llapack])
AS_IF([test "x${LAPACKE_FOUND_LIBS}" != "xyes"],
[AC_MSG_ERROR([Unable to find LAPACKE library.])])
LIBS="${LIBS} -llapack"
AC_DEFINE([HAVE_LAPACKE], [1], [Define to 1 if you have LAPACKE support enabled.])
else
AC_MSG_WARN([
-----------------------------------------------
Unable to find LAPACKE on this system.
Disabling support for dependent methods.
-----------------------------------------------])
fi
fi
AC_CONFIG_FILES([Makefile])
...
...
This diff is collapsed.
Click to expand it.
configure.ac
+
1
−
3
View file @
7e8e4485
...
...
@@ -84,9 +84,7 @@ if test "x${DEBUG}" = "xyes"
then
# #TODO: fix exporting to subdirs
# # See: http://stackoverflow.com/questions/34124337/changing-flags-in-configure-ac-vs-caching-with-subprojects
# CFLAGS="-g3 -O0 -D_GLIBCXX_DEBUG ${CFLAGS}"
export BUILD_DEBUG="true"
export DEBUG_FLAGS="-g2 -O0 -D_GLIBCXX_DEBUG"
export BUILD_DEBUG="yes"
fi
# gprof flags.
...
...
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