Skip to content
Snippets Groups Projects
Commit bad139bf authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Merge remote-tracking branch 'origin/v2.2'

parents 9950ebcd 44a2f66f
No related branches found
No related tags found
No related merge requests found
......@@ -55,6 +55,7 @@ multiple_actions=
otherfiles=
save_originals=
quiet=
mdroot=
for option
do
......@@ -73,9 +74,11 @@ do
(--new=*) test -n "$action" && multiple_actions=yes ; action=new ; newpatch="${prefix_option#--new=}" ;;
(--description) echo "patch an MD engine" ; exit ;;
(--engine=*) engine="${prefix_option#--engine=}" ;;
(--mdroot=*) mdroot="${prefix_option#--mdroot=}" ;;
(--mode=*) mode="${prefix_option#--mode=}" ;;
(--diff=*) diff="${prefix_option#--diff=}" ;;
(--engine|-e) prefix="--engine=" ;;
(--mdroot) prefix="--mdroot" ;;
(--root=*) prefix="--root="; PLUMED_ROOT="${prefix_option#--root=}" ;;
(--diff|-d) prefix="--diff=" ;;
(--mode|-m) prefix="--mode=" ;;
......@@ -91,6 +94,13 @@ do
esac
done
if [ -n "$mdroot" ] ; then
if ! cd "$mdroot" ; then
echo "Directory $mdroot does not exist"
exit
fi
fi
if [ -n "$multiple_actions" ] ; then
echo "Too many actions. -h for help"
exit
......
......@@ -124,6 +124,16 @@ plumed_plumedmain_function_holder* plumed_kernel_register(const plumed_plumedmai
void* p;
if(first && f==NULL){
path=getenv("PLUMED_KERNEL");
#ifdef __PLUMED_DEFAULT_KERNEL
/*
This variable allows a default path for the kernel to be hardcoded.
Can be usedful for hardcoding the predefined plumed location
still allowing the user to override this choice setting PLUMED_KERNEL.
The path should be chosen at compile time adding e.g.
-D__PLUMED_DEFAULT_KERNEL=\"/opt/local/lib/libplumed.dylib\"
*/
if(! (path && (*path) )) path=__PLUMED_DEFAULT_KERNEL;
#endif
if(path && (*path)){
fprintf(stderr,"+++ Loading the PLUMED kernel runtime +++\n");
fprintf(stderr,"+++ PLUMED_KERNEL=\"%s\" +++\n",path);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment