From 63f3d0a4adb40556b697fe82e3742484882e05c1 Mon Sep 17 00:00:00 2001 From: JimmyLeu76 Date: Wed, 5 Jan 2022 15:41:11 -0800 Subject: [PATCH 01/14] fix make install causes pyhton validation error fix #1056 --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 61b4ea36e..ac0bfc72f 100755 --- a/install.sh +++ b/install.sh @@ -325,8 +325,8 @@ fi # build everything export PATH=/usr/local/bin:/usr/bin:/bin -run make -j$((3*$NPROC)) -run make install +run make -j$((3*$NPROC)) system + if [ "$DOCS" == "yes" ]; then run make html run cp -r "documents/html" "$INSTALL" From 187c56a1bd282bd8c99022237c5be7f35a70a2c2 Mon Sep 17 00:00:00 2001 From: JimmyLeu76 Date: Wed, 5 Jan 2022 15:42:04 -0800 Subject: [PATCH 02/14] fix missing when using --parallel option #1044 --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index ac0bfc72f..89735944b 100755 --- a/install.sh +++ b/install.sh @@ -315,6 +315,7 @@ if [ ! -f "configure" -o "$QUICK" == "no" ]; then fi NPROC=1 +SYSTEM=$(uname -s) if [ "$PARALLEL" == "yes" ]; then if [ "$SYSTEM" == "Linux" ]; then NPROC=$(lscpu | grep '^CPU(s):' | cut -f2- -d' ') From 0f4453e2924ad279200e4b60a2b7f3c918f790a6 Mon Sep 17 00:00:00 2001 From: JimmyLeu76 Date: Wed, 5 Jan 2022 20:26:30 -0800 Subject: [PATCH 03/14] update python3.9.6 and necessary packages --- build-aux/setup-Linux-centos-8.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/build-aux/setup-Linux-centos-8.sh b/build-aux/setup-Linux-centos-8.sh index f29c71181..f55e14953 100755 --- a/build-aux/setup-Linux-centos-8.sh +++ b/build-aux/setup-Linux-centos-8.sh @@ -12,20 +12,28 @@ yum -q install which -y yum -q install svn -y # python3 support needed as of 4.2 -if [ ! -x /usr/local/bin/python3 -o $(/usr/local/bin/python3 --version) != "Python 3.9.0" ]; then - yum -q install openssl-devel bzip2-devel libffi-devel zlib-devel -y +if [ ! -x /usr/local/bin/python3 -o "$(/usr/local/bin/python3 --version)" != "Python 3.9.6" ]; then + echo "install python 3.9.6" + cd /usr/local/src - curl https://www.python.org/ftp/python/3.9.0/Python-3.9.0.tgz | tar xz - cd Python-3.9.0 + yum install gcc openssl-devel bzip2-devel libffi-devel zlib-devel xz-devel -y + curl https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tgz | tar xz + cd Python-3.9.6 ./configure --prefix=/usr/local --enable-optimizations --with-system-ffi --with-computed-gotos --enable-loadable-sqlite-extensions CFLAGS="-fPIC" make -j $(nproc) make altinstall + ln -sf /usr/local/bin/python3.9 /usr/local/bin/python3 ln -sf /usr/local/bin/python3.9-config /usr/local/bin/python3-config ln -sf /usr/local/bin/pydoc3.9 /usr/local/bin/pydoc ln -sf /usr/local/bin/idle3.9 /usr/local/bin/idle ln -sf /usr/local/bin/pip3.9 /usr/local/bin/pip3 - /usr/local/bin/python3 pip -m install mysql-connector matplotlib numpy pandas Pillow + # install python packages + /usr/local/bin/python3 -m pip install --upgrade pip + /usr/local/bin/python3 -m pip install matplotlib Pillow pandas numpy networkx pytz pysolar PyGithub scikit-learn xlrd + /usr/local/bin/python3 -m pip install IPython censusdata + + fi # latex From 0eda9999a14ce0cc1c9ce03cb861f15f0cbc44c5 Mon Sep 17 00:00:00 2001 From: JimmyLeu76 Date: Wed, 5 Jan 2022 20:27:16 -0800 Subject: [PATCH 04/14] update mono installation --- build-aux/setup-Linux-centos-8.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-aux/setup-Linux-centos-8.sh b/build-aux/setup-Linux-centos-8.sh index f55e14953..fd3165d33 100755 --- a/build-aux/setup-Linux-centos-8.sh +++ b/build-aux/setup-Linux-centos-8.sh @@ -57,8 +57,8 @@ fi # mono if [ ! -f /usr/bin/mono ]; then - rpmkeys --import "http://pool.sks-keyservers.net/pks/lookup?op=get&search=0x3fa7e0328081bff6a14da29aa6a19b38d3d831ef" - curl -s https://download.mono-project.com/repo/centos8-stable.repo | tee /etc/yum.repos.d/mono-centos8-stable.repo + rpmkeys --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF" + su -c 'curl https://download.mono-project.com/repo/centos8-stable.repo | tee /etc/yum.repos.d/mono-centos8-stable.repo' yum -q install mono-devel -y fi From 265c2327f04b42c96ac5b6f642d0d1acce5d1e50 Mon Sep 17 00:00:00 2001 From: JimmyLeu76 Date: Wed, 5 Jan 2022 20:34:30 -0800 Subject: [PATCH 05/14] fix numpy and matrix version not the latest version issue. #1045 --- gldcore/scripts/autotest/test_matrix.glm | 2 +- gldcore/scripts/autotest/test_matrix_linalg.glm | 2 +- gldcore/scripts/autotest/test_matrix_matlib.glm | 2 +- gldcore/scripts/autotest/test_matrix_matrix.glm | 2 +- gldcore/scripts/autotest/test_matrix_random.glm | 2 +- requirements.txt | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gldcore/scripts/autotest/test_matrix.glm b/gldcore/scripts/autotest/test_matrix.glm index d95170553..812c9552a 100644 --- a/gldcore/scripts/autotest/test_matrix.glm +++ b/gldcore/scripts/autotest/test_matrix.glm @@ -1,5 +1,5 @@ // check numpy version (must be exactly the same to pass these tests) -#assert $(gridlabd matrix version) == '1.21.4' +#assert $(gridlabd matrix version) == '1.22.0' // matrix operations test #assert $(gridlabd matrix -f copy "1,2;3,4") == '1,2;3,4' diff --git a/gldcore/scripts/autotest/test_matrix_linalg.glm b/gldcore/scripts/autotest/test_matrix_linalg.glm index 80432c36f..241e4c3ae 100644 --- a/gldcore/scripts/autotest/test_matrix_linalg.glm +++ b/gldcore/scripts/autotest/test_matrix_linalg.glm @@ -1,5 +1,5 @@ // check numpy version (must be exactly the same to pass these tests) -#assert $(gridlabd matrix version) == '1.21.4' +#assert $(gridlabd matrix version) == '1.22.0' // linalg.cholesky #assert $(gridlabd matrix -f linalg.cholesky "1,2;-2,5") == '1,0;-2,1' diff --git a/gldcore/scripts/autotest/test_matrix_matlib.glm b/gldcore/scripts/autotest/test_matrix_matlib.glm index 1dc2e1f29..af2175d7d 100644 --- a/gldcore/scripts/autotest/test_matrix_matlib.glm +++ b/gldcore/scripts/autotest/test_matrix_matlib.glm @@ -1,4 +1,4 @@ -#assert $(gridlabd matrix version) == '1.21.4' +#assert $(gridlabd matrix version) == '1.22.0' // matlib.rand #assert ! -z "$(gridlabd matrix -f matlib.rand 1)" diff --git a/gldcore/scripts/autotest/test_matrix_matrix.glm b/gldcore/scripts/autotest/test_matrix_matrix.glm index 75f5d6573..d6e4c55c9 100644 --- a/gldcore/scripts/autotest/test_matrix_matrix.glm +++ b/gldcore/scripts/autotest/test_matrix_matrix.glm @@ -1,4 +1,4 @@ -#assert $(gridlabd matrix version) == '1.21.4' +#assert $(gridlabd matrix version) == '1.22.0' // matrix.all axis= #assert $(gridlabd matrix -f matrix.all "1,2,3;4,5,6;") == '1' diff --git a/gldcore/scripts/autotest/test_matrix_random.glm b/gldcore/scripts/autotest/test_matrix_random.glm index 454d42a7b..74a31fa5c 100644 --- a/gldcore/scripts/autotest/test_matrix_random.glm +++ b/gldcore/scripts/autotest/test_matrix_random.glm @@ -1,4 +1,4 @@ -#assert $(gridlabd matrix version) == '1.21.4' +'1.22.0' // random.choice size= replace= p= #assert ! -z $(gridlabd matrix -f random.choice "1,2,3,4,5") diff --git a/requirements.txt b/requirements.txt index 7a1bcc62e..b78a92b3b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ matplotlib==3.3.3 -numpy==1.21.4 +numpy>=1.21.4 pytz==2020.4 PyGithub==1.54.1 docker==4.4.4 From 95b07770ed36384c4a1e3b81957235b5fc1aef94 Mon Sep 17 00:00:00 2001 From: JimmyLeu76 Date: Wed, 5 Jan 2022 21:37:29 -0800 Subject: [PATCH 06/14] repair test_matrix_random,#assert == '1.22.0' --- Dockerfile | 9 +++++++++ gldcore/scripts/autotest/test_matrix_random.glm | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..b89f70f36 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM centos:8 + +RUN yum install git -y + +WORKDIR /usr/local/src + +RUN git clone -b develop-fix-centos8-setup https://github.com/slacgismo/gridlabd.git + +WORKDIR /usr/local/src/gridlabd \ No newline at end of file diff --git a/gldcore/scripts/autotest/test_matrix_random.glm b/gldcore/scripts/autotest/test_matrix_random.glm index 74a31fa5c..43ea9d9f7 100644 --- a/gldcore/scripts/autotest/test_matrix_random.glm +++ b/gldcore/scripts/autotest/test_matrix_random.glm @@ -1,4 +1,4 @@ -'1.22.0' +#assert $(gridlabd matrix version) == '1.22.0' // random.choice size= replace= p= #assert ! -z $(gridlabd matrix -f random.choice "1,2,3,4,5") From 4adbbc684e67b1f1d421e8b0d2dd500d3986bfc7 Mon Sep 17 00:00:00 2001 From: JimmyLeu76 Date: Wed, 5 Jan 2022 23:25:08 -0800 Subject: [PATCH 07/14] remove test Dockerfile' --- Dockerfile | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index b89f70f36..000000000 --- a/Dockerfile +++ /dev/null @@ -1,9 +0,0 @@ -FROM centos:8 - -RUN yum install git -y - -WORKDIR /usr/local/src - -RUN git clone -b develop-fix-centos8-setup https://github.com/slacgismo/gridlabd.git - -WORKDIR /usr/local/src/gridlabd \ No newline at end of file From 8fe58651bf5a77098484f8b631751470a3648b18 Mon Sep 17 00:00:00 2001 From: JimmyLeu76 Date: Thu, 6 Jan 2022 11:35:13 -0800 Subject: [PATCH 08/14] modify in test_matrix_*.glm --- gldcore/scripts/autotest/test_matrix_linalg.glm | 2 +- gldcore/scripts/autotest/test_matrix_matlib.glm | 2 +- gldcore/scripts/autotest/test_matrix_matrix.glm | 2 +- gldcore/scripts/autotest/test_matrix_random.glm | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gldcore/scripts/autotest/test_matrix_linalg.glm b/gldcore/scripts/autotest/test_matrix_linalg.glm index 241e4c3ae..7fa91e960 100644 --- a/gldcore/scripts/autotest/test_matrix_linalg.glm +++ b/gldcore/scripts/autotest/test_matrix_linalg.glm @@ -1,5 +1,5 @@ // check numpy version (must be exactly the same to pass these tests) -#assert $(gridlabd matrix version) == '1.22.0' +#assert ! $(gridlabd matrix version) '<' '1.21.0' // linalg.cholesky #assert $(gridlabd matrix -f linalg.cholesky "1,2;-2,5") == '1,0;-2,1' diff --git a/gldcore/scripts/autotest/test_matrix_matlib.glm b/gldcore/scripts/autotest/test_matrix_matlib.glm index af2175d7d..566c34db2 100644 --- a/gldcore/scripts/autotest/test_matrix_matlib.glm +++ b/gldcore/scripts/autotest/test_matrix_matlib.glm @@ -1,4 +1,4 @@ -#assert $(gridlabd matrix version) == '1.22.0' +#assert ! $(gridlabd matrix version) '<' '1.21.0' // matlib.rand #assert ! -z "$(gridlabd matrix -f matlib.rand 1)" diff --git a/gldcore/scripts/autotest/test_matrix_matrix.glm b/gldcore/scripts/autotest/test_matrix_matrix.glm index d6e4c55c9..227d3cd19 100644 --- a/gldcore/scripts/autotest/test_matrix_matrix.glm +++ b/gldcore/scripts/autotest/test_matrix_matrix.glm @@ -1,4 +1,4 @@ -#assert $(gridlabd matrix version) == '1.22.0' +#assert ! $(gridlabd matrix version) '<' '1.21.0' // matrix.all axis= #assert $(gridlabd matrix -f matrix.all "1,2,3;4,5,6;") == '1' diff --git a/gldcore/scripts/autotest/test_matrix_random.glm b/gldcore/scripts/autotest/test_matrix_random.glm index 43ea9d9f7..88d46e8b7 100644 --- a/gldcore/scripts/autotest/test_matrix_random.glm +++ b/gldcore/scripts/autotest/test_matrix_random.glm @@ -1,4 +1,4 @@ -#assert $(gridlabd matrix version) == '1.22.0' +#assert ! $(gridlabd matrix version) '<' '1.21.0' // random.choice size= replace= p= #assert ! -z $(gridlabd matrix -f random.choice "1,2,3,4,5") From c3dad740c16c2f4baf53468fe960bdea62b7ffa2 Mon Sep 17 00:00:00 2001 From: JimmyLeu76 Date: Thu, 6 Jan 2022 12:04:51 -0800 Subject: [PATCH 09/14] add test Dockerfile --- Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..0e6cb1b78 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM centos:8 +RUN yum install git -y +WORKDIR /usr/local/src +RUN git clone -b develop-fix-centos8-setup https://github.com/slacgismo/gridlabd.git +WORKDIR /usr/local/src/gridlabd +RUN ./install.sh -t -v --parallel From 60d2246672d935f040d31c354b4ebdf89b03947f Mon Sep 17 00:00:00 2001 From: JimmyLeu76 Date: Thu, 6 Jan 2022 12:05:20 -0800 Subject: [PATCH 10/14] test success, remove Dockerfile --- Dockerfile | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 0e6cb1b78..000000000 --- a/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -FROM centos:8 -RUN yum install git -y -WORKDIR /usr/local/src -RUN git clone -b develop-fix-centos8-setup https://github.com/slacgismo/gridlabd.git -WORKDIR /usr/local/src/gridlabd -RUN ./install.sh -t -v --parallel From 4ac8efa06fddeb4753c00393c8f089495457fd42 Mon Sep 17 00:00:00 2001 From: JimmyLeu76 Date: Thu, 6 Jan 2022 12:09:13 -0800 Subject: [PATCH 11/14] update test_matrix.glm #assert ! '<' '1.21.0' --- gldcore/scripts/autotest/test_matrix.glm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gldcore/scripts/autotest/test_matrix.glm b/gldcore/scripts/autotest/test_matrix.glm index 812c9552a..2c4fe735e 100644 --- a/gldcore/scripts/autotest/test_matrix.glm +++ b/gldcore/scripts/autotest/test_matrix.glm @@ -1,5 +1,5 @@ // check numpy version (must be exactly the same to pass these tests) -#assert $(gridlabd matrix version) == '1.22.0' +#assert ! $(gridlabd matrix version) '<' '1.21.0' // matrix operations test #assert $(gridlabd matrix -f copy "1,2;3,4") == '1,2;3,4' From 27650481cd82ec61cf0e52ebc659f5d97d1f4f89 Mon Sep 17 00:00:00 2001 From: JimmyLeu76 Date: Thu, 6 Jan 2022 12:12:01 -0800 Subject: [PATCH 12/14] add python package --- build-aux/setup-Linux-centos-8.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-aux/setup-Linux-centos-8.sh b/build-aux/setup-Linux-centos-8.sh index fd3165d33..bc8df044d 100755 --- a/build-aux/setup-Linux-centos-8.sh +++ b/build-aux/setup-Linux-centos-8.sh @@ -30,7 +30,7 @@ if [ ! -x /usr/local/bin/python3 -o "$(/usr/local/bin/python3 --version)" != "Py ln -sf /usr/local/bin/pip3.9 /usr/local/bin/pip3 # install python packages /usr/local/bin/python3 -m pip install --upgrade pip - /usr/local/bin/python3 -m pip install matplotlib Pillow pandas numpy networkx pytz pysolar PyGithub scikit-learn xlrd + /usr/local/bin/python3 -m pip install mysql-connector matplotlib Pillow pandas numpy networkx pytz pysolar PyGithub scikit-learn xlrd /usr/local/bin/python3 -m pip install IPython censusdata From 1a456c88785ef25cf7f30ba52de792d52ed979f9 Mon Sep 17 00:00:00 2001 From: JimmyLeu76 Date: Thu, 6 Jan 2022 12:14:18 -0800 Subject: [PATCH 13/14] add test Dockerfile --- Dockerfile | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..e69de29bb From f340e935973f9633ef9d62eacbb95b54ad12fe57 Mon Sep 17 00:00:00 2001 From: JimmyLeu76 Date: Thu, 6 Jan 2022 12:39:50 -0800 Subject: [PATCH 14/14] test and validate success, remove Dockerfile --- Dockerfile | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index e69de29bb..000000000