From bf6b5a6cb92757c1ce7c18a542789e44fc280c2f Mon Sep 17 00:00:00 2001 From: Bill Ladwig Date: Sat, 8 Apr 2017 11:53:35 -0600 Subject: [PATCH 1/4] Added build script for wrapt --- hpc_install/build-wrapt | 45 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 hpc_install/build-wrapt diff --git a/hpc_install/build-wrapt b/hpc_install/build-wrapt new file mode 100644 index 0000000..7037e6f --- /dev/null +++ b/hpc_install/build-wrapt @@ -0,0 +1,45 @@ +#!/bin/bash +# +#HPCI -n wrapt +#HPCI -v 1.10.10 +#HPCI -a wrapt-1.10.10.tar.gz +#HPCI -p gnu/4.8.2 +#HPCI -p python/2.7.7 + +set -e + +PKG="wrapt" +VERSION="1.10.10" +PKGSRC=$PKG"-"$VERSION + +tar -xvf $PKGSRC".tar.gz" > /dev/null +cd $PKGSRC +python setup.py build + +# Create the module directory +mkdir -p $HPCI_MOD_DIR/pythonpkgs/$HPCI_SW_NAME/ + +# Create the module with the following template +cat << EOF > $HPCI_MOD_DIR/pythonpkgs/$HPCI_SW_NAME/${HPCI_SW_VERSION}.lua +require("posix") + +whatis("wrapt v$HPCI_SW_VERSION") + +help([[ +This module loads wrapt, a Python package that provides fully functional +decorators. See https://wrapt.readthedocs.io/en/latest/ for details. +]]) + +local verpath = "$HPCI_SW_DIR" -- specific version path +local pytestpath = pathJoin(verpath, "lib/python2.7/site-packages/") -- internal python libs + +prepend_path("PYTHONPATH", pytestpath) + +conflict("all-python-libs") +prereq("python/2.7.7") +EOF + +mkdir -p $HPCI_SW_DIR/lib/python2.7/site-packages/ # create the install directory (python does not install in not existing dirs) + +python setup.py install --prefix=$HPCI_SW_DIR + From 32bdfb2f2ca8066a4a1c37b1e047b67df886e884 Mon Sep 17 00:00:00 2001 From: Bill Ladwig Date: Mon, 10 Apr 2017 16:36:06 -0600 Subject: [PATCH 2/4] Added yellowstone hpcinstall scripts --- hpc_install/{build-wrapt => build-wrapt.ys} | 3 ++ hpc_install/build-wrf-python.ys | 54 +++++++++++++++++++++ 2 files changed, 57 insertions(+) rename hpc_install/{build-wrapt => build-wrapt.ys} (89%) create mode 100644 hpc_install/build-wrf-python.ys diff --git a/hpc_install/build-wrapt b/hpc_install/build-wrapt.ys similarity index 89% rename from hpc_install/build-wrapt rename to hpc_install/build-wrapt.ys index 7037e6f..feaf9d4 100644 --- a/hpc_install/build-wrapt +++ b/hpc_install/build-wrapt.ys @@ -41,5 +41,8 @@ EOF mkdir -p $HPCI_SW_DIR/lib/python2.7/site-packages/ # create the install directory (python does not install in not existing dirs) +# Need to set pythonpath in order to dump the .pth files +export PYTHONPATH=${HPCI_SW_DIR}/lib/python2.7/site-packages:$PYTHONPATH + python setup.py install --prefix=$HPCI_SW_DIR diff --git a/hpc_install/build-wrf-python.ys b/hpc_install/build-wrf-python.ys new file mode 100644 index 0000000..e946fee --- /dev/null +++ b/hpc_install/build-wrf-python.ys @@ -0,0 +1,54 @@ +#!/bin/bash +# +#HPCI -n wrf-python +#HPCI -v 1.0.1 +#HPCI -a wrf-python-1.0.1.tar.gz +#HPCI -p gnu/4.8.2 +#HPCI -p python/2.7.7 +#HPCI -p numpy/1.11.0 + +set -e + +PKG="wrf-python" +VERSION="1.0.1" +PKGSRC=$PKG"-"$VERSION + +tar -xvf $PKGSRC".tar.gz" > /dev/null +cd $PKGSRC +python setup.py build + +# Create the module directory +mkdir -p $HPCI_MOD_DIR/pythonpkgs/$HPCI_SW_NAME/ + +# Create the module with the following template +cat << EOF > $HPCI_MOD_DIR/pythonpkgs/$HPCI_SW_NAME/${HPCI_SW_VERSION}.lua +require("posix") + +whatis("wrapt v$HPCI_SW_VERSION") + +help([[ +This module loads wrf-python, a Python package that provides diagnostic and +interpolation routines for users of the WRF-ARW model. +See http://wrf-python.rtfd.org for details. +]]) + +local verpath = "$HPCI_SW_DIR" -- specific version path +local pytestpath = pathJoin(verpath, "lib/python2.7/site-packages/") -- internal python libs + +prepend_path("PYTHONPATH", pytestpath) + +conflict("all-python-libs") +prereq("python/2.7.7") +prereq("numpy/1.11.0") +prereq("wrapt/1.10.10") +prereq("xarray/0.8.2") + +EOF + +mkdir -p $HPCI_SW_DIR/lib/python2.7/site-packages/ # create the install directory (python does not install in not existing dirs) + +# Need to set pythonpath in order to dump the .pth files +export PYTHONPATH=${HPCI_SW_DIR}/lib/python2.7/site-packages:$PYTHONPATH + +python setup.py install --prefix=$HPCI_SW_DIR + From 83bd98cd308a5056892fb6730739461a1dbe5d18 Mon Sep 17 00:00:00 2001 From: Bill Ladwig Date: Wed, 12 Apr 2017 16:49:06 -0600 Subject: [PATCH 3/4] Added yellowstone installation. Fixed typo in build-wrf-python.ys script. --- hpc_install/build-wrf-python.ys | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hpc_install/build-wrf-python.ys b/hpc_install/build-wrf-python.ys index e946fee..61d3ca6 100644 --- a/hpc_install/build-wrf-python.ys +++ b/hpc_install/build-wrf-python.ys @@ -24,7 +24,7 @@ mkdir -p $HPCI_MOD_DIR/pythonpkgs/$HPCI_SW_NAME/ cat << EOF > $HPCI_MOD_DIR/pythonpkgs/$HPCI_SW_NAME/${HPCI_SW_VERSION}.lua require("posix") -whatis("wrapt v$HPCI_SW_VERSION") +whatis("wrf-python v$HPCI_SW_VERSION") help([[ This module loads wrf-python, a Python package that provides diagnostic and From 2e29be9b7d7d16def86f1fe60880215a514991fc Mon Sep 17 00:00:00 2001 From: Bill Ladwig Date: Thu, 27 Apr 2017 14:53:29 -0600 Subject: [PATCH 4/4] Updated hpc install scripts to match what is actually on yellowstone --- hpc_install/build-wrapt.ys | 11 ++++------- hpc_install/build-wrf-python.ys | 21 +++++++++------------ 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/hpc_install/build-wrapt.ys b/hpc_install/build-wrapt.ys index feaf9d4..8d4e13c 100644 --- a/hpc_install/build-wrapt.ys +++ b/hpc_install/build-wrapt.ys @@ -8,11 +8,9 @@ set -e -PKG="wrapt" -VERSION="1.10.10" -PKGSRC=$PKG"-"$VERSION +PKGSRC=$HPCI_SW_NAME"-"${HPCI_SW_VERSION} -tar -xvf $PKGSRC".tar.gz" > /dev/null +tar -xf $PKGSRC".tar.gz" cd $PKGSRC python setup.py build @@ -36,13 +34,12 @@ local pytestpath = pathJoin(verpath, "lib/python2.7/site-packages/") -- internal prepend_path("PYTHONPATH", pytestpath) conflict("all-python-libs") -prereq("python/2.7.7") EOF mkdir -p $HPCI_SW_DIR/lib/python2.7/site-packages/ # create the install directory (python does not install in not existing dirs) # Need to set pythonpath in order to dump the .pth files -export PYTHONPATH=${HPCI_SW_DIR}/lib/python2.7/site-packages:$PYTHONPATH +ml use $HPCI_MOD_DIR/pythonpkgs +ml $HPCI_SW_NAME/${HPCI_SW_VERSION} python setup.py install --prefix=$HPCI_SW_DIR - diff --git a/hpc_install/build-wrf-python.ys b/hpc_install/build-wrf-python.ys index 61d3ca6..2512222 100644 --- a/hpc_install/build-wrf-python.ys +++ b/hpc_install/build-wrf-python.ys @@ -6,14 +6,14 @@ #HPCI -p gnu/4.8.2 #HPCI -p python/2.7.7 #HPCI -p numpy/1.11.0 +#HPCI -p wrapt/1.10.10 +#HPCI -p scipy/0.17.1 bottleneck/1.1.0 numexpr/2.6.0 pyside/1.1.2 matplotlib/1.5.1 pandas/0.18.1 netcdf4python/1.2.4 xarray/0.8.2 set -e -PKG="wrf-python" -VERSION="1.0.1" -PKGSRC=$PKG"-"$VERSION +PKGSRC=$HPCI_SW_NAME"-"${HPCI_SW_VERSION} -tar -xvf $PKGSRC".tar.gz" > /dev/null +tar -xf $PKGSRC".tar.gz" cd $PKGSRC python setup.py build @@ -33,22 +33,19 @@ See http://wrf-python.rtfd.org for details. ]]) local verpath = "$HPCI_SW_DIR" -- specific version path -local pytestpath = pathJoin(verpath, "lib/python2.7/site-packages/") -- internal python libs +local pypath = pathJoin(verpath, "lib/python2.7/site-packages/") -- internal python libs -prepend_path("PYTHONPATH", pytestpath) +prepend_path("PYTHONPATH", pypath) conflict("all-python-libs") -prereq("python/2.7.7") -prereq("numpy/1.11.0") -prereq("wrapt/1.10.10") -prereq("xarray/0.8.2") - +prereq($HPCI_MOD_PREREQ) EOF mkdir -p $HPCI_SW_DIR/lib/python2.7/site-packages/ # create the install directory (python does not install in not existing dirs) # Need to set pythonpath in order to dump the .pth files -export PYTHONPATH=${HPCI_SW_DIR}/lib/python2.7/site-packages:$PYTHONPATH +ml use $HPCI_MOD_DIR/pythonpkgs +ml $HPCI_SW_NAME/${HPCI_SW_VERSION} python setup.py install --prefix=$HPCI_SW_DIR