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
290 stars 35 forks source link

cobyla fails CMake test with flang family compilers #165

Open zaikunzhang opened 4 months ago

zaikunzhang commented 4 months ago

See Ubuntu 22.04: https://github.com/libprima/prima/actions/runs/8307540642 Raspberry Pi: https://github.com/equipez/prima/actions/runs/7974981157

The tests with nvfortran, flang, AOCC flang (Ubuntu) and armflang (Raspberry Pi) all fail.

  1. nvfortran: cobyla_data_c and cobyla_data_c_with_gdb encounter "Invalid data".

  2. flang: example_cobyla_c, cobyla_data_c, example_cobyla_c_with_gdb, cobyla_data_c_with_gdb encounter segfaults at line 191 of cobyla_c.f90:

! Call the C objective function
call objcon_ptr(x_sub_loc, f_sub_loc, constr_sub_loc, data_ptr)
  1. AOCC flang and armflang encounters precisely the same errors as flang.

N.B. For flang , AOCC flang, and armflang, example_cobyla_c_with_gdb and cobyla_data_c_with_gdb claim "Passed" despite the segfaults, which seems to be a bug of the test system.

zaikunzhang commented 3 months ago

Update 20240316: This is not unique to Raspberry Pi. It happens on Ubuntu 22.04 with AMD64 chip as well.