Skip to content

Commit

Permalink
some more fixes, and improved CI
Browse files Browse the repository at this point in the history
  • Loading branch information
BDonnot committed Mar 8, 2024
1 parent 2bf5787 commit ab0c89c
Show file tree
Hide file tree
Showing 15 changed files with 434 additions and 189 deletions.
157 changes: 128 additions & 29 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ orbs:


executors:
gcc_13:
docker:
- image: gcc:13
gcc_12:
docker:
- image: gcc:12
Expand All @@ -20,6 +23,18 @@ executors:
gcc_8:
docker:
- image: gcc:8
clang18:
docker:
- image: silkeh/clang:18
clang17:
docker:
- image: silkeh/clang:17
clang16:
docker:
- image: silkeh/clang:16
clang15:
docker:
- image: silkeh/clang:15
clang14:
docker:
- image: silkeh/clang:14
Expand All @@ -40,13 +55,30 @@ executors:
- image: silkeh/clang:9 # no c++ 11, does not work

jobs:
compile_gcc12:
executor: gcc_12
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip python3-full -y
- run: python3 -m pip install virtualenv
- run: python3 -m virtualenv venv_test
- run:
command: |
source venv_test/bin/activate
pip install -U grid2op
pip install -U pybind11
git submodule init
git submodule update
make
CC=gcc python setup.py build
python -m pip install -U .
compile_gcc11:
executor: gcc_11
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip -y
- run: python3 -m pip install --upgrade pip setuptools
- run: apt-get update && apt-get install python3-pip python3-full -y
- run: python3 -m pip install virtualenv
- run: python3 -m virtualenv venv_test
- run:
Expand All @@ -64,8 +96,7 @@ jobs:
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip -y
- run: python3 -m pip install --upgrade pip setuptools
- run: apt-get update && apt-get install python3-pip python3-full -y
- run: python3 -m pip install virtualenv
- run: python3 -m virtualenv venv_test
- run:
Expand All @@ -83,8 +114,7 @@ jobs:
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip -y
- run: python3 -m pip install --upgrade pip setuptools
- run: apt-get update && apt-get install python3-pip python3-full -y
- run: python3 -m pip install virtualenv
- run: python3 -m virtualenv venv_test
- run:
Expand All @@ -102,8 +132,7 @@ jobs:
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip -y
- run: python3 -m pip install --upgrade pip setuptools
- run: apt-get update && apt-get install python3-pip python3-full -y
- run: python3 -m pip install virtualenv
- run: python3 -m virtualenv venv_test
- run:
Expand All @@ -116,13 +145,12 @@ jobs:
make
CC=gcc python setup.py build
python -m pip install -U .
compile_gcc12:
executor: gcc_12
compile_gcc13:
executor: gcc_13
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip python3-virtualenv -y
- run: python3 -m pip install --upgrade pip setuptools
- run: apt-get update && apt-get install python3-pip python3-full -y
# - run: python3 -m pip install virtualenv
- run: python3 -m virtualenv venv_test
- run:
Expand Down Expand Up @@ -152,8 +180,7 @@ jobs:
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip -y
- run: python3 -m pip install --upgrade pip setuptools
- run: apt-get update && apt-get install python3-pip python3-full git -y
- run: python3 -m pip install virtualenv
- run: python3 -m virtualenv venv_test
- run:
Expand All @@ -170,8 +197,7 @@ jobs:
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip git -y
- run: python3 -m pip install --upgrade pip setuptools
- run: apt-get update && apt-get install python3-pip python3-full git -y
- run:
command: |
git submodule init
Expand All @@ -190,8 +216,7 @@ jobs:
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip git -y
- run: python3 -m pip install --upgrade pip setuptools
- run: apt-get update && apt-get install python3-pip python3-full git -y
- run: python3 -m pip install virtualenv
- run: python3 -m virtualenv venv_test
- run:
Expand All @@ -209,8 +234,7 @@ jobs:
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip git -y
- run: python3 -m pip install --upgrade pip setuptools
- run: apt-get update && apt-get install python3-pip python3-full git -y
- run: python3 -m pip install virtualenv
- run: python3 -m virtualenv venv_test
- run:
Expand All @@ -228,8 +252,7 @@ jobs:
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip git -y
- run: python3 -m pip install --upgrade pip setuptools
- run: apt-get update && apt-get install python3-pip python3-full git -y
- run: python3 -m pip install virtualenv
- run: python3 -m virtualenv venv_test
- run:
Expand All @@ -247,8 +270,79 @@ jobs:
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip git -y
- run: python3 -m pip install --upgrade pip setuptools
- run: apt-get update && apt-get install python3-pip python3-full git -y
- run: python3 -m pip install virtualenv
- run: python3 -m virtualenv venv_test
- run:
command: |
source venv_test/bin/activate
pip install -U grid2op
pip install -U pybind11
git submodule init
git submodule update
make
CC=clang python setup.py build
CC=clang python -m pip install -U .
compile_clang15:
executor: clang15
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip python3-full git -y
- run: python3 -m pip install virtualenv
- run: python3 -m virtualenv venv_test
- run:
command: |
source venv_test/bin/activate
pip install -U grid2op
pip install -U pybind11
git submodule init
git submodule update
make
CC=clang python setup.py build
CC=clang python -m pip install -U .
compile_clang16:
executor: clang16
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip python3-full git -y
- run: python3 -m pip install virtualenv
- run: python3 -m virtualenv venv_test
- run:
command: |
source venv_test/bin/activate
pip install -U grid2op
pip install -U pybind11
git submodule init
git submodule update
make
CC=clang python setup.py build
CC=clang python -m pip install -U .
compile_clang17:
executor: clang17
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip python3-full git -y
- run: python3 -m pip install virtualenv
- run: python3 -m virtualenv venv_test
- run:
command: |
source venv_test/bin/activate
pip install -U grid2op
pip install -U pybind11
git submodule init
git submodule update
make
CC=clang python setup.py build
CC=clang python -m pip install -U .
compile_clang18:
executor: clang18
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip python3-full git -y
- run: python3 -m pip install virtualenv
- run: python3 -m virtualenv venv_test
- run:
Expand Down Expand Up @@ -279,7 +373,7 @@ jobs:
size: medium # ("medium" "large" "xlarge" "2xlarge")
steps:
- checkout
- run: python3 -m pip install --upgrade pip setuptools
- run: py -m pip install --upgrade pip setuptools
- run: py -m pip install virtualenv
- run: py -m virtualenv venv_test
- run:
Expand Down Expand Up @@ -309,11 +403,16 @@ workflows:
compile:
jobs:
- compile_gcc8
- compile_gcc10
- compile_gcc11
# - compile_gcc10
# - compile_gcc11
- compile_gcc12
- compile_gcc13
# - compile_clang10 # does not work I don't know why, too lazy to check
- compile_clang11
- compile_clang13
- compile_clang14
# - compile_clang13
# - compile_clang14
# - compile_clang15
# - compile_clang16
- compile_clang17
- compile_clang18
- compile_windows
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -278,3 +278,5 @@ lightsim2grid/tests/_grid2op_for_test/
bug_sparselu
bug_sparselu_eigen.cpp
test_segfault.sh
nohup.out
test_rte/
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ Change Log
- [FIXED] a bug where copying a lightsim2grid `GridModel` did not fully copy it
- [FIXED] a bug in the "topo_vect" comprehension cpp side (sometimes some buses
might not be activated / deactivated correctly)
- [FIXED] a bug when reading a grid initialize from pypowsybl (trafo names where put in place
of shunt names)
- [FIXED] read the docs was broken
- [ADDED] sets of methods to extract the main component of a grid and perform powerflow only on this
one.
Expand All @@ -49,11 +51,17 @@ Change Log
- [ADDED] a timer to get the time spent in the gridmodel for the powerflow (env.backend.timer_gridmodel_xx_pf)
which also include the time
- [ADDED] support for more than 2 busbars per substation (requires grid2op >= 1.10.0)
- [ADDED] possibility to retrieve the bus id of the original iidm when initializing from pypowsybl
(`return_sub_id` kwargs). This is a "beta" feature and will be adressed in a better way
in a near future.
- [ADDED] possibility to continue the grid2op 'step' when the solver converges but a load or a
generator is disconnected from the grid.
- [IMPROVED] now performing the new grid2op `create_test_suite`
- [IMPROVED] now lightsim2grid properly throw `BackendError`
- [IMPROVED] clean ce cpp side by refactoring: making clearer the difference (linear) solver
vs powerflow algorithm and move same type of files in the same directory. This change
does not really affect python side at the moment (but will in future versions)
- [IMPROVED] CI to test on gcc 13 and clang 18 (latest versions to date)

[0.7.5] 2023-10-05
--------------------
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,10 @@ cd ..

Some tests are performed automatically on standard platform each time modifications are made in the lightsim2grid code.

These tests include, for now, compilation on gcc (version 8, 10, 11 and 12) and clang (version 11, 13 and 14).
These tests include, for now, compilation on gcc (version 8, 12 and 13) and clang (version 11, 16 and 17).

**NB** Intermediate versions of clang and gcc (*eg* gcc 9 or clang 12) are not tested regularly, but lightsim2grid used to work on these. We suppose that if it works on *eg* clang 10 and clang 14 then it compiles also on all intermediate versions.
**NB** Intermediate versions of clang and gcc (*eg* gcc 9 or clang 12) are not tested regularly, but lightsim2grid used to work on these.
We suppose that if it works on *eg* clang 10 and clang 14 then it compiles also on all intermediate versions.

**NB** Package might work (we never tested it) on earlier version of these compilers.
The only "real" requirement for lightsim2grid is to have a compiler supporting c++11
Expand Down
Loading

0 comments on commit ab0c89c

Please sign in to comment.