libprima / prima

PRIMA is a package for solving general nonlinear optimization problems without using derivatives. It provides the reference implementation for Powell's derivative-free optimization methods, i.e., COBYLA, UOBYQA, NEWUOA, BOBYQA, and LINCOA. PRIMA means Reference Implementation for Powell's methods with Modernization and Amelioration, P for Powell.
http://libprima.net
BSD 3-Clause "New" or "Revised" License
304 stars 40 forks source link

Enable shared libs on win32 #59

Closed jschueller closed 1 year ago

zaikunzhang commented 1 year ago

temporarily remove other tests

Please remember to get them back before we merge the PR :) Thank you.

github-actions[bot] commented 1 year ago

@check-spelling-bot Report

:red_circle: Please review

See the :open_file_folder: files view, the :scroll:action log or :angel: SARIF report for details.

Unrecognized words (1)

peview

To accept :heavy_check_mark: these unrecognized words as correct, run the following commands ... in a clone of the [git@github.com:jschueller/prima.git](https://github.com/jschueller/prima.git) repository on the `shared` branch ([:information_source: how do I use this?]( https://github.com/check-spelling/check-spelling/wiki/Accepting-Suggestions)): ``` sh curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/main/apply.pl' | perl - 'https://github.com/libprima/prima/actions/runs/6189027103/attempts/1' ```
If the flagged items are :exploding_head: false positives If items relate to a ... * binary file (or some other file you wouldn't want to check at all). Please add a file path to the `excludes.txt` file matching the containing file. File paths are Perl 5 Regular Expressions - you can [test]( https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files. `^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md]( ../tree/HEAD/README.md) (on whichever branch you're using). * well-formed pattern. If you can write a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it, try adding it to the `patterns.txt` file. Patterns are Perl 5 Regular Expressions - you can [test]( https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines. Note that patterns can't match multiline strings.
amontoison commented 1 year ago

I tested this PR with the cross-compiler and shared libraries (dll) and the import libraries (dll.a) are now generated on Windows.

Install the project...
/usr/bin/cmake -P cmake_install.cmake
-- Install configuration: "Release"
-- Installing: /workspace/destdir/lib/libprimaf.dll.a
-- Installing: /workspace/destdir/bin/libprimaf.dll
-- Installing: /workspace/destdir/lib/libprimac.dll.a
-- Installing: /workspace/destdir/bin/libprimac.dll
-- Installing: /workspace/destdir/lib/cmake/prima/prima-targets.cmake
-- Installing: /workspace/destdir/lib/cmake/prima/prima-targets-release.cmake
-- Installing: /workspace/destdir/lib/cmake/prima/prima-config.cmake
-- Installing: /workspace/destdir/lib/cmake/prima/prima-config-version.cmake
-- Up-to-date: /workspace/destdir/lib/libprimaf.dll.a
-- Up-to-date: /workspace/destdir/bin/libprimaf.dll
-- Installing: /workspace/destdir/include/prima/mod
-- Installing: /workspace/destdir/include/prima/mod/pintrf_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/initialize_cobyla_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/initialize_bobyqa_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/powalg_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/trustregion_newuoa_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/string_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/linalg_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/trustregion_bobyqa_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/geometry_newuoa_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/selectx_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/consts_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/getact_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/cobyla_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/update_newuoa_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/geometry_uobyqa_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/shiftbase_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/lincoa_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/geometry_bobyqa_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/xinbd_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/trustregion_lincoa_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/ratio_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/redrho_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/checkexit_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/infnan_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/infos_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/geometry_lincoa_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/uobyqb_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/trustregion_uobyqa_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/initialize_uobyqa_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/update_lincoa_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/uobyqa_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/fprint_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/update_bobyqa_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/cobylb_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/lincob_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/message_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/initialize_newuoa_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/rescue_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/history_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/debug_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/bobyqb_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/update_cobyla_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/evaluate_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/bobyqa_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/initialize_lincoa_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/preproc_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/memory_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/trustregion_cobyla_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/newuoa_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/univar_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/geometry_cobyla_mod.mod
-- Installing: /workspace/destdir/include/prima/mod/update_uobyqa_mod.mod
-- Up-to-date: /workspace/destdir/lib/libprimac.dll.a
-- Up-to-date: /workspace/destdir/bin/libprimac.dll
-- Installing: /workspace/destdir/include/prima/prima.h
github-actions[bot] commented 1 year ago

@check-spelling-bot Report

:red_circle: Please review

See the :open_file_folder: files view, the :scroll:action log or :angel: SARIF report for details.

Unrecognized words (1)

peview

To accept :heavy_check_mark: these unrecognized words as correct, run the following commands ... in a clone of the [git@github.com:jschueller/prima.git](https://github.com/jschueller/prima.git) repository on the `shared` branch ([:information_source: how do I use this?]( https://github.com/check-spelling/check-spelling/wiki/Accepting-Suggestions)): ``` sh curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/main/apply.pl' | perl - 'https://github.com/libprima/prima/actions/runs/6189159039/attempts/1' ```
If the flagged items are :exploding_head: false positives If items relate to a ... * binary file (or some other file you wouldn't want to check at all). Please add a file path to the `excludes.txt` file matching the containing file. File paths are Perl 5 Regular Expressions - you can [test]( https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files. `^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md]( ../tree/HEAD/README.md) (on whichever branch you're using). * well-formed pattern. If you can write a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it, try adding it to the `patterns.txt` file. Patterns are Perl 5 Regular Expressions - you can [test]( https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines. Note that patterns can't match multiline strings.
github-actions[bot] commented 1 year ago

@check-spelling-bot Report

:red_circle: Please review

See the :open_file_folder: files view, the :scroll:action log or :angel: SARIF report for details.

Unrecognized words (1)

peview

To accept :heavy_check_mark: these unrecognized words as correct, run the following commands ... in a clone of the [git@github.com:jschueller/prima.git](https://github.com/jschueller/prima.git) repository on the `shared` branch ([:information_source: how do I use this?]( https://github.com/check-spelling/check-spelling/wiki/Accepting-Suggestions)): ``` sh curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/main/apply.pl' | perl - 'https://github.com/libprima/prima/actions/runs/6189279031/attempts/1' ```
If the flagged items are :exploding_head: false positives If items relate to a ... * binary file (or some other file you wouldn't want to check at all). Please add a file path to the `excludes.txt` file matching the containing file. File paths are Perl 5 Regular Expressions - you can [test]( https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files. `^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md]( ../tree/HEAD/README.md) (on whichever branch you're using). * well-formed pattern. If you can write a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it, try adding it to the `patterns.txt` file. Patterns are Perl 5 Regular Expressions - you can [test]( https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines. Note that patterns can't match multiline strings.
github-actions[bot] commented 1 year ago

@check-spelling-bot Report

:red_circle: Please review

See the :open_file_folder: files view, the :scroll:action log or :angel: SARIF report for details.

Unrecognized words (1)

peview

To accept :heavy_check_mark: these unrecognized words as correct, run the following commands ... in a clone of the [git@github.com:jschueller/prima.git](https://github.com/jschueller/prima.git) repository on the `shared` branch ([:information_source: how do I use this?]( https://github.com/check-spelling/check-spelling/wiki/Accepting-Suggestions)): ``` sh curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/main/apply.pl' | perl - 'https://github.com/libprima/prima/actions/runs/6189395822/attempts/1' ```
If the flagged items are :exploding_head: false positives If items relate to a ... * binary file (or some other file you wouldn't want to check at all). Please add a file path to the `excludes.txt` file matching the containing file. File paths are Perl 5 Regular Expressions - you can [test]( https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files. `^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md]( ../tree/HEAD/README.md) (on whichever branch you're using). * well-formed pattern. If you can write a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it, try adding it to the `patterns.txt` file. Patterns are Perl 5 Regular Expressions - you can [test]( https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines. Note that patterns can't match multiline strings.
github-actions[bot] commented 1 year ago

@check-spelling-bot Report

:red_circle: Please review

See the :open_file_folder: files view, the :scroll:action log or :angel: SARIF report for details.

Unrecognized words (1)

peview

To accept :heavy_check_mark: these unrecognized words as correct, run the following commands ... in a clone of the [git@github.com:jschueller/prima.git](https://github.com/jschueller/prima.git) repository on the `shared` branch ([:information_source: how do I use this?]( https://github.com/check-spelling/check-spelling/wiki/Accepting-Suggestions)): ``` sh curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/main/apply.pl' | perl - 'https://github.com/libprima/prima/actions/runs/6189544038/attempts/1' ```
If the flagged items are :exploding_head: false positives If items relate to a ... * binary file (or some other file you wouldn't want to check at all). Please add a file path to the `excludes.txt` file matching the containing file. File paths are Perl 5 Regular Expressions - you can [test]( https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files. `^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md]( ../tree/HEAD/README.md) (on whichever branch you're using). * well-formed pattern. If you can write a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it, try adding it to the `patterns.txt` file. Patterns are Perl 5 Regular Expressions - you can [test]( https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines. Note that patterns can't match multiline strings.
github-actions[bot] commented 1 year ago

@check-spelling-bot Report

:red_circle: Please review

See the :open_file_folder: files view, the :scroll:action log or :angel: SARIF report for details.

Unrecognized words (1)

peview

To accept :heavy_check_mark: these unrecognized words as correct, run the following commands ... in a clone of the [git@github.com:jschueller/prima.git](https://github.com/jschueller/prima.git) repository on the `shared` branch ([:information_source: how do I use this?]( https://github.com/check-spelling/check-spelling/wiki/Accepting-Suggestions)): ``` sh curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/main/apply.pl' | perl - 'https://github.com/libprima/prima/actions/runs/6189663254/attempts/1' ```
If the flagged items are :exploding_head: false positives If items relate to a ... * binary file (or some other file you wouldn't want to check at all). Please add a file path to the `excludes.txt` file matching the containing file. File paths are Perl 5 Regular Expressions - you can [test]( https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files. `^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md]( ../tree/HEAD/README.md) (on whichever branch you're using). * well-formed pattern. If you can write a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it, try adding it to the `patterns.txt` file. Patterns are Perl 5 Regular Expressions - you can [test]( https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines. Note that patterns can't match multiline strings.
zaikunzhang commented 1 year ago

Hi, @jschueller and @amontoison ,

Thank @jschueller for the efforts!

Is this PR ready? If yes, I will merge it after @jschueller gets the deleted tests back (remember to do this :) ).

Thank you.

Best regards, Zaikun

jschueller commented 1 year ago

this is good to go