Closed adowling2 closed 2 years ago
I got Ipopt to compile with HSL. I'm getting k_aug build errors:
fatal: destination path 'k_aug' already exists and is not an empty directory.
M CMakeLists.txt
Already on 'ma57'
Your branch is up to date with 'origin/ma57'.
expr: syntax error
CMake Error at CMakeLists.txt:21 (find_library):
Could not find COINHSL using the following names: coinhsl
-- Configuring incomplete, errors occurred!
See also "/Users/adowling/DowlingLab/IDAES/idaes-ext-with-hsl/idaes-ext/k_aug/CMakeFiles/CMakeOutput.log".
You have changed variables that require your cache to be deleted.
Configure will be re-run and you may have to reset some variables.
The following variables have changed:
CMAKE_C_COMPILER= gcc-10
-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.
-- The C compiler identification is AppleClang 12.0.0.12000032
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at CMakeLists.txt:21 (find_library):
Could not find COINHSL using the following names: coinhsl
-- Configuring incomplete, errors occurred!
See also "/Users/adowling/DowlingLab/IDAES/idaes-ext-with-hsl/idaes-ext/k_aug/CMakeFiles/CMakeOutput.log".
See also "/Users/adowling/DowlingLab/IDAES/idaes-ext-with-hsl/idaes-ext/k_aug/CMakeFiles/CMakeError.log".
make: *** [cmake_check_build_system] Error 1
cp: bin/k_aug*: No such file or directory
cp: dot_sens*: No such file or directory
a idaes-solvers-darwin-64.tar.gztar: idaes-solvers-darwin-64.tar.gz: Can't add archive to itself
a ipopt
a libpynumero_ASL.dylib
a license.txt
a tmp
a version_solvers.txt
HSL Present: YES
Update: looks like I didn't structure coinhsl.zip correctly. I contained an extra folder. Success on k_aug build with coinhsl.zip correction.
On my laptop, using the binaries compiled with HSL, there are now 69 failed test:
=============================================================================================================== short test summary info ===============================================================================================================
FAILED idaes/core/util/tests/test_homotopy.py::test_basic_constraint_violation - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/core/util/tests/test_homotopy.py::test_basic_infeasible_init - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/core/util/tests/test_homotopy.py::test_basic_step_cut - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/core/util/tests/test_homotopy.py::test_basic_step_cut_2 - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/flowsheets/tests/test_demo_flowsheet.py::test_initialize_flowsheet - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/flowsheets/tests/test_demo_flowsheet.py::test_solve_flowsheet - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/properties/activity_coeff_models/tests/test_ideal_ideal_FTPz.py::test_solve - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/properties/activity_coeff_models/tests/test_ideal_ideal_FcTP.py::test_solve - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/distillation/tests/test_conventional_tray.py::TestBTXIdeal::test_initialize - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/distillation/tests/test_conventional_tray.py::TestBTXIdeal::test_solve - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/distillation/tests/test_conventional_tray.py::TestBTXIdeal::test_solution - assert 0.46337 ± 1.0e-03 == 0.5
FAILED idaes/generic_models/unit_models/distillation/tests/test_feed_tray.py::TestBTXIdeal::test_initialize - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/distillation/tests/test_feed_tray.py::TestBTXIdeal::test_solve - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/distillation/tests/test_feed_tray.py::TestBTXIdeal::test_solution - assert 0.92409 ± 1.0e-03 == 2.938735891191248e-39
FAILED idaes/generic_models/unit_models/distillation/tests/test_partial_condenser.py::TestBTXIdeal::test_initialize - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/distillation/tests/test_partial_condenser.py::TestBTXIdeal::test_solve - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/distillation/tests/test_partial_condenser.py::TestBTXIdeal::test_solution - assert 0.2306 ± 1.0e-03 == -23837.14883917126
FAILED idaes/generic_models/unit_models/distillation/tests/test_partial_condenser.py::TestBTXIdeal::test_conservation - assert 1.0 <= 1e-06
FAILED idaes/generic_models/unit_models/distillation/tests/test_reboiler.py::TestBTXIdeal::test_initialize - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/distillation/tests/test_reboiler.py::TestBTXIdeal::test_solve - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/distillation/tests/test_reboiler.py::TestBTXIdeal::test_solution - assert 0.3891 ± 1.0e-03 == 0.5
FAILED idaes/generic_models/unit_models/distillation/tests/test_reboiler.py::TestBTXIdeal::test_conservation - assert 1.0 <= 1e-06
FAILED idaes/generic_models/unit_models/distillation/tests/test_total_condenser.py::TestBTXIdeal::test_initialize - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/distillation/tests/test_total_condenser.py::TestBTXIdeal::test_solve - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/distillation/tests/test_total_condenser.py::TestBTXIdeal::test_solution - assert 0.4999 ± 1.0e-03 == 4.173579176510324e-41
FAILED idaes/generic_models/unit_models/distillation/tests/test_total_condenser.py::TestBTXIdeal::test_conservation - assert 1.0 <= 1e-05
FAILED idaes/generic_models/unit_models/distillation/tests/test_tray_column.py::TestBTXIdeal::test_initialize - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/distillation/tests/test_tray_column.py::TestBTXIdeal::test_solve - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/distillation/tests/test_tray_column.py::TestBTXIdeal::test_solution - assert 47.45 ± 4.7e-01 == 0.4166666666666667
FAILED idaes/generic_models/unit_models/distillation/tests/test_tray_side_liq_draw.py::TestBTXIdeal::test_initialize - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/distillation/tests/test_tray_side_liq_draw.py::TestBTXIdeal::test_solve - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/distillation/tests/test_tray_side_liq_draw.py::TestBTXIdeal::test_solution - assert 0.23168 ± 1.0e-03 == 0.25
FAILED idaes/generic_models/unit_models/distillation/tests/test_tray_side_vap_draw.py::TestBTXIdeal::test_initialize - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/distillation/tests/test_tray_side_vap_draw.py::TestBTXIdeal::test_solve - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/distillation/tests/test_tray_side_vap_draw.py::TestBTXIdeal::test_solution - assert 0.46337 ± 1.0e-03 == 0.5
FAILED idaes/generic_models/unit_models/tests/test_feed_flash.py::TestBTXIdeal::test_initialize - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/tests/test_feed_flash.py::TestBTXIdeal::test_solution - assert 1.0 ± 1.0e-02 == 4.393348398717512
FAILED idaes/generic_models/unit_models/tests/test_flash.py::TestBTXIdeal::test_initialize - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/tests/test_flash.py::TestBTXIdeal::test_solve - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/tests/test_flash.py::TestBTXIdeal::test_solution - assert 0.603 ± 1.0e-03 == 0.5
FAILED idaes/generic_models/unit_models/tests/test_gibbs.py::TestMethane::test_solve_temperature - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/tests/test_gibbs.py::TestMethane::test_initialize_duty - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/tests/test_gibbs.py::TestMethane::test_solve_heat_duty - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/tests/test_gibbs.py::TestMethane::test_solution_duty - assert 250.06 ± 1.0e-01 == 251.05
FAILED idaes/generic_models/unit_models/tests/test_gibbs.py::TestMethane::test_conservation_duty - assert 641120.1466116067 <= 0.0001
FAILED idaes/generic_models/unit_models/tests/test_heat_exchanger.py::TestSaponification_crossflow::test_initialize - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/tests/test_heat_exchanger.py::TestSaponification_crossflow::test_solve - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/tests/test_heat_exchanger.py::TestSaponification_crossflow::test_solution - assert 301.3 ± 1.0e-01 == 319.7603189795436
FAILED idaes/generic_models/unit_models/tests/test_heat_exchanger_1D.py::TestBTX_countercurrent::test_initialize - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/tests/test_heat_exchanger_1D.py::TestBTX_countercurrent::test_solve - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/tests/test_heat_exchanger_1D.py::TestBTX_countercurrent::test_solution - assert 304.292 ± 1.0e-03 == 348.56052715168266
FAILED idaes/generic_models/unit_models/tests/test_heat_exchanger_1D.py::TestBTX_countercurrent::test_conservation - assert 34098.9157823602 <= 1e-06
FAILED idaes/generic_models/unit_models/tests/test_separator.py::TestBTXIdeal::test_initialiszation - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/tests/test_separator.py::TestBTXIdeal::test_solve - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/tests/test_separator.py::TestBTXIdeal::test_solution - assert 0.438 ± 1.0e-03 == 1.0
FAILED idaes/generic_models/unit_models/tests/test_separator.py::TestBTXIdeal::test_conservation - assert 1.0 <= 1e-05
FAILED idaes/generic_models/unit_models/tests/test_separator.py::TestBTX_Ideal::test_initialiszation - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/tests/test_separator.py::TestBTX_Ideal::test_solve - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/generic_models/unit_models/tests/test_separator.py::TestBTX_Ideal::test_solution - assert 0.396 ± 1.0e-03 == 0.5
FAILED idaes/generic_models/unit_models/tests/test_translator.py::TestTranslate::test_initialize - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/power_generation/unit_models/helm/tests/test_turbine_multistage.py::test_initialize - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/power_generation/unit_models/tests/test_boiler_heat_exchanger.py::test_boiler_hx - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/power_generation/unit_models/tests/test_feedwater_heater.py::test_fwh_model - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/power_generation/unit_models/tests/test_heat_exchanger2D.py::test_initialize_unit - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/power_generation/unit_models/tests/test_heat_exchanger2D.py::test_run_drum - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/power_generation/unit_models/tests/test_heat_exchanger_3streams.py::test_initialize_unit - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/power_generation/unit_models/tests/test_heat_exchanger_3streams.py::test_run_unit - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
FAILED idaes/tests/test_docs.py::test_doctests - assert 1 == 0
FAILED idaes/tests/test_logger.py::test_solver_condition2 - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
ERROR idaes/core/util/tests/test_homotopy.py::test_ideal_prop - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
ERROR idaes/core/util/tests/test_homotopy.py::test_ideal_prop_max_iter - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
ERROR idaes/power_generation/flowsheets/test/test_subcritical_boiler.py::test_basic_build - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
ERROR idaes/power_generation/flowsheets/test/test_subcritical_boiler.py::test_init - pyutilib.common._exceptions.ApplicationError: Solver (ipopt) did not exit normally
=================================================================================== 69 failed, 3444 passed, 6 skipped, 83 deselected, 4 errors in 305.82s (0:05:05) ===================================================================================
Here is a recap of our testing:
libcoinhsl
.coinbrew
folder. This will force Ipopt to be redownloaded and recompiled. The --reconfigure
flag did not seem to work reliably.--without-hsl
flag for Ipopt and -static-libstdc++
flag for external functions. 397 tested failed on laptop (my notes/memory might be wrong here).Open questions:
I am seeing a lot of
ERROR: Solver (ipopt) returned non-zero return code (-6)
and
iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls
0 0.0000000e+00 7.72e+04 0.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0
Error in an AMPL evaluation. Run with "halt_on_ampl_error yes" to see details.
This is wild speculation, but I wonder if my machines have different versions of Blas or Lapack installed. My laptop was recently updated from High Sierra to Big Sur. I would not be surprised if that broke something subtle...
@michaelbynum Sorry for the mess; I'm working in 3 branches. Here are my notes on how to make this work: https://github.com/IDAES/idaes-ext/blob/adowling2-macos-laptop/macOS_notes.md
I'll ask you during our call tomorrow to give this a try.
@ksbeattie See the link above for instructions. I'm going to try these out on Friday and then again next week with a few students that are macOS users.
Conversation with @michaelbynum and @eslickj:
This morning, I tried to merge my three macOS branches into one. I am currently working on adowling2-macos
. Unfortunately, I'm having an Ipopt compilation issues now on my desktop:
##################################################
### Building Ipopt idaes-3.13
##################################################
libtool: warning: '-version-info' is ignored for programs
ld: library not found for -lcoinhsl
collect2: error: ld returned 1 exit status
make[2]: *** [ipopt] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
Build failed, see error output above
Workaround: pass the --without-hsl
flag to coinbrew if not compiling with HSL. This is not working... perhaps I made a bash script mistake.
I switched over to the with HSL folder on the desktop. I'm still getting this error:
##################################################
### Building Ipopt idaes-3.13
##################################################
libtool: warning: '-version-info' is ignored for programs
ld: library not found for -lcoinhsl
collect2: error: ld returned 1 exit status
make[2]: *** [ipopt] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
Build failed, see error output above
Looks like HSL is getting skipped:
##################################################
### Skipping ThirdParty/HSL
##################################################
Next step:
Here is the debug output from compiling with HSL:
+ for entry in $deps
+ expr 'ThirdParty/HSL https://github.com/coin-or-tools/ThirdParty-HSL stable/2.0' : '^#'
++ echo 'ThirdParty/HSL https://github.com/coin-or-tools/ThirdParty-HSL stable/2.0'
++ tr '\t' ' '
++ tr -s ' '
++ cut -d ' ' -f 1
+ dir=ThirdParty/HSL
++ echo 'ThirdParty/HSL https://github.com/coin-or-tools/ThirdParty-HSL stable/2.0'
++ tr '\t' ' '
++ tr -s ' '
++ cut -d ' ' -f 2
+ url=https://github.com/coin-or-tools/ThirdParty-HSL
++ echo https://github.com/coin-or-tools/ThirdParty-HSL
++ cut -d / -f 5
+ proj=ThirdParty-HSL
+ sha=
+ '[' ThirdParty/HSL '!=' Ipopt ']'
+ should_fetch
+ '[' -d ThirdParty/HSL ']'
+ '[' false = true ']'
+ '[' false '!=' true ']'
+ return 1
+ '[' false = true ']'
+ '[' -d ThirdParty/HSL ']'
+ pushd_ ThirdParty/HSL
+ pushd ThirdParty/HSL
++ get_version_git
+++ git rev-parse HEAD
++ current_rev=34c47eb64d3a899414012875a8c38dd0ea593299
+++ git show-ref --tags
+++ fgrep 34c47eb64d3a899414012875a8c38dd0ea593299
++ [[ '' == *releases* ]]
+++ git show-ref --heads
+++ fgrep 34c47eb64d3a899414012875a8c38dd0ea593299
++ [[ 34c47eb64d3a899414012875a8c38dd0ea593299 refs/heads/stable/2.0 == *stable* ]]
++ git show-ref --heads
++ fgrep 34c47eb64d3a899414012875a8c38dd0ea593299
++ fgrep stable
++ cut -d / -f 4
+ version_num=2.0
+ popd_
+ popd
+ '[' true = true ']'
+ '[' ThirdParty/HSL '!=' BuildTools ']'
+ '[' ThirdParty/HSL '!=' examples ']'
+ should_build ThirdParty/HSL
+ TMP_IFS='
'
+ unset IFS
++ echo ThirdParty/HSL
++ cut -d / -f 1
+ '[' ThirdParty = ThirdParty ']'
++ echo ThirdParty/HSL
++ cut -d / -f 2
+ '[' HSL = HSL ']'
+ '[' '!' -f ThirdParty/HSL/coinhsl/common/deps.f ']'
+ IFS='
'
+ return 1
+ print_action 'Skipping ThirdParty/HSL'
+ echo
+ echo '##################################################'
##################################################
+ echo '### Skipping ThirdParty/HSL '
### Skipping ThirdParty/HSL
+ echo '##################################################'
##################################################
There was a strange zip issue creating a coinhsl folder inside the coinhsl folder. I do not know what I did to fix it. I recently committed updated macOS scripts. Running pytest
now.
@eslickj @michaelbynum Good news. We've tested these instructions on 7+ macOS computers ranging from High Sierra to Big Sur. I think we have a solid set of instructions. There is still work to be done on getting the executable to be transferable between machines.
I'm going to open a PR. @eslickj, I'll need your help cleaning up the bash scripts.
I think I have Arm64 extensions for macOS ready to go. I'm going to close this and we can add new specific issues moving forward.
Goal: update idaes get-extensions to partially work with macOS.
Here is what happens when I run
sh ./scripts/compile_libs.sh
:@eslickj @michaelbynum @ksbeattie any thoughts?