Skip to content

switch to libprima/prima #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions prima/.github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2261,11 +2261,6 @@ TESTQUAD
WAITALL
xcodebuild
ICX
bglobal
cglobal
lglobal
nglobal
uglobal
Belakovski
allclose
argmin
Expand All @@ -2288,7 +2283,6 @@ jth
Kbreak
mgh
mmm
multd
nanargmax
tenbars
tfi
Expand Down
2 changes: 1 addition & 1 deletion prima/.github/workflows/build_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
fi

- name: Build wheels
uses: pypa/cibuildwheel@v2.18.1
uses: pypa/cibuildwheel@v2.20.0

- uses: actions/upload-artifact@v4
with:
Expand Down
6 changes: 6 additions & 0 deletions prima/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ option (BUILD_SHARED_LIBS "shared/static" ON)

include (GNUInstallDirs)

# the compiler enables an executable stack because of nested functions and this is fine
if (CMAKE_Fortran_COMPILER_ID MATCHES "GNU" AND CMAKE_VERSION VERSION_GREATER_EQUAL 3.18)
include (CheckLinkerFlag)
check_linker_flag (Fortran "-Wl,--no-warn-execstack" HAVE_WARN_EXECSTACK)
endif ()

# Set additional Fortran compiler flags
# 0. See https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_ID.html for compiler IDs.
# 1. We require the compilers to allocate arrays on the heap instead of the stack, which is
Expand Down
2 changes: 1 addition & 1 deletion prima/LICENCE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2020--2024, Zaikun ZHANG ( https://www.zhangzk.net )
Copyright (c) 2020--2025, Zaikun ZHANG ( https://www.zhangzk.net )

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Expand Down
165 changes: 41 additions & 124 deletions prima/README.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions prima/pyprima/profiles_vs_matlab/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pycutest_cache_holder
out
7 changes: 7 additions & 0 deletions prima/pyprima/profiles_vs_matlab/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
This folder contains scripts and utilities to run performance profiles of the PRIMA Python bindings against the PRIMA MATLAB bindings.

In general we expect the performance profiles to show a straight line for both the output based and history based profiles since the underlying code is the same. However since there are bound to be some differences in how MATLAB and Python handle floating point arithmetic we expect to see a few cases where one might perform slightly "better" than the other.

In order to use this you will need Python and MATLAB and in the MATLAB GUI you should have run setup.m from the root of the repo. If that has been completed you should be able to run the profiles with simply `python profiles.py`. By default no profiles will be run, so you need to specify which algorithm you'd like to run profiles for using any combination of `-b` for BOBYQA, `-c` for COBYLA, `-l` for LINCOA, `-n` for NEWUOA, and `-u` for UOBYQA. You can also use `-j#` to change the number of jobs used to run the problems. For example to run both UOBYQA and NEWUOA with 4 jobs, you would run `python profiles.py -nuj4`.

It is not necessary to have a MATLAB window open to run the profiles. Each job will create an instance of the MATLAB engine for Python. Please note that this instance takes up about 500MB of memory so you may want to limit the number of jobs accordingly.
220 changes: 220 additions & 0 deletions prima/pyprima/profiles_vs_matlab/bobyqa.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,220 @@
AIRCRFTB
AKIVA
ALLINIT
ALLINITU
BARD
BEALE
BENNETT5LS
BIGGS3
BIGGS5
BIGGS6
BOX2
BOX3
BOXBODLS
BRANIN
BRKMCC
BROWNBS
BROWNDEN
CAMEL6
CERI651ALS
CERI651BLS
CERI651CLS
CERI651DLS
CERI651ELS
CHWIRUT1LS
CHWIRUT2LS
CLIFF
CLUSTERLS
COOLHANSLS
CUBE
DANIWOODLS
DANWOODLS
DENSCHNA
DENSCHNB
DENSCHNC
DENSCHND
DENSCHNE
DENSCHNF
DEVGLA1
DEVGLA1B
DEVGLA2
DEVGLA2B
DGOSPEC
DJTL
ECKERLE4LS
EG1
EGGCRATE
EGGCRATEB
ELATVIDU
ELATVIDUB
ENGVAL2
ENSOLS
EXP2
EXP2B
EXPFIT
FBRAIN2LS
FBRAIN3LS
FBRAINLS
GAUSS1LS
GAUSS2LS
GAUSS3LS
GAUSSIAN
GBRAINLS
GROWTHLS
GULF
HAHN1LS
HAIRY
HART6
HATFLDA
HATFLDB
HATFLDD
HATFLDE
HATFLDFL
HATFLDFLS
HEART6LS
HEART8LS
HELIX
HIELOW
HILBERTA
HILBERTB
HIMMELBB
HIMMELBCLS
HIMMELBF
HIMMELBG
HIMMELBH
HIMMELP1
HS1
HS110
HS2
HS25
HS3
HS38
HS3MOD
HS4
HS45
HS5
HUMPS
JENSMP
JUDGE
JUDGEB
KIRBY2LS
KOEBHELB
KOWOSB
LANCZOS1LS
LANCZOS2LS
LANCZOS3LS
LEVYMONT10
LEVYMONT5
LEVYMONT6
LEVYMONT7
LEVYMONT8
LEVYMONT9
LOGHAIRY
LOGROS
LSC1LS
LSC2LS
MARATOSB
MAXLIKA
MDHOLE
MEXHAT
MEYER3
MGH09LS
MGH10LS
MGH10SLS
MGH17LS
MGH17SLS
MISRA1ALS
MISRA1BLS
MISRA1CLS
MISRA1DLS
NELSONLS
OSBORNEA
OSBORNEB
OSLBQP
PALMER1
PALMER1A
PALMER1B
PALMER1C
PALMER1D
PALMER1E
PALMER2
PALMER2A
PALMER2B
PALMER2C
PALMER2E
PALMER3
PALMER3A
PALMER3B
PALMER3C
PALMER3E
PALMER4
PALMER4A
PALMER4B
PALMER4C
PALMER4E
PALMER5A
PALMER5B
PALMER5C
PALMER5D
PALMER5E
PALMER6A
PALMER6C
PALMER6E
PALMER7A
PALMER7C
PALMER7E
PALMER8A
PALMER8C
PALMER8E
PARKCH
PFIT1LS
PFIT2LS
PFIT3LS
PFIT4LS
POWELLBSLS
POWELLSQLS
POWERSUM
POWERSUMB
PRICE3
PRICE3B
PRICE4
PRICE4B
PSPDOC
QINGB
RAT42LS
RAT43LS
RECIPELS
ROSENBR
ROSENBRTU
ROSZMAN1LS
S308
S368
SIM2BQP
SIMBQP
SINEVAL
SISSER
SNAIL
SPECAN
SSI
STRATEC
STREG
STRTCHDV
STRTCHDVB
THURBERLS
TRIGON1
TRIGON1B
TRIGON2
TRIGON2B
VESUVIALS
VESUVIOLS
VESUVIOULS
VIBRBEAM
WATSON
WAYSEA1
WAYSEA1B
WAYSEA2
WAYSEA2B
WEEDS
YFIT
YFITU
ZANGWIL2
Loading