Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
bb9bd55
Added script to build GridPACK in one-go, including installing all de…
abhyshr Dec 31, 2022
eb24be9
Updated installation script tested on EIOC-Ubuntu8
abhyshr Mar 16, 2023
f29a18f
Minor modifications to install script
abhyshr Mar 17, 2023
42d4807
Small modification to check python
abhyshr Mar 18, 2023
0e6b2ce
Updated gridpack install script to only install GridPACK and python w…
abhyshr Apr 7, 2023
2d9d2f1
More work on installation script
abhyshr Apr 7, 2023
1778817
Create external-dependencies directory, if not present.
abhyshr Apr 7, 2023
37c8dd7
Apply shellcheck suggestions and run formatter
jacksavage Sep 6, 2023
24cdd96
Move blocks into functions and extract versions
jacksavage Sep 6, 2023
af2952c
Correct how variables are checked
jacksavage Sep 6, 2023
1e93924
Bump versions out of script with env vars
jacksavage Sep 6, 2023
1d509f0
Remove GA-based dense matrix; adjust matrix transpose
wperkins Aug 23, 2023
e85428a
Remove all PETSC_VERSION usage.
wperkins Aug 24, 2023
b9f6171
Update PETSc settings for tlaloc
wperkins Aug 28, 2023
4efdd6b
Add smoke test for 240-bus dynamic simulation
wperkins Aug 28, 2023
a0a0869
Add a CMake macro to do the LU solver check and use it
wperkins Aug 28, 2023
b713505
Add smoke test for 2-area dynamic simulation
wperkins Aug 28, 2023
f99aeac
Add smoke test for two area case w/ renewables
wperkins Aug 30, 2023
e4c2171
Remove math::transpose(Matrix<>, Matrix<>) because of PETSc transpose…
wperkins Aug 30, 2023
6580fda
Add smoke tests for dsf2.x (same as for dsf.x).
wperkins Aug 30, 2023
e7ab92b
Add smoke test for Wind DSA 9-bus case
wperkins Aug 31, 2023
5b38344
Fix typos in Wind DSA TAMU 2000 case
wperkins Aug 31, 2023
7514dcc
Add a smoke test for Wind DSA TAMU 2000 case
wperkins Aug 31, 2023
f84ae13
Remove ancient test from `applications/development/dynamic_simulation…
wperkins Sep 6, 2023
7ed20ef
Fix env var
jacksavage Sep 6, 2023
d3aecd9
Set number of make threads dynamically
jacksavage Sep 6, 2023
795505d
Add ci script and container image definition
jacksavage Sep 6, 2023
66fbc23
Fix incorrect Matrix type Jacobian supplied to DAESolver constructor
wperkins Sep 13, 2023
2c0744e
Update my build script
wperkins Sep 13, 2023
7ac8094
Test pipeline trigger
jacksavage Sep 14, 2023
7744e71
Build container, make dep from test optional
jacksavage Sep 14, 2023
9cc9d04
Update dockerfile path
jacksavage Sep 14, 2023
09dd060
Increase k8s memory limit
jacksavage Sep 27, 2023
1a5b94a
Increase mem request/limit and job timeout
jacksavage Sep 27, 2023
60572f0
Add cpu and increase timeout further
jacksavage Sep 27, 2023
50adb0d
Troubleshooting env
jacksavage Oct 2, 2023
8d052b2
Use correct predefined CI variable
jacksavage Oct 2, 2023
e0cecaa
Add conditions for building container
jacksavage Oct 2, 2023
4d60837
Adjust k8s parameters and gitlab job timeout
jacksavage Oct 3, 2023
503dabd
Update CPU limit
jacksavage Oct 3, 2023
a07da9a
Adjust CPU req/limits
jacksavage Oct 3, 2023
3f0fca8
Adjust CPU limit
jacksavage Oct 3, 2023
263135f
Adjust cpu request
jacksavage Oct 3, 2023
7d97be1
Set GRIDPACK_DIR
jacksavage Oct 3, 2023
8ba3542
Uncomment gp_include and gp_libs
jacksavage Oct 3, 2023
9b533f0
Add Boost_NO_BOOST_CMAKE
jacksavage Oct 4, 2023
48d1adc
Set max number of make jobs
jacksavage Oct 4, 2023
e88724d
Only append python path if exists
jacksavage Oct 4, 2023
a442f45
Add comment
jacksavage Oct 11, 2023
1107658
Add test job
jacksavage Oct 11, 2023
725cf47
Use default timeout for build
jacksavage Oct 11, 2023
920d93e
Remove 2000-bus Wind-DSA smoke tests - they take too long
wperkins Oct 11, 2023
f5e91bc
Switch to a direct linear solver because this was diverging
wperkins Oct 11, 2023
d7d8907
Whitespace change
jacksavage Oct 16, 2023
d8b0a9c
Merge remote-tracking branch 'origin/fix/testing' into gitlab-ci
jacksavage Oct 16, 2023
1231f64
Troubleshooting
jacksavage Oct 16, 2023
d4c0929
Revert block comment
jacksavage Oct 17, 2023
9f77461
Fix test command and save results
jacksavage Oct 17, 2023
1fd0ea7
Always save artifacts for the test job
jacksavage Oct 17, 2023
ea037d8
Remove version numbers from LD_LIBRARY_PATH
jacksavage Oct 17, 2023
098a846
Run tests as non-root user
jacksavage Oct 17, 2023
22b88f5
Fix rules for build-container job
jacksavage Oct 17, 2023
ddf9948
Don't override env vars
jacksavage Oct 23, 2023
fc96b36
Remove manual container build rule
jacksavage Oct 23, 2023
45b0463
Add build status badge
jacksavage Oct 23, 2023
d71c50c
Only use two processors
jacksavage Oct 24, 2023
0fe20f0
Show output for failed tests
jacksavage Nov 8, 2023
b7003fc
Test with multiple distributions
jacksavage Dec 28, 2023
18ca8b0
Merge branch 'develop' into gitlab-ci
jacksavage Dec 29, 2023
0f5883d
Back out changes to src
jacksavage Dec 29, 2023
41bc8cc
Remove attempted variable substitution
jacksavage Dec 29, 2023
c985f45
Set conditions for when container is built
jacksavage Jan 2, 2024
be884de
Fix quoting
jacksavage Jan 2, 2024
46969d6
Make script available to setup env
jacksavage Jan 2, 2024
b83499e
Make scripts executable for docker image build
jacksavage Jan 2, 2024
d7bf557
Save logs from install_gridpack_deps
jacksavage Jan 2, 2024
71099a3
Fix artifact path for logs
jacksavage Jan 2, 2024
401494a
Test - remove parallel config
jacksavage Jan 2, 2024
6bd8336
Link logs to project folder
jacksavage Jan 3, 2024
f9a76ec
Send logs to back console 😫
jacksavage Jan 3, 2024
7d842a3
Redirect output to files
jacksavage Jan 3, 2024
2910f3b
Build PETSc with MUMPS instead of SuperLU_dist
jacksavage Jan 3, 2024
186b938
Redirect both streams from kaniko exe to file
jacksavage Jan 3, 2024
65965a5
Move the container registry check to its own job
jacksavage Jan 5, 2024
6ca911f
Use block scalar to avoid issues with special chars
jacksavage Jan 5, 2024
25ddd79
Always save untracked files
jacksavage Jan 5, 2024
fe63603
Fix block scalar
jacksavage Jan 5, 2024
9e26370
Swap out mpms for superlu for now
jacksavage Jan 5, 2024
70deb07
Pull back on untracked artifacts where it makes sense
jacksavage Jan 5, 2024
8c91600
Revert "Swap out mpms for superlu for now"
jacksavage Jan 5, 2024
9253abf
Add scalapack per error message
jacksavage Jan 5, 2024
37ad180
Remove the artifact path spec for build container
jacksavage Jan 5, 2024
574be1c
Pull container repo id into var
jacksavage Jan 5, 2024
cc7ecae
Try to see log files I need when build fails
jacksavage Jan 5, 2024
1ae11b1
Set the proxy var for kaniko
jacksavage Jan 10, 2024
317ddc4
Pass proxy to all jobs
jacksavage Jan 10, 2024
bb44759
Try lowercase
jacksavage Jan 10, 2024
cae4119
Mark as variables
jacksavage Jan 10, 2024
6a576ee
Remove petsc config option
jacksavage Jan 19, 2024
d0113b4
Remove unused log folder
jacksavage Jan 20, 2024
e21f58f
Try to parallelize the pipeline again
jacksavage Jan 20, 2024
2f9ae93
Revert troubleshooting command
jacksavage Jan 20, 2024
8f1ccb4
Separate scripts to improve caching
jacksavage Jan 20, 2024
9af3251
Install mpi4py dependency
jacksavage Jan 20, 2024
da31230
Set proxy build args in container build env
jacksavage Jan 22, 2024
109ee89
Get mpi4py from system repos instead of through pip
jacksavage Jan 22, 2024
65cd863
Use common check for distro between scripts
jacksavage Jan 22, 2024
31d1fb2
Manually define job parallelization and adjust whitespace
jacksavage Jan 22, 2024
3fc6c43
Try adding docker config and cert to kaniko container
jacksavage Jan 23, 2024
6eede55
Make the build container job an optional dep
jacksavage Jan 23, 2024
8464d31
Add verbose flag
jacksavage Jan 23, 2024
c54637c
Remove manual trigger from container build job
jacksavage Jan 23, 2024
d3222bb
Use a heredoc to populate docker config
jacksavage Jan 23, 2024
98877ae
Dump environment variables
jacksavage Jan 23, 2024
78f5ace
Disable rules for build container job for now
jacksavage Jan 23, 2024
7780979
Organize job into stages
jacksavage Jan 23, 2024
240306a
Add epel repo and enable crb repo
jacksavage Jan 23, 2024
11df6b1
Remove troubleshooting commands
jacksavage Jan 23, 2024
20051dd
Normalize ENV declarations
jacksavage Jan 23, 2024
c580ba2
Formatting changes
jacksavage Jan 24, 2024
08e019a
Add mpicc to path after openmpi-devel install
jacksavage Jan 24, 2024
a377342
Reenable ubuntu build
jacksavage Jan 24, 2024
b66c87a
Add mpicc to path if on RHEL
jacksavage Jan 24, 2024
c2089f1
Remove path mod for mpicc
jacksavage Jan 24, 2024
bdebd00
Load mpi module for RHEL
jacksavage Jan 24, 2024
96214c0
Load mpi module instead of altering PATH
jacksavage Jan 24, 2024
d85e3f1
Add boost-openmpi package to rocky linux
jacksavage Jan 24, 2024
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
101 changes: 101 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
default:
tags: [ basic, gridpack, ikp, k8s ]
artifacts:
when: always
untracked: true


stages: [ build-container, build-gridpack, test-gridpack ]


variables:
KUBERNETES_CPU_REQUEST: "1"
KUBERNETES_CPU_LIMIT: "2"
KUBERNETES_MEMORY_REQUEST: "4Gi"
KUBERNETES_MEMORY_LIMIT: "8Gi"
http_proxy: "http://proxy01.pnl.gov:3128"
https_proxy: ${http_proxy}


# https://docs.gitlab.com/ee/ci/docker/using_kaniko.html#building-an-image-with-kaniko-behind-a-proxy
.build-container:
stage: build-container
timeout: 5 hours
image:
name: gcr.io/kaniko-project/executor:v1.9.0-debug
entrypoint: [""]
variables:
IMAGE_PATH: ${CI_REGISTRY_IMAGE}:${BASE_IMAGE}-gridpack-env
script:
- chmod +x *.sh
- >
/kaniko/executor
--context "${CI_PROJECT_DIR}"
--build-arg "BASE_IMAGE=${BASE_IMAGE}:${BASE_IMAGE_TAG}"
--build-arg "http_proxy=$http_proxy"
--build-arg "https_proxy=$https_proxy"
--dockerfile "${CI_PROJECT_DIR}/dockerfile"
--destination "${IMAGE_PATH}" > build.log 2>&1
rules:
- if: $CI_PIPELINE_SOURCE == "push"
changes: [ "dockerfile", "install_environment_packages.sh", "install_gridpack_deps.sh" ]


build-container:ubuntu:
extends: .build-container
variables:
BASE_IMAGE: ubuntu
BASE_IMAGE_TAG: "22.04"


build-container:rockylinux:
extends: .build-container
variables:
BASE_IMAGE: rockylinux
BASE_IMAGE_TAG: "9"


.build-gridpack:
stage: build-gridpack
variables:
MAKE_JOBS: "2"
script:
- ./install_gridpack.sh


build-gridpack:ubuntu:
extends: .build-gridpack
image: ${CI_REGISTRY_IMAGE}:ubuntu-gridpack-env
needs:
- job: build-container:ubuntu
optional: true


build-gridpack:rockylinux:
extends: .build-gridpack
image: ${CI_REGISTRY_IMAGE}:rockylinux-gridpack-env
needs:
- job: build-container:rockylinux
optional: true


.test-gridpack:
stage: test-gridpack
script:
- useradd gridpack
- chown -R gridpack:gridpack .
- su gridpack -c 'ctest --test-dir src/build --output-on-failure'
artifacts:
paths: [ src/build/Testing/Temporary ]


test-gridpack:ubuntu:
extends: .test-gridpack
image: ${CI_REGISTRY_IMAGE}:ubuntu-gridpack-env
needs: [ build-gridpack:ubuntu ]


test-gridpack:rockylinux:
extends: .test-gridpack
image: ${CI_REGISTRY_IMAGE}:rockylinux-gridpack-env
needs: [ build-gridpack:rockylinux ]
27 changes: 15 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
# GridPACK<sup>TM</sup>-->
# GridPACK: High-Performance Electric Grid Simulation

![PNNL Build Status](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.github.com%2Frepos%2FGridOPTICS%2FGridPACK%2Fcommits%2Fdevelop%2Fstatus&query=%24.state&logo=gitlab&label=build%20status&color=white
)

GridPACK is an open-source high-performance (HPC) package for simulation of large-scale electrical grids. Powered by distributed (parallel) computing and high-performance numerical solvers, GridPACK offers several applications forfast simulation of electrical transmission systems. GridPACK includes a number of prebuilt applications that can be directly used. The most commonly used and well-developed are:
- AC Power Flow
- Dynamics Simulation
Expand All @@ -18,7 +21,7 @@ In addition, GridPACK is also a framework to simplify the development of new app
See the [instructions](docs/markdown/BASIC_INSTALL.md) for installing GridPACK, prerequisite software, and installation notes for different platforms.

## Usage
See [User manual](docs/user_manual/GridPACK.pdf) for a deep dive on GridPACK internals and/or refer to the [tutorials](docs/markdown/TUTORIALS.md) for more info.
See [User manual](docs/user_manual/GridPACK.pdf) for a deep dive on GridPACK internals and/or refer to the [tutorials](docs/markdown/TUTORIALS.md) for more info.

- Quick Guide (To do)

Expand All @@ -36,16 +39,16 @@ The best (and fastest) way to reach us for any technical questions is by posting

## Citing GridPACK
```
@article{doi:10.1177/1094342015607609,
author = {Bruce Palmer and William Perkins and Yousu Chen and Shuangshuang Jin and David C allahan and Kevin Glass and Ruisheng Diao and Mark Rice and Stephen Elbert and Mallikarjun a Vallem and Zhenyu Huang},
title ={GridPACKTM: A framework for developing power grid simulations on high-performance computing platforms},
journal = {The International Journal of High Performance Computing Applications},
volume = {30},
number = {2},
pages = {223-240},
year = {2016},
doi = {10.1177/1094342015607609},
URL = {https://doi.org/10.1177/1094342015607609},
@article{doi:10.1177/1094342015607609,
author = {Bruce Palmer and William Perkins and Yousu Chen and Shuangshuang Jin and David C allahan and Kevin Glass and Ruisheng Diao and Mark Rice and Stephen Elbert and Mallikarjun a Vallem and Zhenyu Huang},
title ={GridPACKTM: A framework for developing power grid simulations on high-performance computing platforms},
journal = {The International Journal of High Performance Computing Applications},
volume = {30},
number = {2},
pages = {223-240},
year = {2016},
doi = {10.1177/1094342015607609},
URL = {https://doi.org/10.1177/1094342015607609},
eprint = {https://doi.org/10.1177/1094342015607609}
```

Expand All @@ -69,7 +72,7 @@ GridPACK has been developed through funding from various sources over the years.
## Copyright
Copyright &copy; 2013, Battelle Memorial Institute.

GridPACK<sup>TM</sup> is a free software distributed under a BSD 2-clause license. You may reuse, modify, and redistribute the software.
GridPACK<sup>TM</sup> is a free software distributed under a BSD 2-clause license. You may reuse, modify, and redistribute the software.

See the [license](src/LICENSE.md) file for details.

Expand Down
21 changes: 21 additions & 0 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
ARG BASE_IMAGE
FROM ${BASE_IMAGE}

ENV GP_EXT_DEPS=/gridpack-dependencies
ENV BOOST_VERSION="1.78.0"
ENV GA_VERSION="5.8"
ENV PETSC_VERSION="3.16.4"
ENV LD_LIBRARY_PATH=${GP_EXT_DEPS}/boost/install_for_gridpack/lib:${GP_EXT_DEPS}/ga/install_for_gridpack/lib:${GP_EXT_DEPS}/petsc/install_for_gridpack/lib:${LD_LIBRARY_PATH}

ARG http_proxy
ARG https_proxy
ENV http_proxy=${http_proxy}
ENV https_proxy=${https_proxy}

WORKDIR ${GP_EXT_DEPS}

COPY install_environment_packages.sh .
RUN ./install_environment_packages.sh && rm *.sh

COPY install_gridpack_deps.sh .
RUN ./install_gridpack_deps.sh && rm *.sh
42 changes: 42 additions & 0 deletions install_environment_packages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#! /bin/bash

# installs necessary packages for a given distribution

set -xeuo pipefail

distribution=$(
# shellcheck source=/dev/null
source /etc/os-release
echo "$ID"
)

case $distribution in
debian | ubuntu)

apt-get update
apt-get upgrade --yes

# install required packages
apt-get install --yes \
wget build-essential git python3.11 python3-pip libopenmpi-dev cmake pkg-config python3-mpi4py
;;

fedora | rhel | centos | rocky)

dnf upgrade --assumeyes --verbose

# use epel and crb repos
# https://wiki.rockylinux.org/rocky/repo/#notes-on-epel
dnf install epel-release --assumeyes
crb enable

# install required packages
dnf install --assumeyes \
wget @development git python3.11 python3-pip openmpi-devel cmake pkgconf \
python3-mpi4py-openmpi boost-openmpi
;;
*)
echo "$distribution not supported"
exit 1
;;
esac
Loading