Skip to content

Commit 3edbe2e

Browse files
drroeDaniel R. Roe
andauthored
Make configure script able to download and install external libraries. Fix 'dat' install. (#883)
* Start adding support for automatically getting and building netcdf * Fix extra space, make executable * Download and build netcdf automatically * Fix netcdf specified build failure message * Move all logic for determining if and how netcdf will be built to configure. * Hide some debug info. Ensure clean is run before make * Make script more general so it can be potentially used for other libraries * Rename to make more general * Add messages about downloading and unpacking * Move question to get_library.sh * Change indents in get_library. Simplify logic for checking for bundled netcdf. * Try to determine SRCDIR automatically if not specified. * Start trying to automatically build bzip2 * Try to handle case where library has a Makefile but not configure * Improve error message * Add support for getting zlib. Reorder CC and CFLAGS position when invoking configure. * Fix 'error: identifier "_LIB_VERSION_TYPE" is undefined' with intel compilers * Start adding code for math library. * Add some internal documentation * Consolidate error message code for TestProgram silent. Have DetermineFlink return with a status instead of exit on error. * Skip asking user about building if already built once before * Rebuild checks for zlib and bzlib * Add install of openblas * Set up make command if not already set * Fix up formatting * Pass in FC and FFLAGS * Fix syntax error * Start generalizing for different BLAS external builds. Pass FC but not FFLAGS since they might not be appropriate for F77 style code * Add code for building vanilla lapack/blas * Add uninstall_lib target * Add concept of a cpptraj include directory * Add uninstall_inc target * Add --buildlibs option * Fix typo in variable * Add note * Fix issues with SRCDIR * Add pnetcdf * Disable pnetcdf interfaces that cpptraj does not use * Add build of fftw * Disable fortran interface for fftw. Only enable pnetcdf when mpi is specified * Add message that compiling may be time-consuming * Add small blurb about --buildlibs * Put intel header fix into configure. Add zlib include path to external config.h for tng * Use zlib include path from external config * Define M_PI and M_PI_2 if not defined; some intel compilers do not have them defined. * Add --nobuildlibs option to avoid asking about building libraries. Will still use bundled libraries if already present. * Add note about --nobuildlibs * Fix uninstall rule to remove more fftw stuff * Fix detection of cpptraj test root directory, and use it to find necessary test utilities. Should make it possible to source cpptraj.sh in any directory and have tests here use it. * Ensure the files in the dat directory get installed to PREFIX when prefix is specified. * CPPTRAJ_NDIFF and CPPTRAJ_NPROC are now set by CPPTRAJ_TEST_ROOT which is an absolute path. * Add --buildlibs to Linux GNU parallel Jenkins build so pnetcdf check is not interactive. Will also serve as a partial test of --buildlibs. Co-authored-by: Daniel R. Roe <daniel.roe@nih.gov>
1 parent 196783e commit 3edbe2e

File tree

8 files changed

+600
-35
lines changed

8 files changed

+600
-35
lines changed

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ pipeline {
129129

130130
steps {
131131
unstash "source"
132-
sh "./configure --with-netcdf --with-fftw3 -mpi gnu"
132+
sh "./configure --with-netcdf --with-fftw3 -mpi --buildlibs gnu"
133133
sh "make -j4 install"
134134
sh "make -e DO_PARALLEL='mpiexec -n 2' check"
135135
sh "make -e DO_PARALLEL='mpiexec -n 4' check"

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,16 @@ CPPTRAJ also makes use of the following libraries that are bundled with CPPTRAJ.
9292
CPPTRAJ also uses the PCG32 and Xoshiro 128++ pseudo-random number generators.
9393

9494
`./configure gnu` should be adequate to set up compilation for most systems.
95-
For systems without BLAS/LAPACK/ARPACK and/or NetCDF libraries installed,
95+
For systems without BLAS/LAPACK, FFTW, and/or NetCDF libraries installed,
9696
the `-amberlib` flag can be specified to use the ones already compiled in
9797
an AmberTools installation (`$AMBERHOME` must be set), e.g.
98-
`./configure -amberlib gnu`. C++11 support is required to enable particle mesh
99-
Ewald (PME) calculation support.
98+
`./configure -amberlib gnu`. If enabled libraries are not present, CPPTRAJ's
99+
configure can attempt to download and install them into $CPPTRAJHOME. By default
100+
CPPTRAJ will ask if these should be installed; the '--buildlibs' option can
101+
be used to try to automatically install any missing enabled library. To prevent
102+
CPPTRAJ from asking about building external libraries, use the '--nobuildlibs'
103+
option.
104+
C++11 support is required to enable particle mesh Ewald (PME) calculation support.
100105

101106
For multicore systems, the `-openmp` flag can
102107
be specified to enable OpenMP parallelization, e.g. `./configure -openmp gnu`.

0 commit comments

Comments
 (0)