Skip to content

Conversation

@jsiirola
Copy link
Member

Fixes #53

Summary/Motivation:

We previously performed no validation around the external function library location. This leverages pyomo.common.fileutils.find_library to search the filesystem for the specified library (looking in the CWD, plus directories specified the PYOMO_CONFIG_DIR, LD_LIBRARY_PATH, PATH).

Changes proposed in this PR:

  • Search for the external function library, and if found provide the absolute path to to the NL writer
    -Add test for warning if the library is not found.

Legal Acknowledgement

By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

Copy link
Contributor

@michaelbynum michaelbynum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@mrmundt
Copy link
Contributor

mrmundt commented Feb 23, 2022

This has passed at least one test in each OS, plus is passing at least one jobs on Jenkins, so I am going to merge this PR.

@mrmundt mrmundt merged commit f9f15fe into Pyomo:main Feb 23, 2022
@jsiirola jsiirola deleted the search-external-lib branch February 24, 2022 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pyomo should be able to load external functions from .so file in LD_LIBRARY_PATH

3 participants