Makefile build support for USER-ADIOS and build documentation

This commit is contained in:
Norbert Podhorszki 2019-02-20 14:42:28 -05:00
parent 75fe967876
commit 1179beb543
6 changed files with 97 additions and 42 deletions

View File

@ -37,6 +37,7 @@ This is the list of packages that may require additional steps.
"POEMS"_#poems,
"PYTHON"_#python,
"VORONOI"_#voronoi,
"USER-ADIOS"_#user-adios,
"USER-ATC"_#user-atc,
"USER-AWPMD"_#user-awpmd,
"USER-COLVARS"_#user-colvars,
@ -576,6 +577,28 @@ the lib/voronoi/Makefile.lammps file.
:line
USER-ADIOS package :h4,link(user-adios)
The USER-ADIOS package requires the "ADIOS I/O library"_https://github.com/ornladios/ADIOS2, version 2.3.1 or newer.
Make sure that you have ADIOS built with/without MPI if you build LAMMPS with/without MPI, respectively.
[CMake build]:
-D ADIOS2_DIR=path # path is where ADIOS 2.x is installed
-D PKG_USER-ADIOS=yes :pre
[Traditional make]:
Turn on the USER-ADIOS package before building LAMMPS. If the ADIOS 2.x software is installed in PATH, there is nothing else to do:
make yes-user-adios :pre
otherwise, set ADIOS2_DIR environment variable when turning on the package:
ADIOS2_DIR=path make yes-user-adios # path is where ADIOS 2.x is installed :pre
:line
USER-ATC package :h4,link(user-atc)
The USER-ATC package requires the MANYBODY package also be installed.

View File

@ -48,6 +48,7 @@ packages:
"POEMS"_Build_extras.html#poems,
"PYTHON"_Build_extras.html#python,
"VORONOI"_Build_extras.html#voronoi,
"USER-ADIOS"_Build_extras.html#user-adios,
"USER-ATC"_Build_extras.html#user-atc,
"USER-AWPMD"_Build_extras.html#user-awpmd,
"USER-COLVARS"_Build_extras.html#user-colvars,

View File

@ -63,6 +63,7 @@ as contained in the file name.
"SRD"_#PKG-SRD,
"VORONOI"_#PKG-VORONOI :tb(c=6,ea=c)
"USER-ADIOS"_#PKG-USER-ADIOS,
"USER-ATC"_#PKG-USER-ATC,
"USER-AWPMD"_#PKG-USER-AWPMD,
"USER-BOCS"_#PKG-USER-BOCS,
@ -975,6 +976,31 @@ examples/voronoi :ul
:line
USER-ADIOS package :link(PKG-USER-ADIOS),h4
[Contents:]
ADIOS is a high-performance I/O library. This package implements the
dump "atom/adios" and dump "custom/adios" commands to write data using
the ADIOS library.
[Authors:] Norbert Podhorszki (ORNL) from the ADIOS developer team.
[Install:]
This package has "specific installation
instructions"_Build_extras.html#user-adios on the "Build
extras"_Build_extras.html doc page.
[Supporting info:]
src/USER-ADIOS: filenames -> commands
src/USER-ADIOS/README
examples/USER/adios
https://github.com/ornladios/ADIOS2 :ul
:line
USER-ATC package :link(PKG-USER-ATC),h4
[Contents:]

View File

@ -38,6 +38,7 @@ int = internal library: provided with LAMMPS, but you may need to build it
ext = external library: you will need to download and install it on your machine :ul
Package, Description, Doc page, Example, Library
"USER-ADIOS"_Packages_details.html#PKG-USER-ADIOS, dump output via ADIOS, "dump adios"_dump_adios.html, USER/adios, ext
"USER-ATC"_Packages_details.html#PKG-USER-ATC, Atom-to-Continuum coupling, "fix atc"_fix_atc.html, USER/atc, int
"USER-AWPMD"_Packages_details.html#PKG-USER-AWPMD, wave packet MD, "pair_style awpmd/cut"_pair_awpmd.html, USER/awpmd, int
"USER-BOCS"_Packages_details.html#PKG-USER-BOCS, BOCS bottom up coarse graining, "fix bocs"_fix_bocs.html, USER/bocs, no

View File

@ -58,7 +58,7 @@ PACKAGE = asphere body class2 colloid compress coreshell dipole gpu \
molecule mpiio mscg opt peri poems \
python qeq replica rigid shock snap spin srd voronoi
PACKUSER = user-atc user-awpmd user-bocs user-cgdna user-cgsdk user-colvars \
PACKUSER = user-adios user-atc user-awpmd user-bocs user-cgdna user-cgsdk user-colvars \
user-diffraction user-dpd user-drude user-eff user-fep user-h5md \
user-intel user-lb user-manifold user-meamc user-meso \
user-mgpt user-misc user-mofff user-molfile \

View File

