Skip to content
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

Add callbacks #113

Merged
merged 13 commits into from
Dec 20, 2023
Merged

Add callbacks #113

merged 13 commits into from
Dec 20, 2023

Commits on Dec 20, 2023

  1. Configuration menu
    Copy the full SHA
    b11ac43 View commit details
    Browse the repository at this point in the history
  2. Add gdb to tests run via CI in order to obtain more information upon …

    …segfault
    
    Also disabled parallelism in cmake.yml so that the build log is more readable.
    The extra time it takes is not a concern.
    nbelakovski committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    55985e1 View commit details
    Browse the repository at this point in the history
  3. Turned cstrv, nlconstr, and terminate into optional arguments

    THe flang-derived compiler were beginning to have problem with the
    empty array used for nlconstr for the non-COBYLA algorithms. By making
    them optional arguments, we are able to handle them in a different way
    which satisfies all the compilers.
    nbelakovski committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    d7bc0f4 View commit details
    Browse the repository at this point in the history
  4. Apparently the intel compiler struggles...

    It struggles with capturing a procedure pointer inside a closure,
    although it appears capable of capturing a C function pointer. As a
    result we move the C_F_PROCPOINTER call back inside the closure.
    nbelakovski committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    b2efd7b View commit details
    Browse the repository at this point in the history
  5. And now the other intel compiler...

    Now that we've moved the procedure pointer into the closure so that the new
    intel compiler, ifx, works, the old intel compiler, ifort, has started to
    have issues with that data_ptr that gets passed around.
    
    The issue was observed while running data_c_exe. It passes a data pointer
    and in the callback it checks to make sure that it gets back the same data
    pointer. It started complaining.
    
    Removing the value attribute seems to have fixed it, and this seems to work
    for other compilers as well.
    nbelakovski committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    b6930e5 View commit details
    Browse the repository at this point in the history
  6. Reverting the change to the value attribute of type(C_PTR) and other …

    …cosmetic fixes
    
    After reviewing the Fortran 2008, 2018, and 2023 standards, it looks like value is meant to
    be an attribute for type(C_PTR) in the way that we are using it, so it is probably best
    to leave it in and accept the fact that the classic Intel fortran compiler does not work in
    this case. It's worth noting that the only case where there is an issue is when sending custom
    data to the objective function, which is not a common use case, and hopefully those who need
    that functionality are able to use a compiler other than the classic Intel one.
    
    Minimal example: https://fortran-lang.discourse.group/t/problem-with-ifort-compiler-and-type-c-ptr/7011
    
    Other various minor changes are made based on feedback from an in-person review session
    with @zaikunzhang
    nbelakovski committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    aa5e577 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    86b1fe9 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    74fb158 View commit details
    Browse the repository at this point in the history
  9. update comment

    nbelakovski committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    65cbf5c View commit details
    Browse the repository at this point in the history
  10. removed duplicate shell

    nbelakovski committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    3eaf095 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    9ecef2f View commit details
    Browse the repository at this point in the history
  12. -changed "progress" to "best point so far" to make it clear what x, f…

    …, etc. represent
    
    -fixed bug in how cobyla reported nonlinear constraints
    -removed 'early' from the termination string
    -fixed comments in cobyla code related to the size of constraint arrays
    nbelakovski committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    77c6b78 View commit details
    Browse the repository at this point in the history
  13. keep problem definition together, add comments, add bounds to bobyqa …

    …example and make the cobyla bounds active
    nbelakovski committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    f191d6d View commit details
    Browse the repository at this point in the history