Skip to content

Commit

Permalink
Merge pull request #74 from BDonnot/smarter_solver
Browse files Browse the repository at this point in the history
Smarter solver
  • Loading branch information
BDonnot authored Mar 15, 2024
2 parents 835df5a + 9bb7f7c commit 1b5a628
Show file tree
Hide file tree
Showing 91 changed files with 4,864 additions and 2,225 deletions.
155 changes: 132 additions & 23 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,17 +55,36 @@ 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-full python3-dev python3-pip python3-virtualenv git -y
- run: python3 -m virtualenv venv_test
- run:
command: |
source venv_test/bin/activate
pip install --upgrade pip setuptools wheel
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: 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 --upgrade pip setuptools wheel
pip install -U grid2op
pip install -U pybind11
git submodule init
Expand All @@ -63,12 +97,13 @@ jobs:
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip -y
- 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 --upgrade pip setuptools wheel
pip install -U grid2op
pip install -U pybind11
git submodule init
Expand All @@ -81,12 +116,13 @@ jobs:
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip -y
- 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 --upgrade pip setuptools wheel
pip install -U grid2op
pip install -U pybind11
git submodule init
Expand All @@ -105,25 +141,27 @@ jobs:
- run:
command: |
source venv_test/bin/activate
pip install --upgrade pip setuptools wheel
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_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: apt-get update && apt-get install python3-full python3-dev python3-pip python3-virtualenv git -y
# - run: python3 -m pip install virtualenv
- run: python3 -m virtualenv venv_test
- run:
name: "Install grid2op from source"
command: |
source venv_test/bin/activate
pip install --upgrade pip setuptools wheel
git clone https://github.com/rte-france/grid2op.git _grid2op
pip install -e _grid2op
- run:
Expand All @@ -147,12 +185,13 @@ jobs:
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip -y
- 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 --upgrade pip setuptools wheel
pip install -U pybind11
git submodule init
git submodule update
Expand All @@ -164,7 +203,7 @@ jobs:
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip git -y
- run: apt-get update && apt-get install python3-pip python3-full git -y
- run:
command: |
git submodule init
Expand All @@ -175,6 +214,7 @@ jobs:
- run:
command: |
source venv_test/bin/activate
pip install --upgrade pip setuptools wheel
pip install -U pybind11
CC=clang python setup.py build
python -m pip install .
Expand All @@ -183,12 +223,13 @@ jobs:
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip git -y
- 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 --upgrade pip setuptools wheel
pip install -U grid2op
pip install -U pybind11
git submodule init
Expand All @@ -201,12 +242,13 @@ jobs:
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip git -y
- 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 --upgrade pip setuptools wheel
pip install -U grid2op
pip install -U pybind11
git submodule init
Expand All @@ -219,12 +261,13 @@ jobs:
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip git -y
- 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 --upgrade pip setuptools wheel
pip install -U grid2op
pip install -U pybind11
git submodule init
Expand All @@ -237,13 +280,69 @@ jobs:
resource_class: small
steps:
- checkout
- run: apt-get update && apt-get install python3-pip git -y
- 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 --upgrade pip setuptools wheel
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 --upgrade pip setuptools wheel
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-full python3-dev python3-pip python3-virtualenv git -y
- run: python3 -m virtualenv venv_test
- run:
command: |
source venv_test/bin/activate
pip install --upgrade pip setuptools wheel
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-full python3-dev python3-pip python3-virtualenv git -y
- run: python3 -m virtualenv venv_test
- run:
name: "Install grid2op from source"
command: |
source venv_test/bin/activate
pip install --upgrade pip setuptools wheel
git clone https://github.com/rte-france/grid2op.git _grid2op
pip install -e _grid2op
- run:
Expand All @@ -268,11 +367,17 @@ jobs:
size: medium # ("medium" "large" "xlarge" "2xlarge")
steps:
- checkout
# - run:
# name: "Install Python"
# command: choco install python --version=3.9 # use python 3.9 for windows test
- run: py -m pip install virtualenv
- run: py -m virtualenv venv_test
- run: choco install python --version=3.10 --force -y
- run: C:\Python310\python --version
- run: C:\Python310\python -m pip install --upgrade pip setuptools wheel
- run: C:\Python310\python -m pip install virtualenv
- run: C:\Python310\python -m virtualenv venv_test
- run:
name: "Chekc python / pip version in venv"
command: |
.\venv_test\Scripts\activate
python --version
pip --version
- run:
name: "Install grid2op from source"
command: |
Expand All @@ -286,8 +391,8 @@ jobs:
pip install -U pybind11
git submodule init
git submodule update
py setup.py build
py -m pip install -e .[test]
python setup.py build
python -m pip install -e .[test]
- run:
name: "make tests"
command: |
Expand All @@ -300,11 +405,15 @@ 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_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/
11 changes: 9 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
version: 2
version: "2"

submodules:
include:
- SuiteSparse
- eigen
recursive: true

build:
os: "ubuntu-22.04"
tools:
python: "3.10"

sphinx:
configuration: docs/conf.py

python:
version: 3.8
install:
- method: pip
path: .
Expand Down
Loading

0 comments on commit 1b5a628

Please sign in to comment.