@ -30,60 +30,64 @@ done
if (test $1 = 1) then
# if (test -z "$ADIOS_DIR") then
# if command -v adios_config; then
# ADIOS_DIR=`adios_config -d`
# else
# echo "ERROR: ADIOS_DIR environment variable needs to point to ADIOS" \
# " installation directory or adios_config should be in PATH"
# fi
# fi
# ADIOS_INC=-I${ADIOS_DIR}/include
# ADIOS_LIB=`${ADIOS_DIR}/bin/adios_config -l`
#
# echo "adios_SYSINC=${ADIOS_INC}
#adios_SYSLIB=${ADIOS_LIB}
#adios_SYSPATH=${ADIOS_DIR}
#" > ../Makefile.adios
if (test -e ../Makefile.package) then
sed -i -e 's/[^ \t]*adios[^ \t]* //g' ../Makefile.package
sed -i -e 's/-DLMP_ADIOS //g' ../Makefile.package
sed -i -e '/^adios_SYS.*$/d' ../Makefile.package
# sed -i -e '4 i \
#adios_SYSINC='"${ADIOS_INC}"'
#' ../Makefile.package
# sed -i -e '5 i \
#adios_SYSLIB='"${ADIOS_LIB}"'
#' ../Makefile.package
# sed -i -e '6 i \
#adios_SYSPATH='"${ADIOS_DIR}"'
#' ../Makefile.package
sed -i -e 's|^PKG_INC =[ \t]*|&-DLMP_ADIOS |' ../Makefile.package
sed -i -e 's|^PKG_SYSINC =[ \t]*|&$(adios_SYSINC) |' ../Makefile.package
sed -i -e 's|^PKG_SYSLIB =[ \t]*|&$(adios_SYSLIB) |' ../Makefile.package
sed -i -e 's|^PKG_SYSPATH =[ \t]*|&$(adios_SYSPATH) |' ../Makefile.package
CONFIGSCRIPT=none
if ( test `which adios2-config` ) then
CONFIGSCRIPT=adios2-config
elif ( ! test -z "$ADIOS2_DIR" ) then
if ( test `which $ADIOS2_DIR/bin/adios2-config` ) then
CONFIGSCRIPT=$ADIOS2_DIR/bin/adios2-config
else
echo "ERROR: ADIOS2_DIR environment variable is set but" \
"\$ADIOS2_DIR/bin/adios2-config does not exist"
fi
elif ( ! test -z "$ADIOS_DIR" ) then
if ( test `which $ADIOS_DIR/bin/adios2-config` ) then
CONFIGSCRIPT=$ADIOS_DIR/bin/adios2-config
else
echo "ERROR: ADIOS_DIR environment variable is set but" \
"\$ADIOS_DIR/bin/adios2-config does not exist"
fi
else
echo "ERROR: ADIOS2_DIR environment variable must point to ADIOS 2.x" \
"installation directory or adios2-config should be in PATH"
fi
if (test -e ../Makefile.package.settings) then
sed -i -e '/^include.*adios.*$/d' ../Makefile.package.settings
# multiline form needed for BSD sed on Macs
sed -i -e '4 i \
include ..\/..\/lib\/adios\/Makefile.lammps
if [ "$CONFIGSCRIPT" != "none" ]; then
ADIOS2_INC=`$CONFIGSCRIPT --cxx-flags`
ADIOS2_LIB=`$CONFIGSCRIPT --cxx-libs`
echo "adios_SYSINC=${ADIOS2_INC}
adios_SYSLIB=${ADIOS2_LIB}
" > Makefile.lammps
if (test -e ../Makefile.package) then
sed -i -e 's/[^ \t]*adios[^ \t]* //g' ../Makefile.package
sed -i -e '/^adios_SYS.*$/d' ../Makefile.package
sed -i -e 's|^PKG_SYSINC =[ \t]*|&$(adios_SYSINC) |' ../Makefile.package
sed -i -e 's|^PKG_SYSLIB =[ \t]*|&$(adios_SYSLIB) |' ../Makefile.package
fi
if (test -e ../Makefile.package.settings) then
sed -i -e '/^include.*ADIOS.*$/d' ../Makefile.package.settings
# multiline form needed for BSD sed on Macs
sed -i -e '4 i \
include ../USER-ADIOS/Makefile.lammps
' ../Makefile.package.settings
fi
fi
elif (test $1 = 0) then
if (test -e ../Makefile.package) then
sed -i -e 's/[^ \t]*adios[^ \t]* //g' ../Makefile.package
sed -i -e 's/-DLMP_ADIOS //g' ../Makefile.package
sed -i -e '/^adios_SYS.*$/d' ../Makefile.package
fi
if (test -e ../Makefile.package.settings) then
sed -i -e '/^include.*adios.*$/d' ../Makefile.package.settings
sed -i -e '/^include.*ADIOS.*$/d' ../Makefile.package.settings
fi
rm -f Makefile.lammps
fi