[Ipopt] conda-forge recipe

St. John, Peter Peter.STJohn at nrel.gov
Mon Sep 19 10:06:01 EDT 2016


Hi Ted,

I’m more than happy to collaborate! Thanks for the offer to help. Conda’s build system is a bit particular, but I’m sure between the two of us we could figure it out. I’ve got the linux build/test running, mac builds correctly but fails on the test script (error below). Haven’t started windows, since I’m not very familiar with writing the .bat files conda wants.

What do you think the best way to join forces would be? It looks like you’re trying to get binaries built for the entire coin-or optimization suite; I’m happy to abandon this PR if you think it would be better if there was a single conda recipe for everything.

Here’s the error I’m getting for mac. This is separate from ‘make test’, which tests if the build completed successfully. Here’re we’re testing if you can link against the installed conda package. The ipopt binary works, but compiling the simple Cpp example seems to fail on execution:

g++ -I/Users/travis/miniconda/envs/_test/include/coin  -c -o cpp_example.o cpp_example.cpp

g++ -I/Users/travis/miniconda/envs/_test/include/coin  -c -o MyNLP.o MyNLP.cpp

g++ -L/Users/travis/miniconda/envs/_test/lib -lipopt -I/Users/travis/miniconda/envs/_test/include/coin -o cpp_example cpp_example.o MyNLP.o

+./cpp_example

+grep -q 'Optimal Solution'

dyld: Library not loaded: @rpath/libipopt.1.dylib

  Referenced from: /Users/travis/miniconda/conda-bld/test-tmp_dir/Cpp_example/./cpp_example

  Reason: image not found


TESTS FAILED: ipopt-3.12.5-0

--
Peter St. John
Postdoctoral Researcher | Biosciences Center

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
303-384-7969
peter.stjohn at nrel.gov | www.nrel.gov

From: Ted Ralphs <ted at lehigh.edu<mailto:ted at lehigh.edu>>
Date: Monday, September 19, 2016 at 6:57 AM
To: "Peter St. John" <peter.stjohn at nrel.gov<mailto:peter.stjohn at nrel.gov>>
Cc: "Anthony D. Kelman" <kelman at berkeley.edu<mailto:kelman at berkeley.edu>>, ipopt <ipopt at list.coin-or.org<mailto:ipopt at list.coin-or.org>>
Subject: Re: [Ipopt] conda-forge recipe

Hi Peter,

I build Ipopt on all three OS's regularly and maintain the .travis.yml and appveyor.yml files that you'll see in the repo. These power the automated build and test that I'm doing. I have automated deployment of binaries working for some other projects and have been thinking about deploying this for Ipopt. Seems we have similar goals so it might make sense to collaborate. If nothing else, I'm happy to share lessons learned in getting this set up.

Cheers,

Ted

On Sun, Sep 18, 2016 at 3:42 PM, St. John, Peter <Peter.STJohn at nrel.gov<mailto:Peter.STJohn at nrel.gov>> wrote:
Awesome thanks for the help!, it looked like the problem was in passing the environment variables, and ld complained about `-no-as-needed`. I pushed some changes that seem to work when I build it locally, we'll see how we do on the CI.

--
Peter St. John
Postdoctoral Researcher | Biosciences Center

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
303-384-7969<tel:303-384-7969>
peter.stjohn at nrel.gov<mailto:peter.stjohn at nrel.gov> | www.nrel.gov<http://www.nrel.gov>

From: "Anthony D. Kelman" <kelman at berkeley.edu<mailto:kelman at berkeley.edu><mailto:kelman at berkeley.edu<mailto:kelman at berkeley.edu>>>
Date: Sunday, September 18, 2016 at 7:18 AM
To: "Peter St. John" <peter.stjohn at nrel.gov<mailto:peter.stjohn at nrel.gov><mailto:peter.stjohn at nrel.gov<mailto:peter.stjohn at nrel.gov>>>
Cc: ipopt <ipopt at list.coin-or.org<mailto:ipopt at list.coin-or.org><mailto:ipopt at list.coin-or.org<mailto:ipopt at list.coin-or.org>>>
Subject: Re: [Ipopt] conda-forge recipe


You're going to need to look at the config.log to find the full error.

