Skip to content
Snippets Groups Projects
Commit 0f53d923 authored by Massimiliano Bonomi's avatar Massimiliano Bonomi
Browse files

Merge branch 'v2.4' of github.com:plumed/plumed2 into v2.4

parents 054ffb39 7c4f616a
No related branches found
No related tags found
No related merge requests found
......@@ -151,3 +151,9 @@ Fixes after beta release:
- Fixed a bug in EDS module for restarts, where accumulated rate was not stored to restart file, leading to convergence problems.
- (developers) `plumed config makefile_conf` can be used to retrieve `Makefile.conf` file a posteriori.
- Added patch for Quantum ESPRESSO 6.2 (thanks to Ralf Meyer).
- (developers) Store `MPIEXEC` variable at configure time and use it later for running regtests. Notice that in case
`MPIEXEC` is not specified regtests will be run using the command stored in env var `PLUMED_MPIRUN` or, if this is
also not defined, using `mpirun`.
- (developers) Added canonical makefile targets `check` and `installcheck`. Notice that `check` runs checks with
non-installed plumed whereas `installcheck` uses the installed one, including its correct program name if it
was personalized (e.g. with suffixes). Notice that this modifies the previously available `check` target.
......@@ -13,7 +13,7 @@ SUBDIRS := $(SRCDIRS) user-doc developer-doc regtest macports vim astyle
SUBDIRSCLEAN:=$(addsuffix .clean,$(SUBDIRS))
.PHONY: all lib clean $(SRCDIRS) doc docclean check cppcheck distclean all_plus_docs macports codecheck plumedcheck astyle
.PHONY: all lib clean $(SRCDIRS) doc docclean check installcheck cppcheck distclean all_plus_docs macports codecheck plumedcheck astyle
# if machine dependent configuration has been found:
ifdef GCCDEP
......@@ -59,8 +59,15 @@ docs:
$(MAKE) doc
# regtests
check: src test
$(MAKE) -C regtest
# perform tests using non-installed plumed
check:
PLUMED_PREPEND_PATH="$(realpath .)/src/lib" $(MAKE) -C regtest
$(MAKE) -C regtest checkfail
# perform tests using the installed version of plumed
installcheck:
PLUMED_PREPEND_PATH="$(bindir)" PLUMED_PROGRAM_NAME="$(program_name)" $(MAKE) -C regtest
$(MAKE) -C regtest checkfail
else
......
......@@ -32,3 +32,4 @@ datarootdir=@datarootdir@
datadir=@datadir@
docdir=@docdir@
htmldir=@htmldir@
mpiexec=@MPIEXEC@
......@@ -97,37 +97,30 @@ Quick compilation instructions
------------------------------
Extensive installation instructions are in the [user documentation](http://www.plumed.org/documentation).
Configure for your system
Quick instructions:
./configure --prefix=$HOME/opt
If necessary, edit `Makefile.conf`.
Configure your environment
source ./sourceme.sh
Compile plumed
make
The `plumed` executable should be now in your execution path
plumed help
Compile the manuals.
make doc
make doc # optional
User documentation can be found at `user-doc/html/index.html`.
Developer documentation can be found at `developer-doc/html/index.html`.
[Pre-compiled documentation](http://www.plumed.org/documentation) is available online, so this is only required
if you are working with a modified version of the code!
Install PLUMED in `$HOME/opt` (directory should be set during `./configure`):
In order to run PLUMED without installing it you should type `source sourceme.sh`. However,
we recomment installing PLUMED.
To install it in `$HOME/opt` (directory should be set during `./configure`):
umask 022
make install
Now you will be able to run plumed using e.g.
plumed help
If you compiled your own documentation, paths to the installed documentation can be found with command `plumed info --user-doc`.
A sample modulefile with environment variable will be placed in
`$HOME/opt/lib/plumed/src/lib/modulefile`. If you compiled your own documentation, paths to the installed documentation can be found with command `plumed info --user-doc`.
`$HOME/opt/lib/plumed/src/lib/modulefile`. This can be useful if you want to
install multiple PLUMED versions side by side and select them with env modules.
......@@ -651,6 +651,7 @@ CPPFLAGS
LDFLAGS
CXXFLAGS
CXX
MPIEXEC
LDSHARED
STATIC_LIBS
SOEXT
......@@ -735,6 +736,7 @@ target_alias
SOEXT
STATIC_LIBS
LDSHARED
MPIEXEC
CXX
CXXFLAGS
LDFLAGS
......@@ -1409,6 +1411,9 @@ Some influential environment variables:
configure will add here -ldl if necessary
LDSHARED command for linking shared library - configure will use CXX plus
the proper flags
MPIEXEC command to run mpi programs in tests - default not specified,
which means use PLUMED_MPIRUN env var at runtime for backward
compatibility
CXX C++ compiler command
CXXFLAGS C++ compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
......@@ -3009,6 +3014,7 @@ fi
# by default use -O flag
# we override the autoconf default (-g) because in release build we do not want to
# include symbol information (obj files are huge)
......@@ -8365,6 +8371,8 @@ $as_echo "#define _REENTRANT 1" >>confdefs.h
# these are libraries that should be linked also to MD engines
if test "$shared" == true ; then
case `(uname)` in
(Darwin)
......@@ -8755,6 +8763,16 @@ fi
fi
if test $mpi_found == ok ; then
if test -n "$MPIEXEC" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Regtest suite will use $MPIEXEC command to run MPI tests" >&5
$as_echo "$as_me: Regtest suite will use $MPIEXEC command to run MPI tests" >&6;}
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: Regtest suite will use env var PLUMED_MPIRUN to run MPI tests (default: mpirun)" >&5
$as_echo "$as_me: Regtest suite will use env var PLUMED_MPIRUN to run MPI tests (default: mpirun)" >&6;}
fi
fi
#### This further tests are required to allow linking with non c++ compiler
{ $as_echo "$as_me:${as_lineno-$LINENO}: PLUMED seems to be configured properly!" >&5
$as_echo "$as_me: PLUMED seems to be configured properly!" >&6;}
......
......@@ -260,6 +260,7 @@ PLUMED_CONFIG_ENABLE([fftw],[search for fftw],[no])
AC_ARG_VAR(SOEXT,[extension of dynamic libraries (so/dylib)])
AC_ARG_VAR(STATIC_LIBS,[variables that should be linked statically directly to MD code - configure will add here -ldl if necessary ])
AC_ARG_VAR(LDSHARED,[command for linking shared library - configure will use CXX plus the proper flags ])
AC_ARG_VAR(MPIEXEC,[command to run mpi programs in tests - default not specified, which means use PLUMED_MPIRUN env var at runtime for backward compatibility])
# by default use -O flag
......@@ -673,6 +674,8 @@ AC_SUBST(LDSHARED)
# these are libraries that should be linked also to MD engines
AC_SUBST(STATIC_LIBS)
AC_SUBST(MPIEXEC)
if test "$shared" == true ; then
case `(uname)` in
(Darwin)
......@@ -839,6 +842,14 @@ int main(int argc,char*argv[[]]){
)
fi
if test $mpi_found == ok ; then
if test -n "$MPIEXEC" ; then
AC_MSG_NOTICE([Regtest suite will use $MPIEXEC command to run MPI tests])
else
AC_MSG_NOTICE([Regtest suite will use env var PLUMED_MPIRUN to run MPI tests (default: mpirun)])
fi
fi
#### This further tests are required to allow linking with non c++ compiler
AC_MSG_NOTICE([PLUMED seems to be configured properly!])
AC_MSG_NOTICE([**************************])
......
......@@ -65,6 +65,11 @@ mpi.setup
# To enable mpi, replace a configure flag
if {[mpi_variant_isset]} {
configure.args-replace --disable-mpi --enable-mpi
# command should be included in a pre-configure block to access properly the mpi.exec variable
pre-configure {
# MPIEXEC is stored so that it can be used to perform tests
configure.args-append MPIEXEC="${mpi.exec}"
}
}
# Libraries.
......
#!/bin/bash
if test -n "$PLUMED_PREPEND_PATH" ; then
PATH="$PLUMED_PREPEND_PATH:$PATH"
fi
export valgrind=env
for opt in ${*}
......@@ -46,7 +50,7 @@ echo "++ Arguments: $arg"
echo "++ Processors: $mpiprocs"
mpi=env
plumed=plumed
plumed="${PLUMED_PROGRAM_NAME:-plumed}"
root=$($plumed --no-mpi info --root)
......@@ -63,9 +67,17 @@ cd -
if ((mpiprocs>0)); then
mpi="${PLUMED_MPIRUN:-mpirun} -np $mpiprocs"
mpi=""
if $plumed --no-mpi config -q mpiexec
then
mpi="$($plumed --no-mpi config mpiexec)"
fi
if test -z "$mpi" ; then
mpi="${PLUMED_MPIRUN:-mpirun}"
fi
mpi="$mpi -np $mpiprocs"
if ! plumed config -q has mpi
if ! $plumed config -q has mpi
then
echo "NOT_APPLICABLE (MPI NOT INSTALLED)"
exit 0;
......@@ -73,7 +85,7 @@ fi
else
plumed="plumed --no-mpi"
plumed="$plumed --no-mpi"
fi
......
......@@ -50,6 +50,7 @@ do
;;
(has) action=has ;;
(module) action=module ;;
(mpiexec) action=mpiexec ;;
(makefile_conf)
echo "$configfile" | awk '{if($1=="makefile_conf") { gsub("^makefile_conf ",""); print} }'
exit 0
......@@ -95,5 +96,15 @@ case $action in
git=$(echo "$configfile" | grep -v \# | awk '{ if($1=="version" && $2=="git") print $3 }')
echo "Version: $long (git: $git)"
;;
(mpiexec)
mpi=$(echo "$configfile" | grep -v \# | awk '{ if($1=="mpiexec") print $2 }')
if test -n "$mpi" ; then
retval=0
test "$quiet" = no && echo "$mpi"
else
retval=1
test "$quiet" = no && echo "mpiexec not found"
fi
exit $retval
esac
......@@ -23,7 +23,9 @@ obj: all
config.txt: ../../Makefile.conf
@echo "Updating config.txt file"
@makefile_conf="$(realpath ../../Makefile.conf)" ../maketools/update-config-txt.sh config.txt $(CPPFLAGS)
@makefile_conf="$(realpath ../../Makefile.conf)" \
mpiexec="$(mpiexec)" \
../maketools/update-config-txt.sh config.txt $(CPPFLAGS)
version.h:
@echo "Updating version.h"
......
......@@ -101,6 +101,8 @@ echo "# version strings"
echo "# syntax: version short/long/git number"
echo "$version"
echo
echo "mpiexec $mpiexec"
echo
echo "# list of 'has' options"
echo "# syntax: has name on/of"
echo "# if option xx is on then plumed has beeen compiled with -D__PLUMED_HAS_XX"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment