IDAES / idaes-ext

IDAES developer repo for those building the idaes binary solvers and related tools.
Other
9 stars 11 forks source link

Add support for macOS (everything but HSL solvers) #69

Closed adowling2 closed 2 years ago

adowling2 commented 3 years ago

Goal: update idaes get-extensions to partially work with macOS.

Here is what happens when I run sh ./scripts/compile_libs.sh:

--2021-01-14 14:25:33--  https://coin-or-tools.github.io/ThirdParty-ASL/solvers-20180528.tgz
Resolving coin-or-tools.github.io (coin-or-tools.github.io)... 185.199.111.153, 185.199.108.153, 185.199.109.153, ...
Connecting to coin-or-tools.github.io (coin-or-tools.github.io)|185.199.111.153|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 349280 (341K) [application/octet-stream]
Saving to: ‘solvers-20180528.tgz’

solvers-20180528.tgz                       100%[=======================================================================================>] 341.09K  --.-KB/s    in 0.03s   

2021-01-14 14:25:33 (9.73 MB/s) - ‘solvers-20180528.tgz’ saved [349280/349280]

x solvers/
x solvers/r_op.hd
x solvers/obj2val.c
x solvers/r_qp.hd
x solvers/fpinitmt.c
x solvers/duthes.c
x solvers/wsu_desc.c
x solvers/sos_add.c
x solvers/punknown.c
x solvers/amplsolv.sy
x solvers/xp2known.c
x solvers/comeval.c
x solvers/stdio1.h0
x solvers/func_add.c
x solvers/mainexit.c
x solvers/op_typeb.hd
x solvers/fg_read.c
x solvers/funcadd0.c
x solvers/funcadd1.c
x solvers/funcaddk.c
x solvers/funcaddr.c
x solvers/asl.h
x solvers/fgh_read.c
x solvers/nlp.h
x solvers/errchk.h
x solvers/asl_pfgh.h
x solvers/makefile.wat
x solvers/fg_write.c
x solvers/README
x solvers/asl_pfg.h
x solvers/com2eval.c
x solvers/basename.c
x solvers/configure
x solvers/r_opn.hd
x solvers/conscale.c
x solvers/rops2.c
x solvers/nqpcheck.c
x solvers/asldate.c
x solvers/opcode.hd
x solvers/dtoa1.c
x solvers/fpsetprec.s
x solvers/avltree.c
x solvers/avltree.h
x solvers/auxinfo.c
x solvers/dvalue.hd
x solvers/fpsetprec64.s
x solvers/op_type.hd
x solvers/jacinc1.c
x solvers/objconst.c
x solvers/writesol.c
x solvers/repwhere.c
x solvers/qpcheckZ.c
x solvers/bscanf.c
x solvers/studchk0.c
x solvers/fpinit.c
x solvers/jacpdim.h
x solvers/conpval.c
x solvers/sigcatch.c
x solvers/sphes.c
x solvers/qpcheck.c
x solvers/fullhes.c
x solvers/g_fmt.c
x solvers/nl_obj.c
x solvers/arith.ibm
x solvers/atof.c
x solvers/names.c
x solvers/r_opn0.hd
x solvers/configurehere
x solvers/conadj.c
x solvers/xp1known.c
x solvers/jacdim.c
x solvers/dtoa.c
x solvers/indic_cons.c
x solvers/jacinc.c
x solvers/getenv.c
x solvers/conval.c
x solvers/obj_adj0.c
x solvers/libnamsave.c
x solvers/jac0dim.c
x solvers/00lastchange
x solvers/htcl.c
x solvers/xectim.c
x solvers/mip_pri.c
x solvers/pfg_read.c
x solvers/degree.c
x solvers/jac2dim.c
x solvers/jac2dim.h
x solvers/con2val.c
x solvers/derprop.c
x solvers/qsortv.c
x solvers/funcadd.c
x solvers/funcadd.h
x solvers/sscanf.c
x solvers/mach.c
x solvers/misc.c
x solvers/genrowno.c
x solvers/getstub.c
x solvers/getstub.h
x solvers/obj_adj.c
x solvers/obj_adj.h
x solvers/nlp2.h
x solvers/nqpcheckZ.c
x solvers/README.f77
x solvers/value.c
x solvers/mpec_adj.c
x solvers/wrtsol_.c
x solvers/mypow.c
x solvers/rops.c
x solvers/arith.h0
x solvers/sjac0dim.c
x solvers/amplsolv.lbc
x solvers/obj_prec.c
x solvers/con1ival.c
x solvers/objval.c
x solvers/printf.c
x solvers/stderr.c
x solvers/sprintf.c
x solvers/op_type.c
x solvers/arithchk.c
x solvers/rnd_prod.s
x solvers/xsum0.out
x solvers/opnos.hd
x solvers/makefile.lc
x solvers/makefile.sy
x solvers/makefile.vc
x solvers/b_search.c
x solvers/float.h0
x solvers/suf_sos.c
x solvers/pfghread.c
x solvers/con2ival.c
x solvers/mqpcheckv.c
x solvers/psinfo.h
x solvers/objval_.c
x solvers/strerror.c
x solvers/mpec_adj0.c
x solvers/comptry.bat
x solvers/qp_read.c
x solvers/fpecatch.c
x solvers/changes
x solvers/dynlink.c
x solvers/x2check.c
x solvers/ws_desc.c
x solvers/details.c0
x solvers/pshvprod.c
x solvers/readsol.c
x solvers/makefile.u
x solvers/f_read.c
cd ${OBJDIR=sys.`uname -m`.`uname -s`}; make
x86_64-apple-darwin13.4.0-clang -c -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -DASL_NO_FPINITMT fpinit.c
x86_64-apple-darwin13.4.0-clang -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe arithchk.c fpinit.o -lm ||\
     x86_64-apple-darwin13.4.0-clang -DNO_LONG_LONG -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe arithchk.c fpinit.o -lm ||\
     x86_64-apple-darwin13.4.0-clang -DNO_SSIZE_T -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe arithchk.c fpinit.o -lm ||\
     x86_64-apple-darwin13.4.0-clang -DNO_LONG_LONG -DNO_SSIZE_T -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe arithchk.c fpinit.o -lm
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libm.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libm.tbd
Undefined symbols for architecture x86_64:
  "___error", referenced from:
      _main in arithchk-69a302.o
  "___stack_chk_fail", referenced from:
      _get_nanbits in arithchk-69a302.o
      _fpinit_ASL in fpinit.o
  "___stack_chk_guard", referenced from:
      _get_nanbits in arithchk-69a302.o
      _fpinit_ASL in fpinit.o
  "___stdoutp", referenced from:
      _main in arithchk-69a302.o
  "_acos", referenced from:
      _main in arithchk-69a302.o
  "_asin", referenced from:
      _main in arithchk-69a302.o
  "_exp", referenced from:
      _main in arithchk-69a302.o
  "_fprintf", referenced from:
      _main in arithchk-69a302.o
  "_fwrite", referenced from:
      _main in arithchk-69a302.o
  "_log", referenced from:
      _main in arithchk-69a302.o
ld: symbol(s) not found for architecture x86_64
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
ld: warning: ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libm.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libm.tbd
ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd
Undefined symbols for architecture x86_64:
  "___error", referenced from:
      _main in arithchk-ae2b3e.o
  "___stack_chk_fail", referenced from:
      _get_nanbits in arithchk-ae2b3e.o
      _fpinit_ASL in fpinit.o
  "___stack_chk_guard", referenced from:
      _get_nanbits in arithchk-ae2b3e.o
      _fpinit_ASL in fpinit.o
  "___stdoutp", referenced from:
      _main in arithchk-ae2b3e.o
  "_acos", referenced from:
      _main in arithchk-ae2b3e.o
  "_asin", referenced from:
      _main in arithchk-ae2b3e.o
  "_exp", referenced from:
      _main in arithchk-ae2b3e.o
  "_fprintf", referenced from:
      _main in arithchk-ae2b3e.o
  "_fwrite", referenced from:
      _main in arithchk-ae2b3e.o
  "_log", referenced from:
      _main in arithchk-ae2b3e.o
ld: symbol(s) not found for architecture x86_64
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libm.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libm.tbd
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd
Undefined symbols for architecture x86_64:
  "___error", referenced from:
      _main in arithchk-f9e3bb.o
  "___stack_chk_fail", referenced from:
      _get_nanbits in arithchk-f9e3bb.o
      _fpinit_ASL in fpinit.o
  "___stack_chk_guard", referenced from:
      _get_nanbits in arithchk-f9e3bb.o
      _fpinit_ASL in fpinit.o
  "___stdoutp", referenced from:
      _main in arithchk-f9e3bb.o
  "_acos", referenced from:
      _main in arithchk-f9e3bb.o
  "_asin", referenced from:
      _main in arithchk-f9e3bb.o
  "_exp", referenced from:
      _main in arithchk-f9e3bb.o
  "_fprintf", referenced from:
      _main in arithchk-f9e3bb.o
  "_fwrite", referenced from:
      _main in arithchk-f9e3bb.o
  "_log", referenced from:
      _main in arithchk-f9e3bb.o
