Skip to content

Commit 4007168

Browse files
Replacing "--with-lagrangian" with "--lagrangian" in hydro example and other details (#400)
* mainly modifying bash demo script to avoid --with-lagrangian * Update hydro_cylinders.py * stop using setup.py, start using pip install --------- Co-authored-by: David L Woodruff <[email protected]>
1 parent ad4ba8b commit 4007168

13 files changed

+14
-12
lines changed

.github/workflows/nompi4py.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
3030
- name: setup the program
3131
run: |
32-
python setup.py develop
32+
pip install -e .
3333
3434
- name: PH EF tests
3535
run: |

.github/workflows/pull_push_regression.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
3636
- name: setup the program
3737
run: |
38-
python setup.py develop
38+
pip install -e .
3939
4040
- name: Test EF/PH
4141
run: |

.github/workflows/schur_complement.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ jobs:
3131
pip install git+https://github.com/pyutilib/pyutilib.git
3232
git clone https://github.com/pyomo/pyomo.git
3333
cd pyomo/
34-
python setup.py develop
34+
pip install -e .
3535
pyomo download-extensions
3636
pyomo build-extensions
3737
cd ../
3838
pip install git+https://github.com/parapint/parapint.git
39-
python setup.py develop
39+
pip install -e .
4040
- name: Test with nose
4141
run: |
4242
nosetests -v mpisppy/tests/test_sc.py

.github/workflows/straight.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
3232
- name: setup the program
3333
run: |
34-
python setup.py develop
34+
pip install -e .
3535
3636
- name: mpi tests
3737
run: |

.github/workflows/testaph.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
3333
- name: setup the program
3434
run: |
35-
python setup.py develop
35+
pip install -e .
3636
3737
- name: run tests
3838
timeout-minutes: 100

.github/workflows/testbunpick.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
3232
- name: setup the program
3333
run: |
34-
python setup.py develop
34+
pip install -e .
3535
3636
- name: run pickled bundles tests
3737
timeout-minutes: 10

.github/workflows/testconfint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
3232
- name: setup the program
3333
run: |
34-
python setup.py develop
34+
pip install -e .
3535
3636
- name: run farmer tests
3737
timeout-minutes: 10

.github/workflows/testgradient.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
3030
- name: setup the program
3131
run: |
32-
python setup.py develop
32+
pip install -e .
3333
3434
- name: Build Pyomo extensions
3535
run: |

.github/workflows/testpysp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
3434
- name: setup the program
3535
run: |
36-
python setup.py develop
36+
pip install -e .
3737
3838
- name: run pysp model tests
3939
timeout-minutes: 100

.github/workflows/testwithcylinders.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
3232
- name: setup the program
3333
run: |
34-
python setup.py develop
34+
pip install -e .
3535
3636
- name: run tests
3737
timeout-minutes: 10

examples/hydro/demo.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
SOLVERNAME=cplex
44

5-
mpiexec --oversubscribe --np 3 python -m mpi4py hydro_cylinders.py --branching-factors 3 3 --bundles-per-rank=0 --max-iterations=100 --default-rho=1 --with-xhatshuffle --with-lagrangian --solver-name=${SOLVERNAME} --stage2EFsolvern=${SOLVERNAME}
5+
mpiexec --oversubscribe --np 3 python -m mpi4py hydro_cylinders.py --branching-factors 3 3 --bundles-per-rank=0 --max-iterations=100 --default-rho=1 --xhatshuffle --lagrangian --solver-name=${SOLVERNAME} --stage2EFsolvern=${SOLVERNAME}
66

77
# including this option will cause the upper bounder to solve the EF since there are only three ranks in total.
88
#--stage2EFsolvern=${SOLVERNAME}

examples/hydro/hydro.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ def scenario_creator(scenario_name, branching_factors=None, data_path=None):
228228
instance = model.create_instance(fname, name=scenario_name)
229229

230230
instance._mpisppy_node_list = MakeNodesforScen(instance, branching_factors, snum)
231+
model._mpisppy_probability = "uniform"
231232
return instance
232233

233234
#=============================================================================

examples/hydro/hydro_cylinders.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ def main():
9292
list_of_spoke_dict.append(xhatshuffle_spoke)
9393

9494
if cfg.stage2EFsolvern is not None:
95+
assert xhatshuffle is not None, "xhatshuffle is required for stage2EFsolvern"
9596
xhatshuffle_spoke["opt_kwargs"]["options"]["stage2EFsolvern"] = cfg["stage2EFsolvern"]
9697
xhatshuffle_spoke["opt_kwargs"]["options"]["branching_factors"] = cfg["branching_factors"]
9798

0 commit comments

Comments
 (0)