Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pelahi askapingest #405

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
aec1b20
Adding askap ingest slews12sp5 specific cygnets
Oct 2, 2020
8926e9b
Update to clang cynget for askap ingest
Oct 6, 2020
537deb3
update to askap ingest cygnets
Oct 8, 2020
eb7c78a
Updates to cygnets, some bug fixes to mvapich
Oct 9, 2020
140b21d
Few more bug fixes for mvapich cygnet related to module file
Oct 9, 2020
3c37b29
Update to askap ingest specific cygnets
Oct 13, 2020
1ebebfa
Update to casacore to use build options
pelahi Oct 13, 2020
3f4556b
Update to casacore to use build options
pelahi Oct 13, 2020
0f05dbe
Update to casacore to use build options
pelahi Oct 13, 2020
2c5275f
Update to casacore to use build options
pelahi Oct 13, 2020
09e4534
Update to ice cygnet
pelahi Oct 13, 2020
47cfd04
Update to ice cygnet
pelahi Oct 13, 2020
eedb250
Update to ice cygnet
pelahi Oct 13, 2020
107548b
Update to ice cygnet
pelahi Oct 13, 2020
4e85a4c
Added casarest cygnet
pelahi Oct 13, 2020
0967a7e
Update to casarest cygnet
pelahi Oct 13, 2020
781b8b8
Update to casarest cygnet
pelahi Oct 13, 2020
243714e
Update to casarest cygnet
pelahi Oct 13, 2020
67c192f
Update to cyngets to install modules in askap-devel
Oct 19, 2020
bb5dbce
Update to ice cygnet, adding build options
pelahi Oct 20, 2020
dcc9a73
Update to ice cygnet, changed to build both cpp11 and cpp98 by default
pelahi Oct 20, 2020
ef384cd
Update to askap cygnets, added some python ones
Oct 21, 2020
90976b8
Added AOCC cygnet, still alpha
Dec 11, 2020
0458568
Update to AMD compiler cygnet
pelahi Dec 11, 2020
79ab274
Adding adios cynget
pelahi Jan 20, 2021
1618bac
Added openmpi cygnet
pelahi Jan 20, 2021
08827bc
Merge branch 'pelahi-askapingest' of https://github.com/PawseySC/maal…
pelahi Jan 20, 2021
a45da69
Some minor updates
pelahi Jan 21, 2021
18202b4
Update to handle adios2
pelahi Jan 21, 2021
221e0c4
Update to adios cygnet
pelahi Jan 25, 2021
b3ce8ed
Added openblas cygnet
pelahi Jan 27, 2021
42d1565
Update to openblas cygnet
pelahi Jan 27, 2021
2497ef4
Minor update to openblas
pelahi Jan 27, 2021
1802893
Update to casacore, fixing the build options handling
pelahi Jan 28, 2021
1f6fb5d
Bug fix for openblas usage in casacore cygnet
pelahi Jan 28, 2021
41dbfee
Updates to casarest to match cascacore build options
pelahi Jan 29, 2021
e5df297
Update to casarest cygnet
pelahi Jan 29, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
162 changes: 162 additions & 0 deletions askapingest_sles12sp5/adios.cyg
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
##############################################################################
# maali cygnet file for adios
##############################################################################

read -r -d '' MAALI_MODULE_WHATIS << EOF

The Adaptable IO System (ADIOS) provides a simple, flexible way for scientists
to describe the data in their code that may need to be written, read, or
processed outside of the running simulation. By providing an external to the
code XML file describing the various elements, their types, and how you wish
to process them this run, the routines in the host code (either Fortran or C)
can transparently change how they process the data.

For more info see https://www.olcf.ornl.gov/center-projects/adios/

EOF

#list extra build options in MAALI_TOOL_BUILD_OPTIONS_AVAIL
# adios can be built with either hdf5 or parallel hdf5
ADIOS_USE_PARALLEL_HDF5=0
ADIOS_USE_MPICH_ABI=0
MAALI_TOOL_BUILD_OPTIONS_AVAIL=("ADIOS_USE_PARALLEL_HDF5=0:1 ADIOS_USE_MPICH_ABI=0:1")

ADIOS_BUILD_CONFIG='--with-zlib --with-bzip2 --with-szip="${MAALI_SZIP_HOME}" CC=mpicc FC=mpif90 '
MAALI_TOOL_PREREQ=" szip "
if [[ ${MAALI_TOOL_MAJOR_VERSION} -ge 2 ]]; then
MAALI_TOOL_BUILD_PREREQ+=" cmake/3.19.1 "
ADIOS_BUILD_CONFIG='-DADIOS2_WITH_BZip2=ON -DADIOS2_USE_SZ=AUTO -DADIOS2_USE_MPI=ON CC=mpicc FC=mpif90 '
fi