On Sep 18, 2016 6:11 AM, "St. John, Peter" <Peter.STJohn at nrel.gov<mailto:Peter.STJohn at nrel.gov><mailto:Peter.STJohn at nrel.gov<mailto:Peter.STJohn at nrel.gov>>> wrote:
I'm trying to get a conda recipe working for IPOPT; for those who aren't familiar, conda is a fairly generic package management system that compiles from source using continuous integration services, and then ships binaries when a user `conda install`'s something. In particular, its really nice for creating isolated environments (similar to python's virtual environments) using an environment.yml file, where you're able to simply list the libraries (and versions) of your dependencies. That way when sharing code with others or setting up on a new computer, you don't have to manually track down binary files or rebuild from source for each library your using.

I've currently got it compiling against intel's MKL libraries on linux, but its not working on mac or windows. For Mac, I'm seemingly unable to get past the

checking whether user supplied BLASLIB="-Wl,--no-as-needed -L$PREFIX/lib -Wl,-rpath,$PREFIX/lib -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -liomp5 -lpthread -lm -ldl" works... no

error during ./configure. (I was able to get it to take an openblas library, but it failed later during the build stage). I've got very little knowledge on building IPOPT on windows, so I'm currently just skipping that.


I figured I'd reach out in case anyone might have more experience building IPOPT on various architectures and might be willing to lend advice as to why the builds might be failing. You can see the current recipe here: https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_conda-2Dforge_staged-2Drecipes_pull_1607&d=CwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=en0_ydai4UPM8nLin0WTg5UWlOXuXT_rDA2W227v-no&m=af5bLJkK8YiI_83AdQeZRFDeRN3NWAruVbJCjwRQ5S0&s=GmCTSHKGoAtptWbVsQo5TtWauFhAD-kWTI4B2Y2SmGU&e=

Thanks!
-Peter



--
Peter St. John
Postdoctoral Researcher | Biosciences Center

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
303-384-7969<tel:303-384-7969><tel:303-384-7969<tel:303-384-7969>>
peter.stjohn at nrel.gov<mailto:peter.stjohn at nrel.gov><mailto:peter.stjohn at nrel.gov<mailto:peter.stjohn at nrel.gov>> | www.nrel.gov<http://www.nrel.gov><https://urldefense.proofpoint.com/v2/url?u=http-3A__www.nrel.gov&d=CwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=rnUB298ByR5BGgo6vv2b6g&m=F-mPbo_HW3CCtNq0GCZFXs1IV-tSfMtzzsmDNYBfhoI&s=bzaBz3XxnUf4nv_Y2hfLlD04X-MwjLrvP5ffQw2XMUw&e= >

_______________________________________________
Ipopt mailing list
Ipopt at list.coin-or.org<mailto:Ipopt at list.coin-or.org><mailto:Ipopt at list.coin-or.org<mailto:Ipopt at list.coin-or.org>>
https://urldefense.proofpoint.com/v2/url?u=http-3A__list.coin-2Dor.org_mailman_listinfo_ipopt&d=CwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=en0_ydai4UPM8nLin0WTg5UWlOXuXT_rDA2W227v-no&m=af5bLJkK8YiI_83AdQeZRFDeRN3NWAruVbJCjwRQ5S0&s=o4AdF032QO5UCLYUWhL-3hPwqX70eJQpf7G23r-YexA&e=

_______________________________________________
Ipopt mailing list
Ipopt at list.coin-or.org<mailto:Ipopt at list.coin-or.org>
https://urldefense.proofpoint.com/v2/url?u=http-3A__list.coin-2Dor.org_mailman_listinfo_ipopt&d=CwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=rnUB298ByR5BGgo6vv2b6g&m=F-mPbo_HW3CCtNq0GCZFXs1IV-tSfMtzzsmDNYBfhoI&s=DcgN0FzLA73z9qxD2pxp-bxj2abjDrKxqewcAo4fU_E&e=



--
Dr. Ted Ralphs
Professor, Lehigh University
(610) 628-1280
ted 'at' lehigh 'dot' edu
coral.ie.lehigh.edu/~ted<http://coral.ie.lehigh.edu/~ted>



More information about the Ipopt mailing list