From fb2ad645ed970e099768e938fe63d60b87d35910 Mon Sep 17 00:00:00 2001 From: tad4 <121957038+tad4@users.noreply.github.com> Date: Wed, 26 Apr 2023 18:47:03 -0400 Subject: [PATCH 1/8] Update Linear Algebra (LA) toolchain variables LA toolchain variable configuration has been updated to be CPU architecture-independent. --- pts/hpcc-1.2.8/install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pts/hpcc-1.2.8/install.sh b/pts/hpcc-1.2.8/install.sh index 6890fe2a..a1c6e2c6 100644 --- a/pts/hpcc-1.2.8/install.sh +++ b/pts/hpcc-1.2.8/install.sh @@ -123,18 +123,18 @@ then LA_INCLUDE=/usr/include LA_LIBS="-L$LA_PATH -lblas" LA_VERSION="ATLAS" -elif [ -d /usr/lib/x86_64-linux-gnu/atlas ] +elif [ -d /usr/lib/${OS_ARCH}-linux-gnu/atlas ] then # ATLAS on Ubuntu - LA_PATH=/usr/lib/x86_64-linux-gnu/atlas - LA_INCLUDE=/usr/include/x86_64-linux-gnu/ + LA_PATH=/usr/lib/${OS_ARCH}-linux-gnu/atlas + LA_INCLUDE=/usr/include/${OS_ARCH}-linux-gnu/ LA_LIBS="-L$LA_PATH -lblas" LA_VERSION="ATLAS" -elif [ -d /usr/lib/x86_64-linux-gnu/blas ] +elif [ -d /usr/lib/${OS_ARCH}-linux-gnu/blas ] then # OpenBLAS on Ubuntu - LA_PATH=/usr/lib/x86_64-linux-gnu/blas - LA_INCLUDE=/usr/include/x86_64-linux-gnu/ + LA_PATH=/usr/lib/${OS_ARCH}-linux-gnu/blas + LA_INCLUDE=/usr/include/${OS_ARCH}-linux-gnu/ LA_LIBS="-L$LA_PATH -lblas" LA_VERSION="OpenBLAS" fi From 10977167a46ec67fd789f5efb964c30d24e1f095 Mon Sep 17 00:00:00 2001 From: tad4 <121957038+tad4@users.noreply.github.com> Date: Wed, 26 Apr 2023 19:45:57 -0400 Subject: [PATCH 2/8] Convert install procedure to use `OS_ARCH` var MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All hard-coded architecture-dependent paths have been revised to use PTS' `OS_ARCH` variable when searching for—as well as configuring—toolchain variables. --- pts/hpcc-1.2.8/install.sh | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/pts/hpcc-1.2.8/install.sh b/pts/hpcc-1.2.8/install.sh index a1c6e2c6..f1abb444 100644 --- a/pts/hpcc-1.2.8/install.sh +++ b/pts/hpcc-1.2.8/install.sh @@ -16,28 +16,20 @@ then MPI_LIBS=/usr/lib/openmpi/lib/libmpi.so MPI_CC=/usr/bin/mpicc.openmpi MPI_VERSION=`$MPI_CC -showme:version 2>&1 | grep MPI | cut -d "(" -f1 | cut -d ":" -f2` -elif [ -d /usr/lib/x86_64-linux-gnu/openmpi/ ] && [ -d /usr/include/openmpi/ ] +elif [ -d /usr/lib/${OS_ARCH}-linux-gnu/openmpi/ ] && [ -d /usr/include/openmpi/ ] then # OpenMPI On Debian - MPI_PATH=/usr/lib/x86_64-linux-gnu/openmpi + MPI_PATH=/usr/lib/${OS_ARCH}-linux-gnu/openmpi MPI_INCLUDE=/usr/include/openmpi/ - MPI_LIBS=/usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so + MPI_LIBS=/usr/lib/${OS_ARCH}-linux-gnu/openmpi/lib/libmpi.so MPI_CC=/usr/bin/mpicc MPI_VERSION=`$MPI_CC -showme:version 2>&1 | grep MPI | cut -d "(" -f1 | cut -d ":" -f2` -elif [ -d /usr/lib/x86_64-linux-gnu/openmpi/ ] && [ -d /usr/lib/x86_64-linux-gnu/openmpi/include/ ] +elif [ -d /usr/lib/${OS_ARCH}-linux-gnu/openmpi/ ] && [ -d /usr/lib/${OS_ARCH}-linux-gnu/openmpi/include/ ] then # OpenMPI On Newer Ubuntu - MPI_PATH=/usr/lib/x86_64-linux-gnu/openmpi - MPI_INCLUDE=/usr/lib/x86_64-linux-gnu/openmpi/include/ - MPI_LIBS=/usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so - MPI_CC=/usr/bin/mpicc - MPI_VERSION=`$MPI_CC -showme:version 2>&1 | grep MPI | cut -d "(" -f1 | cut -d ":" -f2` -elif [ -d /usr/lib/aarch64-linux-gnu/openmpi/ ] && [ -d /usr/lib/aarch64-linux-gnu/openmpi/include/ ] -then - # OpenMPI On Newer Ubuntu AArch64 - MPI_PATH=/usr/lib/aarch64-linux-gnu/openmpi - MPI_INCLUDE=/usr/lib/aarch64-linux-gnu/openmpi/include/ - MPI_LIBS=/usr/lib/aarch64-linux-gnu/openmpi/lib/libmpi.so + MPI_PATH=/usr/lib/${OS_ARCH}-linux-gnu/openmpi + MPI_INCLUDE=/usr/lib/${OS_ARCH}-linux-gnu/openmpi/include/ + MPI_LIBS=/usr/lib/${OS_ARCH}-linux-gnu/openmpi/lib/libmpi.so MPI_CC=/usr/bin/mpicc MPI_VERSION=`$MPI_CC -showme:version 2>&1 | grep MPI | cut -d "(" -f1 | cut -d ":" -f2` elif [ -d /usr/lib64/openmpi ] && [ -x /usr/bin/mpicc ] @@ -52,7 +44,7 @@ elif [ -d /usr/lib64/openmpi ] && [ -x /usr/lib64/openmpi/bin/mpicc ] then # OpenMPI On RHEL MPI_PATH=/usr/lib64/openmpi - MPI_INCLUDE=/usr/include/openmpi-x86_64/ + MPI_INCLUDE=/usr/include/openmpi-${OS_ARCH}/ MPI_LIBS=/usr/lib64/openmpi/lib/libmpi.so MPI_CC=/usr/lib64/openmpi/bin/mpicc MPI_VERSION=`$MPI_CC -showme:version 2>&1 | grep MPI | cut -d "(" -f1 | cut -d ":" -f2` @@ -80,11 +72,11 @@ then MPI_LIBS=/usr/lib/mpich2/lib/libmpich.so MPI_CC=/usr/bin/mpicc.mpich2 MPI_VERSION=`$MPI_CC -v 2>&1 | grep "MPICH2 version"` -elif [ -d /usr/include/mpich2-x86_64 ] +elif [ -d /usr/include/mpich2-${OS_ARCH} ] then # MPICH2 - MPI_PATH=/usr/include/mpich2-x86_64 - MPI_INCLUDE=/usr/include/mpich2-x86_64 + MPI_PATH=/usr/include/mpich2-${OS_ARCH} + MPI_INCLUDE=/usr/include/mpich2-${OS_ARCH} MPI_LIBS=/usr/lib64/mpich2/lib/libmpich.so MPI_CC=/usr/bin/mpicc MPI_VERSION=`$MPI_CC -v 2>&1 | grep "MPICH2 version"` From a31cbfefc2cb6c27b58e1e513c1a6bf322b76753 Mon Sep 17 00:00:00 2001 From: tad4 <121957038+tad4@users.noreply.github.com> Date: Wed, 26 Apr 2023 19:57:02 -0400 Subject: [PATCH 3/8] Exit early if a required toolchain can **not** be found on the system - If either an MPI or Linear Algebra (LA) toolchain can **not** be found, then `hpcc` can **not** be built. - Error codes have been defined to assist users in understanding why the install script failed. --- pts/hpcc-1.2.8/install.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pts/hpcc-1.2.8/install.sh b/pts/hpcc-1.2.8/install.sh index f1abb444..df1ad03d 100644 --- a/pts/hpcc-1.2.8/install.sh +++ b/pts/hpcc-1.2.8/install.sh @@ -1,5 +1,8 @@ #!/bin/sh +readonly install_error_MPI_NOT_FOUND=100 # Install Error: Unable to find an MPI toolchain to use. +readonly install_error_LA_NOT_FOUND=200 # Install Error: Unable to find a linear algebra toolchain to use. + tar -zxvf hpcc-1.5.0.tar.gz cd hpcc-1.5.0 @@ -80,6 +83,9 @@ then MPI_LIBS=/usr/lib64/mpich2/lib/libmpich.so MPI_CC=/usr/bin/mpicc MPI_VERSION=`$MPI_CC -v 2>&1 | grep "MPICH2 version"` +else + echo $install_error_MPI_NOT_FOUND > ~/install-exit-status + exit $install_error_MPI_NOT_FOUND fi # Find Linear Algebra Package To Use @@ -129,6 +135,9 @@ then LA_INCLUDE=/usr/include/${OS_ARCH}-linux-gnu/ LA_LIBS="-L$LA_PATH -lblas" LA_VERSION="OpenBLAS" +else + echo $install_error_LA_NOT_FOUND > ~/install-exit-status + exit $install_error_LA_NOT_FOUND fi if [ ! "X$MPI_VERSION" = "X" ] From 0cc3cc176692b7e69006a12a3a1af57641226233 Mon Sep 17 00:00:00 2001 From: tad4 <121957038+tad4@users.noreply.github.com> Date: Wed, 26 Apr 2023 20:17:29 -0400 Subject: [PATCH 4/8] Early `exit`s will return a status based on system-call error numbers - Avoid any potential collisions with other _error identifiers_. - Script-specific _error identifier_ is written to `install-exit-status`. --- pts/hpcc-1.2.8/install.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pts/hpcc-1.2.8/install.sh b/pts/hpcc-1.2.8/install.sh index df1ad03d..09441d9b 100644 --- a/pts/hpcc-1.2.8/install.sh +++ b/pts/hpcc-1.2.8/install.sh @@ -1,7 +1,8 @@ #!/bin/sh -readonly install_error_MPI_NOT_FOUND=100 # Install Error: Unable to find an MPI toolchain to use. -readonly install_error_LA_NOT_FOUND=200 # Install Error: Unable to find a linear algebra toolchain to use. +readonly install_error_MPI_NOT_FOUND=1000 # Install Error: Unable to find an MPI toolchain to use. +readonly install_error_LA_NOT_FOUND=2000 # Install Error: Unable to find a linear algebra toolchain to use. +readonly errno_ENOENT=2 # No such file or directory. See also: errno(3). tar -zxvf hpcc-1.5.0.tar.gz cd hpcc-1.5.0 @@ -85,7 +86,7 @@ then MPI_VERSION=`$MPI_CC -v 2>&1 | grep "MPICH2 version"` else echo $install_error_MPI_NOT_FOUND > ~/install-exit-status - exit $install_error_MPI_NOT_FOUND + exit $errno_ENOENT fi # Find Linear Algebra Package To Use @@ -137,7 +138,7 @@ then LA_VERSION="OpenBLAS" else echo $install_error_LA_NOT_FOUND > ~/install-exit-status - exit $install_error_LA_NOT_FOUND + exit $errno_ENOENT fi if [ ! "X$MPI_VERSION" = "X" ] From 5958bcf68033fdb84c32e020a9dcd85118cf4f8a Mon Sep 17 00:00:00 2001 From: tad4 <121957038+tad4@users.noreply.github.com> Date: Wed, 26 Apr 2023 20:20:35 -0400 Subject: [PATCH 5/8] Change script-specific error codes to be contiguous --- pts/hpcc-1.2.8/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pts/hpcc-1.2.8/install.sh b/pts/hpcc-1.2.8/install.sh index 09441d9b..4f7f7bf5 100644 --- a/pts/hpcc-1.2.8/install.sh +++ b/pts/hpcc-1.2.8/install.sh @@ -1,7 +1,7 @@ #!/bin/sh readonly install_error_MPI_NOT_FOUND=1000 # Install Error: Unable to find an MPI toolchain to use. -readonly install_error_LA_NOT_FOUND=2000 # Install Error: Unable to find a linear algebra toolchain to use. +readonly install_error_LA_NOT_FOUND=1001 # Install Error: Unable to find a linear algebra toolchain to use. readonly errno_ENOENT=2 # No such file or directory. See also: errno(3). tar -zxvf hpcc-1.5.0.tar.gz From 758c932a5e5880333a727a380609b138a1b9af73 Mon Sep 17 00:00:00 2001 From: tad4 <121957038+tad4@users.noreply.github.com> Date: Sat, 29 Apr 2023 18:03:36 -0400 Subject: [PATCH 6/8] Add user-friendly error messages --- pts/hpcc-1.2.8/install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pts/hpcc-1.2.8/install.sh b/pts/hpcc-1.2.8/install.sh index 4f7f7bf5..e46f64d3 100644 --- a/pts/hpcc-1.2.8/install.sh +++ b/pts/hpcc-1.2.8/install.sh @@ -85,6 +85,7 @@ then MPI_CC=/usr/bin/mpicc MPI_VERSION=`$MPI_CC -v 2>&1 | grep "MPICH2 version"` else + echo "Error: MPI not found." echo $install_error_MPI_NOT_FOUND > ~/install-exit-status exit $errno_ENOENT fi @@ -137,6 +138,7 @@ then LA_LIBS="-L$LA_PATH -lblas" LA_VERSION="OpenBLAS" else + echo "Error: A linear algebra package could not be found." echo $install_error_LA_NOT_FOUND > ~/install-exit-status exit $errno_ENOENT fi From dba209a201e5a3e5cc7261a6bb0c80ac5c424caf Mon Sep 17 00:00:00 2001 From: tad4 <121957038+tad4@users.noreply.github.com> Date: Sat, 29 Apr 2023 18:13:33 -0400 Subject: [PATCH 7/8] Update `srsran-1.0.1` downloads to reflect new GitHub repo name --- pts/srsran-1.0.1/downloads.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pts/srsran-1.0.1/downloads.xml b/pts/srsran-1.0.1/downloads.xml index 6f81dbd8..4c6c2ace 100644 --- a/pts/srsran-1.0.1/downloads.xml +++ b/pts/srsran-1.0.1/downloads.xml @@ -3,10 +3,10 @@ - https://github.com/srsran/srsRAN/archive/refs/tags/release_21_04.tar.gz - b287d781111442e8c5ca9dd6e0650ea8 - 5e0ad55fd7177618f61d157ed1d9335fcb6a6ea9feb3fcfdf96f8a8bbda62eb4 - srsRAN-release_21_04.tar.gz + https://github.com/srsran/srsRAN_4G/archive/refs/tags/release_21_04.tar.gz + d5f1581193ffa5d5c38d684485469c07 + 2cf509acfc6620092abe2cddff86d524beda67b765bb6cac38e4f3b8365d3742 + srsRAN_4G-release_21_04.tar.gz 9868294 From e400794b21ed01a523affbb4b7ddb843fceeee64 Mon Sep 17 00:00:00 2001 From: tad4 Date: Sat, 29 Apr 2023 18:36:21 -0400 Subject: [PATCH 8/8] Screwed up and commited on the wrong branch; Revert "Update `srsran-1.0.1` downloads to reflect new GitHub repo name". This reverts commit dba209a201e5a3e5cc7261a6bb0c80ac5c424caf. --- pts/srsran-1.0.1/downloads.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pts/srsran-1.0.1/downloads.xml b/pts/srsran-1.0.1/downloads.xml index 4c6c2ace..6f81dbd8 100644 --- a/pts/srsran-1.0.1/downloads.xml +++ b/pts/srsran-1.0.1/downloads.xml @@ -3,10 +3,10 @@ - https://github.com/srsran/srsRAN_4G/archive/refs/tags/release_21_04.tar.gz - d5f1581193ffa5d5c38d684485469c07 - 2cf509acfc6620092abe2cddff86d524beda67b765bb6cac38e4f3b8365d3742 - srsRAN_4G-release_21_04.tar.gz + https://github.com/srsran/srsRAN/archive/refs/tags/release_21_04.tar.gz + b287d781111442e8c5ca9dd6e0650ea8 + 5e0ad55fd7177618f61d157ed1d9335fcb6a6ea9feb3fcfdf96f8a8bbda62eb4 + srsRAN-release_21_04.tar.gz 9868294