# parse the build options, would be nice to make this a function
# the issue currently is the local scope of variables declared
if [[ ${#MAALI_TOOL_BUILD_OPTIONS[@]} -gt 0 ]]; then
for i in ${MAALI_TOOL_BUILD_OPTIONS[@]}
do
opt=(${i//=/ })
optname=${opt[0]}
optval=${opt[1]}
if [[ "$optname" -eq "ADIOS_USE_PARALLEL_HDF5" ]]; then
ADIOS_USE_PARALLEL_HDF5=$optval
fi
if [[ "$optname" -eq "ADIOS_USE_MPICH_ABI" ]]; then
ADIOS_USE_MPICH_ABI=$optval
fi
done
fi

#update build options if parallel build
if [[ $ADIOS_USE_PARALLEL_HDF5 -eq 1 ]]; then
ADIOS_HDF5_BUILD_NAME="phdf5"
if [[ ${MAALI_TOOL_MAJOR_VERSION} -ge 2 ]]; then
ADIOS_BUILD_CONFIG+=' -DADIOS2_USE_HDF5=ON -DHDF5_ROOT="${MAALI_HDF5_HOME}" '
else
ADIOS_BUILD_CONFIG+=' --with-phdf5="${MAALI_HDF5_HOME}" '
fi
MAALI_TOOL_PREREQ+=" hdf5/1.10.5-parallel-api-v110 "
else
ADIOS_HDF5_BUILD_NAME="hdf5"
if [[ ${MAALI_TOOL_MAJOR_VERSION} -ge 2 ]]; then
ADIOS_BUILD_CONFIG+=' -DADIOS2_USE_HDF5=ON -DHDF5_ROOT="${MAALI_HDF5_HOME}" '
else
ADIOS_BUILD_CONFIG+=' --with-hdf5="${MAALI_HDF5_HOME}" '
fi
MAALI_TOOL_PREREQ+=" hdf5/1.10.5-c++-noparallel-api-v110 "
fi
if [[ $ADIOS_USE_MPICH_ABI -eq 1 ]]; then
ADIOS_MPI_BUILD_NAME="mpi-abi-mpich"
MAALI_TOOL_PREREQ+=" mvapich/2.3b "
else
ADIOS_MPI_BUILD_NAME="mpi-abi-openmpi"
MAALI_TOOL_PREREQ+=" openmpi-ucx/4.0.3 "
fi

MAALI_TOOL_BUILD_OPTIONS_SUFFIX="-$ADIOS_HDF5_BUILD_NAME-$ADIOS_MPI_BUILD_NAME"

# specify which compilers we want to build the tool with
#MAALI_TOOL_COMPILERS="$MAALI_DEFAULT_COMPILERS"
MAALI_TOOL_COMPILERS="gcc/8.3.0 gcc/5.5.0"
MAALI_TOOL_CPU_TARGET="$MAALI_DEFAULT_CPU_TARGET"
MAALI_TOOL_CUDA_COMPILERS="$MAALI_DEFAULT_CUDA_COMPILERS"
if [[ $HDF_WITH_PARALLEL -eq 1 ]]; then
if [[ $MAALI_CUDA_BUILD -eq 1 ]] ; then
MAALI_TOOL_MPI_COMPILERS="$MAALI_DEFAULT_CUDAMPI_COMPILERS"
else
MAALI_TOOL_MPI_COMPILERS="$MAALI_DEFAULT_MPI_COMPILERS"
if [[ $ADIOS_USE_MPICH_ABI -eq 1 ]]; then
MAALI_TOOL_MPI_COMPILERS="mvapich/2.3b"
else
MAALI_TOOL_MPI_COMPILERS="openmpi-ucx/4.0.3"
fi
fi
fi

# URL to download the source code from
if [[ ${MAALI_TOOL_MAJOR_VERSION} -ge 2 ]]; then
MAALI_URL="https://github.com/ornladios/ADIOS2/archive/v${MAALI_TOOL_VERSION}.tar.gz"
else
MAALI_URL="http://users.nccs.gov/~pnorbert/adios-${MAALI_TOOL_VERSION}.tar.gz"
fi

# location we are downloading the source code to
MAALI_DST="$MAALI_SRC/$MAALI_TOOL_NAME-$MAALI_TOOL_VERSION.tar.bz2"

# where the unpacked source code is located
MAALI_TOOL_BUILD_DIR="$MAALI_BUILD_DIR/$MAALI_TOOL_NAME-$MAALI_TOOL_VERSION$MAALI_TOOL_SUFFIX"

MAALI_UNPACK_MKDIR=1

# type of tool (eg. apps, devel, python, etc.)
MAALI_TOOL_TYPE="devel"

# add additional configure options
MAALI_TOOL_CONFIGURE='$ADIOS_BUILD_CONFIG'

# for auto-building module files
MAALI_MODULE_SET_PATH=1
MAALI_MODULE_SET_LD_LIBRARY_PATH=1
MAALI_MODULE_SET_LIBRARY_PATH=1
MAALI_MODULE_SET_MANPATH=1
MAALI_MODULE_SET_CPATH=1
MAALI_MODULE_SET_FPATH=1
MAALI_MODULE_SET_FCPATH=1
MAALI_MODULE_SET_ADIOS_DIR='$MAALI_APP_HOME'

##############################################################################

function maali_pre_build {
# move the files extracted from tar file to appropriate directory, remove tar made directory

if [[ ${MAALI_TOOL_MAJOR_VERSION} -ge 2 ]]; then
rmdir ${MAALI_TOOL_BUILD_DIR}/${MAALI_TOOL_NAME}-${MAALI_TOOL_VERSION}
mv $MAALI_TOOL_BUILD_DIR/ADIOS2-$MAALI_TOOL_VERSION ${MAALI_TOOL_BUILD_DIR}/${MAALI_TOOL_NAME}-${MAALI_TOOL_VERSION}
fi
mv $MAALI_TOOL_BUILD_DIR/$MAALI_TOOL_NAME-$MAALI_TOOL_VERSION/* $MAALI_TOOL_BUILD_DIR/
rm -rf $MAALI_TOOL_BUILD_DIR/$MAALI_TOOL_NAME-$MAALI_TOOL_VERSION/
cd "$MAALI_TOOL_BUILD_DIR"


}

##############################################################################

function maali_cmake_build {
# for tools that use cmake
MAALI_CMAKE_PATH=$MAALI_TOOL_BUILD_DIR/
# allows late evaluation
MAALI_TOOL_CONFIGURE_EVAL=`eval echo "$MAALI_TOOL_CONFIGURE"`

# cmake likes to build in a director of it's own
maali_makedir "$MAALI_TOOL_BUILD_DIR/$MAALI_TOOL_NAME-build"
cd "$MAALI_TOOL_BUILD_DIR/$MAALI_TOOL_NAME-build"

maali_run "cmake -DCMAKE_INSTALL_PREFIX=$MAALI_INSTALL_DIR $MAALI_TOOL_CONFIGURE_EVAL $MAALI_CMAKE_PATH"
if [ $DEBUG ]; then
maali_run "make -j $MAALI_CORES VERBOSE=TRUE"
else
maali_run "make -j $MAALI_CORES"
fi
maali_run "make install"
}

##############################################################################
127 changes: 127 additions & 0 deletions askapingest_sles12sp5/aocc.cyg
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
##############################################################################
# maali cygnet file for AOCC
##############################################################################

read -r -d '' MAALI_MODULE_WHATIS << EOF

The AOCC compiler system is a high performance, production quality
code generation tool. The AOCC environment provides various options
to developers when building and optimizing C, C++, and Fortran
applications targeting 32-bit and 64-bit Linux® platforms.
The AOCC compiler system offers a high level of advanced optimizations,
multi-threading and processor support that includes global optimization,
vectorization, inter-procedural analyses, loop transformations, and code
generation. AMD also provides highly optimized libraries, which
extract the optimal performance from each x86 processor core when
utilized. The AOCC Compiler Suite simplifies and accelerates
development and tuning for x86 applications.

For further information see https://developer.amd.com/amd-aocc/

EOF

# specify which compilers we want to build the tool with
MAALI_TOOL_COMPILERS="clang/10.0.1"
#MAALI_TOOL_COMPILERS="gcc/8.3.0"

# specify the architectures we want to build the library on
MAALI_TOOL_CPU_TARGET="$MAALI_DEFAULT_TOOL_CPU_TARGET"

# URL to download the source code from
# there is no way to download source in automated fashion as requires agreeing to a EULA
MAALI_URL=""

# location we are downloading the source code to
# since the installation requires that two tar files are unpacked leave this empty
MAALI_DST=""

# where the unpacked source code is located
MAALI_TOOL_BUILD_DIR="$MAALI_BUILD_DIR/aocc-$MAALI_TOOL_VERSION.src"

# type of tool (eg. apps, devel, python, etc.)
MAALI_TOOL_TYPE="devel"

# tool pre-requisites
MAALI_TOOL_PREREQ=""

# tool pre-requisites modules needed to install this new tool/package
MAALI_TOOL_BUILD_PREREQ=""

# for auto-building module files
MAALI_MODULE_SET_PATH=1
MAALI_MODULE_SET_LD_LIBRARY_PATH=1
MAALI_MODULE_SET_LIBRARY_PATH=1
MAALI_MODULE_SET_CPATH=1
MAALI_MODULE_SET_CPLUS_INCLUDE_PATH=1
MAALI_MODULE_SET_MANPATH=1
MAALI_MODULE_SET_COMPILER='aocc'
MAALI_MODULE_SET_COMPILER_VER='$MAALI_TOOL_VERSION'
MAALI_MODULE_SET_CC='clang'
MAALI_MODULE_SET_CXX='clang++-w'

##############################################################################

function maali_build {

mkdir -p $MAALI_TOOL_BUILD_DIR
cd $MAALI_TOOL_BUILD_DIR
mkdir -p ${MAALI_INSTALL_DIR}/lib/
mkdir -p ${MAALI_INSTALL_DIR}/lib32/
mkdir -p ${MAALI_INSTALL_DIR}/libexe/
mkdir -p ${MAALI_INSTALL_DIR}/include/
mkdir -p ${MAALI_INSTALL_DIR}/bin/
mkdir -p ${MAALI_INSTALL_DIR}/share/

# first unpack the compiler
tar xf ${MAALI_SRC}/aocc-compiler-${MAALI_TOOL_VERSION}.0.tar
mv aocc-compiler-${MAALI_TOOL_VERSION}.0 aocc
# then unpack the math libraries
tar xf ${MAALI_SRC}/aocl-linux-aocc-${MAALI_TOOL_VERSION}-4.tar.gz
mv aocl-linux-aocc-${MAALI_TOOL_VERSION}-4 aocl

# now install the amd optimised libraries to the install directory
cd aocl
./install.sh -t $(pwd)
cp -r ./${MAALI_TOOL_VERSION}/lib/* ${MAALI_INSTALL_DIR}/lib/
cp -r ./${MAALI_TOOL_VERSION}/include/* ${MAALI_INSTALL_DIR}/include/
cd ../

# for aocc compiler need to add the math library path to the LD_LIBRARY_PATH
# and the LIBRARY_PATH
export LD_LIBRARY_PATH=${MAALI_INSTALL_DIR}/lib/:${LD_LIBRARY_PATH}
export LIBRARY_PATH=${MAALI_INSTALL_DIR}/lib/:${LIBRARY_PATH}

# also need to explicitly add the libm to the LIBRARY_PATH
export LIBRARY_PATH=/usr/lib64:${LIBRARY_PATH}

# now install the compilers themselves
cd aocc
# check that the prereqs are met and that all is well
./AOCC-prerequisites-check.sh
cd ../

cp -r aocc/bin/* ${MAALI_INSTALL_DIR}/bin/
cp -r aocc/lib/* ${MAALI_INSTALL_DIR}/lib/
cp -r aocc/lib32/* ${MAALI_INSTALL_DIR}/lib32/
cp -r aocc/libexe/* ${MAALI_INSTALL_DIR}/libexe/
cp -r aocc/include/* ${MAALI_INSTALL_DIR}/include/
cp -r aocc/share/* ${MAALI_INSTALL_DIR}/share/
rm -rf aocl
rm -rf aocc

# add a C++ wrapper to the amd optimised clang++ compiler to use the libc++ library
cd ${MAALI_INSTALL_DIR}/bin
echo "#! /bin/bash" >> clang++-w
echo "# " >> clang++-w
echo "# This file is wraps the clang C++ compiler so as to always use the libc++ library." >> clang++-w
echo "# Simple script to compile and/or link C++ programs." >> clang++-w
echo "#" >> clang++-w
echo "# Handling of command-line options:" >> clang++-w
echo "# This is a little tricky because some options may contain blanks." >> clang++-w
echo "# Currently all command line options are just forwarded to clang++ but it" >>clang++-w
echo "# it might be useful to add some handling like --showme" >> clang++-w
echo "" >> clang++-w
echo "# run the compiler" >> clang++-w
echo "clang++ -stdlib=libc++ \"\$@\"" >> clang++-w

}
92 changes: 92 additions & 0 deletions askapingest_sles12sp5/boost.cyg
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
##############################################################################
# maali cygnet file for Boost
##############################################################################

read -r -d '' MAALI_MODULE_WHATIS << EOF

Boost provides free peer-reviewed portable C++ source libraries.

We emphasize libraries that work well with the C++ Standard Library. Boost
libraries are intended to be widely useful, and usable across a broad spectrum
of applications. The Boost license encourages both commercial and
non-commercial use.

For further information see http://www.boost.org/

EOF

# Request only the latest GNU and Intel compilers to be used
MAALI_TOOL_COMPILERS="$MAALI_DEFAULT_COMPILERS"

# needed for this URL
MAALI_BOOST_VERSION=`echo $MAALI_TOOL_VERSION| sed -e 's/\./_/g'`

# URL to download the source code from
MAALI_URL="http://sourceforge.net/projects/$MAALI_TOOL_NAME/files/$MAALI_TOOL_NAME/$MAALI_TOOL_VERSION/"$MAALI_TOOL_NAME"_"$MAALI_BOOST_VERSION".tar.bz2/download"

# location we are downloading the source code to
MAALI_DST="$MAALI_SRC/"$MAALI_TOOL_NAME"_"$MAALI_BOOST_VERSION".tar.bz2"

# where the unpacked source code is located
MAALI_TOOL_BUILD_DIR="$MAALI_BUILD_DIR/"$MAALI_TOOL_NAME"_"$MAALI_BOOST_VERSION

# type of tool (eg. apps, devel, python, etc.)
MAALI_TOOL_TYPE="devel"

# tool pre-requisites
MAALI_TOOL_PREREQ="$MAALI_DEFAULT_PYTHON"

# for auto-building module files
MAALI_MODULE_SET_LD_LIBRARY_PATH=1
MAALI_MODULE_SET_LIBRARY_PATH=1
MAALI_MODULE_SET_CPATH=1
MAALI_MODULE_SET_C_INCLUDE_PATH=1
MAALI_MODULE_SET_CPLUS_INCLUDE_PATH=1
MAALI_MODULE_SET_BOOST_ROOT='$MAALI_APP_HOME'

##############################################################################

function maali_build {

cd "$MAALI_TOOL_BUILD_DIR"

#https://github.com/HIT-SCIR/pyltp/pull/193
if [ "$MAALI_TOOL_VERSION" == "1.66.0" ]; then
sed -i -e 's;return PyUnicode_Check(obj) ? _PyUnicode_AsString(obj) : 0;return (void *)(PyUnicode_Check(obj) ? _PyUnicode_AsString(obj) : 0);g' libs/python/src/converter/builtin_converters.cpp
fi

export MAALI_CORES=12
# Intel-compiler specifics
if [[ "$MAALI_COMPILER_NAME" == "intel"* ]]; then

if [ "$MAALI_TOOL_MINOR_VERSION" -ge 66 ]; then
maali_run "./bootstrap.sh --prefix=$MAALI_INSTALL_DIR --with-toolset=intel-linux"
maali_run "./b2 -j$MAALI_CORES install toolset=intel --prefix=$MAALI_INSTALL_DIR"
else
maali_run "./bootstrap.sh --prefix=$MAALI_INSTALL_DIR --with-toolset=intel-linux"
maali_run "./bjam -j$MAALI_CORES toolset=intel release"
maali_run "./bjam install --prefix=$MAALI_INSTALL_DIR"
fi

# GNU compiler specifics
else

if [ "$MAALI_TOOL_MINOR_VERSION" -ge 66 ]; then
maali_run "./bootstrap.sh --prefix=$MAALI_INSTALL_DIR --with-toolset=gcc"
maali_run "./b2 -j$MAALI_CORES install toolset=gcc --prefix=$MAALI_INSTALL_DIR"
else
maali_run "./bootstrap.sh --prefix=$MAALI_INSTALL_DIR --without-libraries=python"
maali_run "./bjam -j$MAALI_CORES toolset=gcc release"
maali_run "./bjam install --prefix=$MAALI_INSTALL_DIR"
fi

fi

if [ "$MAALI_TOOL_VERSION" == "1.64.0" ]; then
sed -i -e 's;#include <boost/serialization/array.hpp>;#include <boost/serialization/array_wrapper.hpp>;g;' $MAALI_INSTALL_DIR/include/boost/numeric/ublas/matrix.hpp
sed -i -e 's;#include <boost/serialization/array.hpp>;#include <boost/serialization/array_wrapper.hpp>;g;' $MAALI_INSTALL_DIR/include/boost/numeric/ublas/storage.hpp
fi

}

##############################################################################
Loading