ld: symbol(s) not found for architecture x86_64
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
ld: warning: ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd
ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libm.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libm.tbd
Undefined symbols for architecture x86_64:
  "___error", referenced from:
      _main in arithchk-773485.o
  "___stack_chk_fail", referenced from:
      _get_nanbits in arithchk-773485.o
      _fpinit_ASL in fpinit.o
  "___stack_chk_guard", referenced from:
      _get_nanbits in arithchk-773485.o
      _fpinit_ASL in fpinit.o
  "___stdoutp", referenced from:
      _main in arithchk-773485.o
  "_acos", referenced from:
      _main in arithchk-773485.o
  "_asin", referenced from:
      _main in arithchk-773485.o
  "_exp", referenced from:
      _main in arithchk-773485.o
  "_fprintf", referenced from:
      _main in arithchk-773485.o
  "_fwrite", referenced from:
      _main in arithchk-773485.o
  "_log", referenced from:
      _main in arithchk-773485.o
ld: symbol(s) not found for architecture x86_64
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [arith.h] Error 1
make: *** [amplsolver] Error 2
/Library/Developer/CommandLineTools/usr/bin/make -C ./helmholtz/iapws95
cp ../common/helmholtz* ./
echo '#include"iapws95_param.h"' > helmholtz_param.h
sed s/EOS_TAG/iapws95/g helmholtz_asl_funcs.h > tmp
mv tmp helmholtz_asl_funcs.h
sed s/EOS_TAG/iapws95/g helmholtz_asl_funcs.cpp > tmp
mv tmp helmholtz_asl_funcs.cpp
g++ -c -Wall -Wextra -O3 -static -fPIC -I/Users/adowling/idaes-ext/solvers/sys.x86_64.Darwin -std=c++0x -fPIC helmholtz_external.cpp -o helmholtz_external.o
In file included from helmholtz_external.cpp:26:
helmholtz_memo.h:22:9: fatal error: boost/functional/hash.hpp: No such file or directory
   22 | #include<boost/functional/hash.hpp>
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [helmholtz_external.o] Error 1
make: *** [iapws95] Error 2
cp: ../src/dist/*.so: No such file or directory
a license_lib.txt
a tmp
a version_lib.txt

@eslickj @michaelbynum @ksbeattie any thoughts?

adowling2 commented 3 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.

adowling2 commented 3 years ago

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:

Open questions:

adowling2 commented 3 years ago

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...

adowling2 commented 3 years ago

@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.

adowling2 commented 3 years ago

@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.

adowling2 commented 3 years ago

Conversation with @michaelbynum and @eslickj:

adowling2 commented 3 years ago

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.

adowling2 commented 3 years ago

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:

adowling2 commented 3 years ago

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 '##################################################'
##################################################
adowling2 commented 3 years ago

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.

adowling2 commented 3 years ago

@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.

ksbeattie commented 3 years ago

Related to: https://github.com/IDAES/idaes-pse/issues/148 and https://github.com/IDAES/idaes-pse/issues/157

eslickj commented 2 years ago

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.