Commit b12775d7 authored by Guillaume DOLLÉ's avatar Guillaume DOLLÉ

Up scripts

parent f6273f3a
......@@ -2,11 +2,11 @@
set -x
LIB_NAME="boost"
LIB_VERSION=1.63.0
LIB_VERSION_DOWNLOAD=1_63_0
LIB_VERSION=1.65.0
LIB_VERSION_DOWNLOAD=1_65_0
GCC_VERSION=6.4.0
MPI_LIB=openmpi
MPI_VERSION=2.1.1 #1.10.7
MPI_VERSION=1.10.7 #2.1.1
LIB_FULLNAME=${LIB_NAME}-${LIB_VERSION}
GCC_FULL=gcc-$GCC_VERSION
......
......@@ -19,8 +19,10 @@ prepend-path PATH $prefix/bin
prepend-path LD_LIBRARY_PATH $prefix/lib
prepend-path MANPATH $prefix/share/man
unsetenv LANGUAGE
unsetenv LANG
unsetenv LC
setenv FMILIB_DIR $prefix
setenv FMIL_HOME $prefix
......@@ -5,7 +5,7 @@ LIB_NAME="petsc"
LIB_VERSION=3.7.6
GCC_VERSION=6.4.0
MPI_LIB=openmpi
MPI_VERSION=2.1.1 #1.10.7
MPI_VERSION=1.10.7 #2.1.1 #1.10.7
LIB_FULLNAME=${LIB_NAME}-${LIB_VERSION}
GCC_FULL=gcc-$GCC_VERSION
......
#!/bin/bash
set -x
################################################################################
# GENERIC: Base directory for source, install, build.
SOURCE_BASE_DIR=/data/software/sources
BUILD_BASE_DIR=/data/software/sources
INSTALL_BASE_DIR=/data/software/install
MODULE_BASE_DIR=/data/software/modules
################################################################################
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
LIB_NAME="pyfmi"
LIB_VERSION=2.4.0
PYTHON3_VERSION=3.0.0
PYTHON2_VERSION=2.7.0
FMILIB_VERSION=2.0.3
GCC_VERSION=6.4.0
#GMSH_VERSION=2.16.0
LIB_VERSION_MAJOR=`echo "${LIB_VERSION}" | sed 's/\([0-9]\)[.][0-9][.][0-9]/\1/g'`
LIB_VERSION_MINOR=`echo "${LIB_VERSION}" | sed 's/[0-9][.]\([0-9]\)[.][0-9]/\1/g'`
LIB_VERSION_PATCH=`echo "${LIB_VERSION}" | sed 's/[0-9][.][0-9][.]\([0-9]\)/\1/g'`
PYTHON3_VERSION_MAJOR=`echo "${PYTHON3_VERSION}" | sed 's/\([0-9]\)[.][0-9][.][0-9]/\1/g'`
PYTHON3_VERSION_MINOR=`echo "${PYTHON3_VERSION}" | sed 's/[0-9][.]\([0-9]\)[.][0-9]/\1/g'`
PYTHON3_VERSION_PATCH=`echo "${PYTHON3_VERSION}" | sed 's/[0-9][.][0-9][.]\([0-9]\)/\1/g'`
PYTHON2_VERSION_MAJOR=`echo "${PYTHON2_VERSION}" | sed 's/\([0-9]\)[.][0-9][.][0-9]/\1/g'`
PYTHON2_VERSION_MINOR=`echo "${PYTHON2_VERSION}" | sed 's/[0-9][.]\([0-9]\)[.][0-9]/\1/g'`
PYTHON2_VERSION_PATCH=`echo "${PYTHON2_VERSION}" | sed 's/[0-9][.][0-9][.]\([0-9]\)/\1/g'`
FMILIB_VERSION_MAJOR=`echo "${FMILIB_VERSION}" | sed 's/\([0-9]\)[.][0-9][.][0-9]/\1/g'`
FMILIB_VERSION_MINOR=`echo "${FMILIB_VERSION}" | sed 's/[0-9][.]\([0-9]\)[.][0-9]/\1/g'`
FMILIB_VERSION_PATCH=`echo "${FMILIB_VERSION}" | sed 's/[0-9][.][0-9][.]\([0-9]\)/\1/g'`
GCC_VERSION_MAJOR=`echo "${GCC_VERSION}" | sed 's/\([0-9]\)[.][0-9][.][0-9]/\1/g'`
GCC_VERSION_MINOR=`echo "${GCC_VERSION}" | sed 's/[0-9][.]\([0-9]\)[.][0-9]/\1/g'`
GCC_VERSION_PATCH=`echo "${GCC_VERSION}" | sed 's/[0-9][.][0-9][.]\([0-9]\)/\1/g'`
DEPEND_PYTHON3=python-${PYTHON3_VERSION_MAJOR}
DEPEND_MODULE_PYTHON3=python${PYTHON3_VERSION_MAJOR}
DEPEND_PYTHON2=python-${PYTHON2_VERSION_MAJOR}
DEPEND_MODULE_PYTHON2=python${PYTHON2_VERSION_MAJOR}
DEPEND_FMILIB=fmilib-${FMILIB_VERSION}
DEPEND_MODULE_FMILIB=fmilib${FMILIB_VERSION_MAJOR}${FMILIB_VERSION_MINOR}${FMILIB_VERSION_PATCH}_gcc${GCC_VERSION_MAJOR}${GCC_VERSION_MINOR}${GCC_VERSION_PATCH}
#DEPEND_GMSH=gmsh-${GMSH_VERSION}
#DEPEND_MODULE_GMSH=gmsh-${PYTHON_VERSION_MAJOR}
PYTHON2_SOURCE_DIR=${SOURCE_BASE_DIR}/${LIB_NAME}/${LIB_VERSION}/${DEPEND_PYTHON2}/${DEPEND_FMILIB}
#PYTHON2_BUILD_DIR=${BUILD_BASE_DIR}/${LIB_NAME}/${LIB_VERSION}/${DEPEND_PYTHON2}/build
PYTHON2_INSTALL_DIR=${INSTALL_BASE_DIR}/${LIB_NAME}/${LIB_VERSION}/${DEPEND_PYTHON2}/${DEPEND_FMILIB}
PYTHON3_SOURCE_DIR=${SOURCE_BASE_DIR}/${LIB_NAME}/${LIB_VERSION}/${DEPEND_PYTHON3}/${DEPEND_FMILIB}
#PYTHON3_BUILD_DIR=${BUILD_BASE_DIR}/${LIB_NAME}/${LIB_VERSION}/${DEPEND_PYTHON3}/build
PYTHON3_INSTALL_DIR=${INSTALL_BASE_DIR}/${LIB_NAME}/${LIB_VERSION}/${DEPEND_PYTHON3}/${DEPEND_FMILIB}
MODULE_DIR=${MODULE_BASE_DIR}/libs/${LIB_NAME}
PYTHON2_MODULE_PATH=${MODULE_DIR}/${LIB_VERSION}_${DEPEND_MODULE_PYTHON2}_${DEPEND_MODULE_FMILIB}
PYTHON3_MODULE_PATH=${MODULE_DIR}/${LIB_VERSION}_${DEPEND_MODULE_PYTHON3}_${DEPEND_MODULE_FMILIB}
install_lib()
{
FILE_TO_SOURCE=/etc/profile.d/modules.sh
if [[ -f "${FILE_TO_SOURCE}" ]]; then
source ${FILE_TO_SOURCE}
else
echo "File to source (${FILE_TO_SOURCE}) does not exist"
fi
module purge
module load gcc/${GCC_VERSION}
module load fmilib/${FMILIB_VERSION}_gcc${GCC_VERSION_MAJOR}${GCC_VERSION_MINOR}${GCC_VERSION_PATCH}
module list
pip3 install \
--upgrade \
--force-reinstall \
--src ${PYTHON3_SOURCE_DIR} \
--target ${PYTHON3_INSTALL_DIR} \
"${LIB_NAME}==${LIB_VERSION}"
pip2.7 install \
--upgrade \
--force-reinstall \
--src ${PYTHON2_SOURCE_DIR} \
--target ${PYTHON2_INSTALL_DIR} \
"${LIB_NAME}==${LIB_VERSION}"
}
install_module()
{
cd $SCRIPT_DIR
mkdir -p ${MODULE_DIR}
export LIB_NAME
export LIB_VERSION
INSTALL_DIR=$PYTHON2_INSTALL_DIR
export INSTALL_DIR
envtpl --keep-template -o $PYTHON2_MODULE_PATH module.tmpl
INSTALL_DIR=$PYTHON3_INSTALL_DIR
export INSTALL_DIR
envtpl --keep-template -o $PYTHON3_MODULE_PATH module.tmpl
}
if [[ $1 == "module" ]]
then
install_module
else
install_lib
install_module
fi
#%Module1.0#####################################################################
###
### {{ LIB_NAME }} {{ LIB_VERSION }} module
###
proc ModulesHelp { } {
global version prefix
puts stderr "\tlibs/{{ LIB_NAME }}/{{ LIB_VERSION }} - loads {{ LIB_NAME }} {{ LIB_VERSION }} and its environment"
}
module-whatis "Loads {{ LIB_NAME }} {{ LIB_VERSION }} and its environment"
# for Tcl script use only
set version {{ LIB_VERSION }}
set prefix {{ INSTALL_DIR }}
if [module-info mode load] {
prepend-path PYTHONPATH $prefix
## Required to find openmodelica libs
prepend-path LD_LIBRARY_PATH /usr/lib/x86_64-linux-gnu/omc/
}
if [module-info mode remove] {
remove-path PYTHONPATH $prefix
remove-path LD_LIBRARY_PATH /usr/lib/x86_64-linux-gnu/omc/
}
......@@ -14,11 +14,6 @@ LIB_NAME="sympy"
LIB_VERSION=1.1.1
PYTHON_VERSION=3.0.0
# Use cern repository! (patched version)
LLVM_REPOSITORY=http://root.cern.ch/git/llvm.git
CLING_REPOSITORY=http://root.cern.ch/git/cling.git
CLANG_REPOSITORY=http://root.cern.ch/git/clang.git
LIB_VERSION_MAJOR=`echo "${LIB_VERSION}" | sed 's/\([0-9]\)[.][0-9][.][0-9]/\1/g'`
LIB_VERSION_MINOR=`echo "${LIB_VERSION}" | sed 's/[0-9][.]\([0-9]\)[.][0-9]/\1/g'`
LIB_VERSION_PATCH=`echo "${LIB_VERSION}" | sed 's/[0-9][.][0-9][.]\([0-9]\)/\1/g'`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment