The Constrained and Unconstrained Testing Environment with safe threads (CUTEst) for optimization software
See the wiki for download and installation instructions
The Constrained and Unconstrained Testing Environment with safe threads (CUTEst) for optimization software
License: Other
The Constrained and Unconstrained Testing Environment with safe threads (CUTEst) for optimization software
See the wiki for download and installation instructions
../src/gen77/gen77.F:5:1:
5 | C ( Last modified on 23 Dec 2000 at 22:01:38 )
| 1
Error: Unclassifiable statement at (1)
../src/gen77/gen77.F:77:59:
77 | IF( BL( I ) .GT. -INFTY .OR. BU( I ) .LT. INFTY )
| 1
Error: Syntax error in IF-clause after (1)
../src/gen77/gen77.F:78:7:
78 | * NBNDS = NBNDS + 1
| 1
Error: Invalid character in name at (1)
We have three folders gen77
, gen90
and genc
.
What should we compile with the Meson build system.
As suggested by Nick in #63, we should add some unit tests in C.
It would be a good sanity check for the interfaces in high-level languages like MATLAB, Python and Julia.
It needs to match the functionality of utest.F90
and ctest.f90
in src/test
.
Both macos CI tests are failing. The one for gnu seems not to find gfortran,
while the one for intel goes through an infinite loop when deciding which compiler
to use.
Line 434 of runcutest tries to compile the problem files with an f90
extension. Is that intentional? That causes an error for me on macOS. I wonder how anyone has been able to use runcutest
?! Those files have extension f
. This fixes it for me:
434c434
< command="${FORTRAN} ${PROBFLAGS} ${i}.f90"
---
> command="${FORTRAN} ${PROBFLAGS} ${i}.f"
Issue Overview: I followed the directions in $CUTEST/src/ipopt/README.ipopt for getting Ipopt running with CUTEst but Ipopt with CUTEst results in a segmentation fault.
I recently installed Ipopt version 3.13.3 and have been unable to solve problems with Ipopt using CUTEst. In particular, I am experiencing a segmentation fault from an invalid memory reference. I did a quick edit of runcutest to run with Valgrind and have included the output below. The following three outputs are included below:
(1) Indication that Ipopt was able to pass the tests upon installation
(2) Console output on attempt to solve BIGGSC4 with Ipopt
(3) Console output on attempt to solve BIGGSC4 with Ipopt with Valgrind in runcutest
Running unitTests...
Testing AMPL Solver Executable...
no AMPL solver executable found, skipping test...
Testing C++ Example...
Test passed!
Testing C Example...
Test passed!
Testing Fortran Example...
Test passed!
Skip testing Java Example (Java interface not build)
Testing sIpopt Example parametric_cpp...
Test passed!
Testing sIpopt Example redhess_cpp...
Test passed!
make[1]: Leaving directory '/home/james/Programs/Ipopt/Ipopt/master/test'
##################################################
##################################################
Install completed. If executing any of the installed
binaries results in an error that shared libraries cannot
be found, you may need to
:~$ runcutest -p ipopt -D BIGGSC4
sifdecoder -A pc.lnx.gfo -st BIGGSC4
Problem name: BIGGSC4
Double precision version will be formed
The objective function uses 1 nonlinear group
There are 7 linear inequality constraints
There are 4 variables bounded from below and above
File successfully decoded
CUTEST: tools (double precision version) compiled successfully
CUTEst: ipopt (double precision version) compiled successfully
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
#0 0x7fed07f1b2ed in ???
#1 0x7fed07f1a503 in ???
#2 0x7fed07b4df1f in ???
#3 0x7fed0a5f71e8 in ???
#4 0x55eac0e9dd22 in ???
#5 0x55eac0e9e5f2 in ???
#6 0x7fed07b30b96 in ???
#7 0x55eac0e9d269 in ???
#8 0xffffffffffffffff in ???
/home/james/Programs/CUTEST-Program/cutest/bin/runcutest: line 238: 32615 Segmentation fault (core dumped) ${EXEC}/run_${PACKAGE}
:~$ runcutest -p ipopt -D BIGGSC4
sifdecoder -A pc.lnx.gfo -st BIGGSC4
Problem name: BIGGSC4
Double precision version will be formed
The objective function uses 1 nonlinear group
There are 7 linear inequality constraints
There are 4 variables bounded from below and above
File successfully decoded
CUTEST: tools (double precision version) compiled successfully
CUTEst: ipopt (double precision version) compiled successfully
==32182== Memcheck, a memory error detector
==32182== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==32182== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==32182== Command: /home/james/run_ipopt
==32182==
==32182== Use of uninitialised value of size 8
==32182== at 0x126341E8: ipsolve_ (in /home/james/Programs/Ipopt/lib/libipopt.so.3.13.3)
==32182== by 0x109D22: MAIN__ (in /home/james/run_ipopt)
==32182== by 0x10A5F2: main (in /home/james/run_ipopt)
==32182== Uninitialised value was created by a stack allocation
==32182== at 0x10947F: MAIN__ (in /home/james/run_ipopt)
==32182==
This program contains Ipopt, a library for large-scale nonlinear optimization.
Ipopt is released as open source code under the Eclipse Public License (EPL).
For more information visit http://projects.coin-or.org/Ipopt
This is Ipopt version 3.13.3, running with linear solver mumps.
NOTE: Other linear solvers might be more efficient (see Ipopt documentation).
Number of nonzeros in equality constraint Jacobian...: 0
Number of nonzeros in inequality constraint Jacobian.: 16
Number of nonzeros in Lagrangian Hessian.............: 6
==32182== Syscall param sched_setaffinity(mask) points to unaddressable byte(s)
==32182== at 0x15197839: syscall (syscall.S:38)
==32182== by 0x122FB0A8: __kmp_affinity_determine_capable (z_Linux_util.cpp:186)
==32182== by 0x122A5571: __kmp_env_initialize(char const*) (kmp_settings.cpp:5783)
==32182== by 0x1228C717: __kmp_do_serial_initialize (kmp_runtime.cpp:7003)
==32182== by 0x1228C717: kmp_do_middle_initialize (kmp_runtime.cpp:7146)
==32182== by 0x1228C717: kmp_middle_initialize (kmp_runtime.cpp:7255)
==32182== by 0x1226CD2D: omp_get_num_procs@@Version (kmp_ftn_entry.h:612)
==32182== by 0xBB5E8BD: mkl_serv_get_num_stripes (in /home/james/intel/compilers_and_libraries_2019.5.281/linux/mkl/lib/intel64_lin/libmkl_intel_thread.so)
==32182== by 0xBC244F1: mkl_blas_dgemm (in /home/james/intel/compilers_and_libraries_2019.5.281/linux/mkl/lib/intel64_lin/libmkl_intel_thread.so)
==32182== by 0xAF4DBA6: DGEMM (in /home/james/intel/compilers_and_libraries_2019.5.281/linux/mkl/lib/intel64_lin/libmkl_intel_lp64.so)
==32182== by 0x15B8BD66: dmumps_237 (in /home/james/Programs/Ipopt/lib/libcoinmumps.so.2.1.0)
==32182== by 0x15B8EBC5: dmumps_140 (in /home/james/Programs/Ipopt/lib/libcoinmumps.so.2.1.0)
==32182== by 0x15B79AC5: dmumps_251 (in /home/james/Programs/Ipopt/lib/libcoinmumps.so.2.1.0)
==32182== by 0x15B3DB47: dmumps_244 (in /home/james/Programs/Ipopt/lib/libcoinmumps.so.2.1.0)
==32182== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==32182==
Total number of variables............................: 4
variables with only lower bounds: 0
variables with lower and upper bounds: 4
variables with only upper bounds: 0
Total number of equality constraints.................: 0
Total number of inequality constraints...............: 7
inequality constraints with only lower bounds: 1
inequality constraints with lower and upper bounds: 6
inequality constraints with only upper bounds: 0
iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls
0 -1.9999960e-04 4.96e+00 3.67e-01 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0
1 -1.4654948e-03 4.89e+00 1.20e+00 -1.0 1.42e+00 - 7.45e-03 1.58e-02h 1
2 -3.1187792e+00 0.00e+00 7.82e+01 -1.0 1.66e+00 - 2.97e-02 1.00e+00f 1
3 -3.2911450e+00 0.00e+00 2.11e+00 -1.0 2.31e-01 - 6.48e-01 1.00e+00f 1
4 -7.4033627e+00 0.00e+00 8.95e-01 -1.0 2.23e+00 - 2.02e-01 1.00e+00f 1
5 -9.3688176e+00 0.00e+00 7.61e-01 -1.0 7.61e-01 0.0 1.00e+00 1.00e+00f 1
6 -1.2634455e+01 0.00e+00 9.40e-01 -1.7 5.23e+00 -0.5 3.90e-01 2.36e-01f 1
7 -1.5042427e+01 0.00e+00 8.31e-01 -1.7 1.20e+01 -1.0 2.78e-01 5.61e-02f 1
8 -1.5089210e+01 0.00e+00 1.33e+00 -1.7 5.67e-02 - 4.60e-01 1.00e+00f 1
9 -1.7926460e+01 0.00e+00 5.64e-01 -1.7 1.91e+00 -0.5 6.65e-01 1.00e+00f 1
iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls
10 -1.9765668e+01 0.00e+00 6.81e-01 -1.7 8.43e-01 -0.1 7.90e-01 1.00e+00f 1
11 -2.1870779e+01 0.00e+00 1.22e+00 -1.7 4.93e+00 -0.6 9.76e-01 1.65e-01f 1
12 -2.4457195e+01 0.00e+00 1.69e+00 -1.7 1.02e+01 -1.1 2.55e-01 8.82e-02f 1
13 -2.4431280e+01 0.00e+00 2.03e+00 -1.7 1.82e+00 -0.6 8.59e-01 3.39e-02f 4
14 -2.4440263e+01 0.00e+00 1.15e+00 -1.7 7.14e-02 - 9.94e-01 5.00e-01f 2
15 -2.4432566e+01 0.00e+00 2.00e-07 -1.7 3.13e-02 - 1.00e+00 1.00e+00f 1
16 -2.4496204e+01 0.00e+00 5.06e-03 -3.8 4.80e-02 - 9.25e-01 9.72e-01f 1
17 -2.4498824e+01 0.00e+00 1.50e-09 -3.8 3.56e-02 - 1.00e+00 1.00e+00f 1
18 -2.4499812e+01 0.00e+00 5.53e-04 -5.7 1.90e-02 - 9.71e-01 1.00e+00f 1
19 -2.4499947e+01 0.00e+00 1.84e-11 -5.7 9.42e-03 - 1.00e+00 1.00e+00f 1
iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls
20 -2.4499982e+01 0.00e+00 1.84e-11 -5.7 4.79e-03 - 1.00e+00 1.00e+00f 1
21 -2.4499991e+01 0.00e+00 1.84e-11 -5.7 2.31e-03 - 1.00e+00 1.00e+00f 1
22 -2.4499999e+01 0.00e+00 1.77e-06 -8.6 1.34e-03 - 9.99e-01 1.00e+00f 1
23 -2.4500000e+01 0.00e+00 2.51e-14 -8.6 6.68e-04 - 1.00e+00 1.00e+00f 1
24 -2.4500000e+01 0.00e+00 2.51e-14 -8.6 3.33e-04 - 1.00e+00 1.00e+00f 1
25 -2.4500000e+01 0.00e+00 2.51e-14 -8.6 1.65e-04 - 1.00e+00 1.00e+00h 1
26 -2.4500000e+01 0.00e+00 2.51e-14 -8.6 7.89e-05 - 1.00e+00 1.00e+00h 1
Number of Iterations....: 26
(scaled) (unscaled)
Objective...............: -2.4500000338117488e+01 -2.4500000338117488e+01
Dual infeasibility......: 2.5059035596809423e-14 2.5059035596809423e-14
Constraint violation....: 0.0000000000000000e+00 0.0000000000000000e+00
Complementarity.........: 8.7300075264282586e-09 8.7300075264282586e-09
Overall NLP error.......: 8.7300075264282586e-09 8.7300075264282586e-09
Number of objective function evaluations = 32
Number of objective gradient evaluations = 27
Number of equality constraint evaluations = 0
Number of inequality constraint evaluations = 32
Number of equality constraint Jacobian evaluations = 0
Number of inequality constraint Jacobian evaluations = 27
Number of Lagrangian Hessian evaluations = 26
Total CPU secs in IPOPT (w/o function evaluations) = 2.623
Total CPU secs in NLP function evaluations = 0.023
EXIT: Optimal Solution Found.
==32182== Use of uninitialised value of size 8
==32182== at 0x126341BC: ipfree_ (in /home/james/Programs/Ipopt/lib/libipopt.so.3.13.3)
==32182== by 0x109D35: MAIN__ (in /home/james/run_ipopt)
==32182== by 0x10A5F2: main (in /home/james/run_ipopt)
==32182== Uninitialised value was created by a stack allocation
==32182== at 0x10947F: MAIN__ (in /home/james/run_ipopt)
==32182==
==32182== Conditional jump or move depends on uninitialised value(s)
==32182== at 0x4C30CF1: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==32182== by 0x126341CC: ipfree_ (in /home/james/Programs/Ipopt/lib/libipopt.so.3.13.3)
==32182== by 0x109D35: MAIN__ (in /home/james/run_ipopt)
==32182== by 0x10A5F2: main (in /home/james/run_ipopt)
==32182== Uninitialised value was created by a stack allocation
==32182== at 0x10947F: MAIN__ (in /home/james/run_ipopt)
==32182==
************************ CUTEst statistics ************************
Package used : IPOPT
Problem : BIGGSC4
# variables = 4
# constraints = 7
# objective functions = 0.6000000E+02
# objective gradients = 0.2800000E+02
# objective Hessians = 0.2700000E+02
# Hessian-vector prdct = 0.0000000E+00
# constraints functions = 0.6100000E+02
# constraints gradients = 0.2900000E+02
# constraints Hessians = 0.2700000E+02
Exit code = 0
Final f = -0.2450000E+02
Set up time = 0.08 seconds
Solve time = 3.56 seconds
==32182==
==32182== HEAP SUMMARY:
==32182== in use at exit: 2,639 bytes in 21 blocks
==32182== total heap usage: 35,865 allocs, 35,844 frees, 302,556,517 bytes allocated
==32182==
==32182== 28 bytes in 1 blocks are definitely lost in loss record 2 of 21
==32182== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==32182== by 0x1098E7: MAIN__ (in /home/james/run_ipopt)
==32182== by 0x10A5F2: main (in /home/james/run_ipopt)
==32182==
==32182== 70 bytes in 1 blocks are definitely lost in loss record 14 of 21
==32182== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==32182== by 0x1099C3: MAIN__ (in /home/james/run_ipopt)
==32182== by 0x10A5F2: main (in /home/james/run_ipopt)
==32182==
==32182== LEAK SUMMARY:
==32182== definitely lost: 98 bytes in 2 blocks
==32182== indirectly lost: 0 bytes in 0 blocks
==32182== possibly lost: 0 bytes in 0 blocks
==32182== still reachable: 2,541 bytes in 19 blocks
==32182== suppressed: 0 bytes in 0 blocks
==32182== Reachable blocks (those to which a pointer was found) are not shown.
==32182== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==32182==
==32182== For counts of detected and suppressed errors, rerun with: -v
==32182== ERROR SUMMARY: 6 errors from 6 contexts (suppressed: 0 from 0)
Where can I download the LP test files? The existing links at https://www.numerical.rl.ac.uk/cute/netlib.html are now dead.
Shouldn't this line
https://github.com/ralna/CUTEst/blame/67f11688545d75aaf7820bac65431c871a098583/include/cutest.h#L60
be moved into the if
a few lines below? The compiler chokes on it. I'm using Linux in a Docker container, so it's possible that it doesn't support quad precision. macOS doesn't complain but it still feels like that line is out of place.
It's relevant if we want to use the same problem decoded in different precisions (single, double, quadruple) within the same code.
For example, there will be a conflict when calling fortran_open_
to provide the *.d file because the three libraries libcutest_single
, libcutest_double
, and libcutest_quadruple
contain the same symbol.
We can do the same thing in quadruple precision with fortran_open_q_
and fortran_close_q_
.
Off-topic: the mangling of symbols for quadruple precision is different from single/double precision. The first part (cutest
) uses uppercase letters, which complicates writing multiprecision code.
An underscore is also missing at the end of the symbols, it should be *_q_
.
All symbols are probably wrong in quadruple precision due to that.
It can be easily fix by adding a macro like it's done for symbols in single and double precision.
Is it possible to determine the number of nnzj
related to linear constraints and non-linear constraints in the Jacobian?
The function cdimsj
only provides the sum of lin_nnzj
and nln_nnzj
.
[1/2] Compiling Fortran object libcutest.so.p/src_tools_readin.f90.o
FAILED: libcutest.so.p/src_tools_readin.f90.o libcutest.so.p/read_input.mod
gfortran -Ilibcutest.so.p -I. -I.. -I../include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -O3 -fPIC -Jlibcutest.so.p -o libcutest.so.p/src_tools_readin.f90.o -c ../src/tools/readin.f90
../src/tools/readin.f90:25:25:
25 | REAL ( KIND = wp ), PARAMETER, PRIVATE :: zero = 0.0_wp
| 1
Error: Symbol ‘wp’ at (1) has no IMPLICIT type
../src/tools/readin.f90:33:25:
33 | REAL ( KIND = wp ), INTENT( IN ) :: rdefault
| 1
Error: Symbol ‘wp’ at (1) has no IMPLICIT type
../src/tools/readin.f90:34:25:
34 | REAL ( KIND = wp ), INTENT( INOUT ) :: r
| 1
Error: Symbol ‘wp’ at (1) has no IMPLICIT type
../src/tools/readin.f90:35:25:
35 | REAL ( KIND = wp ) :: rtemp
| 1
Error: Symbol ‘wp’ at (1) has no IMPLICIT type
../src/tools/readin.f90:74:25:
74 | REAL ( KIND = wp ), INTENT( INOUT ) :: r
| 1
Error: Symbol ‘wp’ at (1) has no IMPLICIT type
../src/tools/readin.f90:75:25:
75 | REAL ( KIND = wp ) :: rtemp
| 1
Error: Symbol ‘wp’ at (1) has no IMPLICIT type
../src/tools/readin.f90:72:35:
72 | SUBROUTINE OVERIDE_real( r, unit )
| 1
Error: Symbol ‘r’ at (1) has no IMPLICIT type
../src/tools/readin.f90:31:32:
31 | SUBROUTINE READ_real( r, rdefault, unit )
| 1
Error: Symbol ‘r’ at (1) has no IMPLICIT type
../src/tools/readin.f90:31:42:
31 | SUBROUTINE READ_real( r, rdefault, unit )
| 1
Error: Symbol ‘rdefault’ at (1) has no IMPLICIT type
../src/tools/readin.f90:76:41:
76 | READ( unit, "( ES10.3 )" ) rtemp
| 1
Error: Symbol ‘rtemp’ at (1) has no IMPLICIT type
../src/tools/readin.f90:77:27:
77 | IF ( rtemp >= zero ) r = rtemp
| 1
Error: Symbol ‘zero’ at (1) has no IMPLICIT type
../src/tools/readin.f90:36:33:
36 | READ( unit, 1000 ) rtemp
| 1
Error: Symbol ‘rtemp’ at (1) has no IMPLICIT type
../src/tools/readin.f90:37:27:
37 | IF ( rtemp >= zero ) THEN
| 1
Error: Symbol ‘zero’ at (1) has no IMPLICIT type
ninja: build stopped: subcommand failed.
I wanted to use cifn
and cigr
in the Julia interface CUTEst.jl
but I have segmentation faults when I call cigr
.
All my CI builds on Linux and Windows failed.
I compiled CUTEst in debug mode to reproduce the error and I have the following stack-trace:
[25278] signal (11.1): Erreur de segmentation
in expression starting at /home/alexis/Bureau/git/CUTEst.jl/test/multiple_precision.jl:19
group_s at /home/alexis/Bureau/git/CUTEst.jl/deps/files/GROUP_s.f:19 # <- group_s_ at /home/alexis/Bureau/git/CUTEst.jl/src/../deps/files/libALLINITA_single.so (unknown line)
cutest_cigr_threadsafe_s at /home/alexis/Applications/CUTEst/builddir/../src/tools/cigr.F90:426
cutest_cigr_s at /home/alexis/Applications/CUTEst/builddir/../src/tools/cigr.F90:37
cutest_cigr_s_ at /home/alexis/Bureau/git/CUTEst.jl/src/libcutest.jl:925
cigr at /home/alexis/Bureau/git/CUTEst.jl/src/core_interface.jl:3055
The issue seems to be in cigr.F90
at line 426
.
@jfowkes
Do you observed the same issue with the Python interface?
I remarked that with the problem "HS36"
:
julia> nlp = CUTEstModel("HS36")
using NLPMod Problem name: HS36
All variables: ████████████████████ 3 All constraints: ████████████████████ 1
free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0
lower: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 lower: ████████████████████ 1
upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0
low/upp: ████████████████████ 3 low/upp: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0
fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0
infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0
nnzh: ( 0.00% sparsity) 6 linear: ████████████████████ 1
nonlinear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0
nnzj: ( 0.00% sparsity) 3
julia> x = rand(3)
3-element Vector{Float64}:
0.8135048036946028
0.7009923280412236
0.45617745313120484
# uofg
julia> obj(nlp, x)
-0.26014004008758135
# ufn
julia> CUTEst.obj2(nlp, x)
68.61201559387297
# uofg
julia> grad!(nlp, x, zeros(3))
3-element Vector{Float64}:
-0.31977689487035943
-0.37110254945940463
-0.5702606262145982
# ugr
julia> CUTEst.grad2!(nlp, x, zeros(3))
3-element Vector{Float64}:
-1.3197768948703594
-2.3711025494594047
-2.570260626214598
Right now, we don't have a routine dedicated solely to evaluating the constraints function, but we do have some alternatives:
cutest_cfn
(objective + constraints)cutest_cifn
(individual constraint)cutest_ccfsg
(constraints + Jacobian)cutest_ccfsg
seems to be the best option because we can set grad = false
and lj = 0
.
A new routine ccf
with the minimum number of arguments could be a nice new feature, but it requires some work...
Let's see if someone else needs it in the future and revisit the priority.
cf: #63 (comment)
Dear Prof. Gould,
I was trying to install CUTEst in order to test some unconstrained minimization algorithms in MATLAB on the cutest problems.
I am working on a linux (lubuntu 18.10) 64-bit virtual machine with Matlab R2018b and the gcc-6, gfortran-6, g++-6 compilers set as default.
I have issues in installing cutest and its interface with MATLAB.
By following the instructions i move to $CUTEST and enter "$ARCHDEFS/install_optrove". The script wants to run "./bin/install_optrove", but since the current directory is "./cutest" it cannot find the file.
I then decided to run directly "$ARCHDEFS/bin/install_optrove" and apparently both sifdecode and cutest were compiled in the right way. Since I was using gcc-6.5 and not gcc-6.3 I got the following message
Compiling mcutest Building with 'gcc'.
Warning: You are using gcc version '6.5.0'. The version of gcc is not supported. The version currently supported with MEX is '6.3.x'. For a list of currently supported compilers see: https://www.mathworks.com/support/compilers/current_release.
MEX completed successfully.
[ OK ]
CUTEst: matlab (double precision version) compiled successfully
I guess that, despite the different compiler version, everything went in the right way.
(gcc-6.3 is not available through standard repositories... in order to get it I should compile it from the source. I tried, but my attempt to do so was not successfull.)
What happens is that if I try to run "cutest2matlab" in order to decode a problem and use it on MATLAB, I get the following output:
pc64.lnx.gfo
[...]
File successfully decodedERROR: Cannot find a matlab definitions file in
/home/mviola/Documents/CutestExecutables/cutest/packages/pc64.lnx.gfo/double
or
/home/mviola/Documents/CutestExecutables/cutest/packages/defaults
Is there a way I can fix this issue?
Best regards,
Marco
@nimgould
I have the following missing symbols when I generate the shared library libcutest.${dlext}
.
Do I need to include some additional .o
files?
I can't compile it on MacOS and Windows.
In SifDecode, you provide additional .o
files when you decode a problem (RANGE.o, ELFUN.o, GROUP.o, EXTER.o).
Can we add them by default in the library or they are related to each SIF problem?
/usr/bin/ld: libcutest.a(ufn.o): in function `cutest_ufn_threadsafe_':
ufn.f90:(.text+0x114): undefined reference to `elfun_'
/usr/bin/ld: ufn.f90:(.text+0x411): undefined reference to `group_'
/usr/bin/ld: libcutest.a(ugr.o): in function `cutest_ugr_threadsafe_':
ugr.f90:(.text+0x1b8): undefined reference to `elfun_'
/usr/bin/ld: ugr.f90:(.text+0x2b7): undefined reference to `elfun_'
/usr/bin/ld: ugr.f90:(.text+0x4bf): undefined reference to `group_'
/usr/bin/ld: ugr.f90:(.text+0x4fa): undefined reference to `range_'
/usr/bin/ld: libcutest.a(uofg.o): in function `cutest_uofg_threadsafe_':
uofg.f90:(.text+0x1cb): undefined reference to `elfun_'
/usr/bin/ld: uofg.f90:(.text+0x512): undefined reference to `group_'
/usr/bin/ld: uofg.f90:(.text+0x698): undefined reference to `elfun_'
/usr/bin/ld: uofg.f90:(.text+0x71a): undefined reference to `group_'
/usr/bin/ld: uofg.f90:(.text+0x755): undefined reference to `range_'
/usr/bin/ld: libcutest.a(udh.o): in function `cutest_udh_threadsafe_':
udh.f90:(.text+0x27b): undefined reference to `elfun_'
/usr/bin/ld: udh.f90:(.text+0x349): undefined reference to `elfun_'
/usr/bin/ld: udh.f90:(.text+0x566): undefined reference to `group_'
/usr/bin/ld: udh.f90:(.text+0x62f): undefined reference to `range_'
/usr/bin/ld: udh.f90:(.text+0x85c): undefined reference to `range_'
/usr/bin/ld: libcutest.a(ugrdh.o): in function `cutest_ugrdh_threadsafe_':
ugrdh.f90:(.text+0x1d8): undefined reference to `elfun_'
/usr/bin/ld: ugrdh.f90:(.text+0x35f): undefined reference to `elfun_'
/usr/bin/ld: ugrdh.f90:(.text+0x57c): undefined reference to `group_'
/usr/bin/ld: ugrdh.f90:(.text+0x683): undefined reference to `range_'
/usr/bin/ld: ugrdh.f90:(.text+0x8b2): undefined reference to `range_'
/usr/bin/ld: libcutest.a(ush.o): in function `cutest_ush_threadsafe_':
ush.f90:(.text+0x1af): undefined reference to `elfun_'
/usr/bin/ld: ush.f90:(.text+0x2ae): undefined reference to `elfun_'
/usr/bin/ld: ush.f90:(.text+0x4c8): undefined reference to `group_'
/usr/bin/ld: ush.f90:(.text+0x58b): undefined reference to `range_'
/usr/bin/ld: ush.f90:(.text+0x7b5): undefined reference to `range_'
/usr/bin/ld: libcutest.a(ueh.o): in function `cutest_ueh_threadsafe_':
ueh.f90:(.text+0x1d5): undefined reference to `elfun_'
/usr/bin/ld: ueh.f90:(.text+0x2d4): undefined reference to `elfun_'
/usr/bin/ld: ueh.f90:(.text+0x4f1): undefined reference to `group_'
/usr/bin/ld: ueh.f90:(.text+0x5b7): undefined reference to `range_'
/usr/bin/ld: ueh.f90:(.text+0x78c): undefined reference to `range_'
/usr/bin/ld: libcutest.a(ugreh.o): in function `cutest_ugreh_threadsafe_':
ugreh.f90:(.text+0x1de): undefined reference to `elfun_'
/usr/bin/ld: ugreh.f90:(.text+0x2dd): undefined reference to `elfun_'
/usr/bin/ld: ugreh.f90:(.text+0x4fa): undefined reference to `group_'
/usr/bin/ld: ugreh.f90:(.text+0x5eb): undefined reference to `range_'
/usr/bin/ld: ugreh.f90:(.text+0x7d4): undefined reference to `range_'
/usr/bin/ld: libcutest.a(ugrsh.o): in function `cutest_ugrsh_threadsafe_':
ugrsh.f90:(.text+0x1b8): undefined reference to `elfun_'
/usr/bin/ld: ugrsh.f90:(.text+0x2b7): undefined reference to `elfun_'
/usr/bin/ld: ugrsh.f90:(.text+0x4d1): undefined reference to `group_'
/usr/bin/ld: ugrsh.f90:(.text+0x5bf): undefined reference to `range_'
/usr/bin/ld: ugrsh.f90:(.text+0x7e7): undefined reference to `range_'
/usr/bin/ld: libcutest.a(uhprod.o): in function `cutest_uhprod_threadsafe_':
uhprod.f90:(.text+0x1d8): undefined reference to `elfun_'
/usr/bin/ld: uhprod.f90:(.text+0x2c1): undefined reference to `elfun_'
/usr/bin/ld: uhprod.f90:(.text+0x4f0): undefined reference to `group_'
/usr/bin/ld: uhprod.f90:(.text+0x524): undefined reference to `range_'
/usr/bin/ld: uhprod.f90:(.text+0x678): undefined reference to `range_'
/usr/bin/ld: libcutest.a(ushprod.o): in function `cutest_ushprod_threadsafe_':
ushprod.f90:(.text+0x1c1): undefined reference to `elfun_'
/usr/bin/ld: ushprod.f90:(.text+0x2c0): undefined reference to `elfun_'
/usr/bin/ld: ushprod.f90:(.text+0x4dd): undefined reference to `group_'
/usr/bin/ld: ushprod.f90:(.text+0x511): undefined reference to `range_'
/usr/bin/ld: ushprod.f90:(.text+0x648): undefined reference to `range_'
/usr/bin/ld: libcutest.a(ubandh.o): in function `cutest_ubandh_threadsafe_':
ubandh.f90:(.text+0x2d4): undefined reference to `elfun_'
/usr/bin/ld: ubandh.f90:(.text+0x3b4): undefined reference to `elfun_'
/usr/bin/ld: ubandh.f90:(.text+0x5dd): undefined reference to `group_'
/usr/bin/ld: ubandh.f90:(.text+0x6d4): undefined reference to `range_'
/usr/bin/ld: ubandh.f90:(.text+0xa58): undefined reference to `range_'
/usr/bin/ld: libcutest.a(cfn.o): in function `cutest_cfn_threadsafe_':
cfn.f90:(.text+0x106): undefined reference to `elfun_'
/usr/bin/ld: cfn.f90:(.text+0x3e0): undefined reference to `group_'
/usr/bin/ld: libcutest.a(cgr.o): in function `cutest_cgr_threadsafe_':
cgr.f90:(.text+0x34c): undefined reference to `elfun_'
/usr/bin/ld: cgr.f90:(.text+0x431): undefined reference to `elfun_'
/usr/bin/ld: cgr.f90:(.text+0x6f2): undefined reference to `group_'
/usr/bin/ld: cgr.f90:(.text+0xaa6): undefined reference to `range_'
/usr/bin/ld: cgr.f90:(.text+0x1142): undefined reference to `range_'
/usr/bin/ld: libcutest.a(cofg.o): in function `cutest_cofg_threadsafe_':
cofg.f90:(.text+0x2e0): undefined reference to `elfun_'
/usr/bin/ld: cofg.f90:(.text+0x40f): undefined reference to `elfun_'
/usr/bin/ld: cofg.f90:(.text+0x957): undefined reference to `group_'
/usr/bin/ld: cofg.f90:(.text+0xbc8): undefined reference to `group_'
/usr/bin/ld: cofg.f90:(.text+0xc45): undefined reference to `range_'
/usr/bin/ld: libcutest.a(cofsg.o): in function `cutest_cofsg_threadsafe_':
cofsg.f90:(.text+0x340): undefined reference to `elfun_'
/usr/bin/ld: cofsg.f90:(.text+0x461): undefined reference to `elfun_'
/usr/bin/ld: cofsg.f90:(.text+0x99a): undefined reference to `group_'
/usr/bin/ld: cofsg.f90:(.text+0xbd5): undefined reference to `group_'
/usr/bin/ld: cofsg.f90:(.text+0xc52): undefined reference to `range_'
/usr/bin/ld: libcutest.a(ccfg.o): in function `cutest_ccfg_threadsafe_':
ccfg.f90:(.text+0x480): undefined reference to `elfun_'
/usr/bin/ld: ccfg.f90:(.text+0x580): undefined reference to `elfun_'
/usr/bin/ld: ccfg.f90:(.text+0x8f1): undefined reference to `group_'
/usr/bin/ld: ccfg.f90:(.text+0xb25): undefined reference to `group_'
/usr/bin/ld: ccfg.f90:(.text+0xc03): undefined reference to `range_'
/usr/bin/ld: libcutest.a(clfg.o): in function `cutest_clfg_threadsafe_':
clfg.f90:(.text+0x1ac): undefined reference to `elfun_'
/usr/bin/ld: clfg.f90:(.text+0x2dd): undefined reference to `elfun_'
/usr/bin/ld: clfg.f90:(.text+0x537): undefined reference to `group_'
/usr/bin/ld: clfg.f90:(.text+0x876): undefined reference to `range_'
/usr/bin/ld: clfg.f90:(.text+0xf81): undefined reference to `range_'
/usr/bin/ld: libcutest.a(ccfsg.o): in function `cutest_ccfsg_threadsafe_':
ccfsg.f90:(.text+0x31c): undefined reference to `elfun_'
/usr/bin/ld: ccfsg.f90:(.text+0x425): undefined reference to `elfun_'
/usr/bin/ld: ccfsg.f90:(.text+0x796): undefined reference to `group_'
/usr/bin/ld: ccfsg.f90:(.text+0x96b): undefined reference to `group_'
/usr/bin/ld: ccfsg.f90:(.text+0xa26): undefined reference to `range_'
/usr/bin/ld: libcutest.a(ccifg.o): in function `cutest_ccifg_threadsafe_':
ccifg.f90:(.text+0x35e): undefined reference to `elfun_'
/usr/bin/ld: ccifg.f90:(.text+0x635): undefined reference to `group_'
/usr/bin/ld: ccifg.f90:(.text+0x75b): undefined reference to `elfun_'
/usr/bin/ld: ccifg.f90:(.text+0x97b): undefined reference to `group_'
/usr/bin/ld: ccifg.f90:(.text+0xa01): undefined reference to `range_'
/usr/bin/ld: libcutest.a(ccifsg.o): in function `cutest_ccifsg_threadsafe_':
ccifsg.f90:(.text+0x375): undefined reference to `elfun_'
/usr/bin/ld: ccifsg.f90:(.text+0x64e): undefined reference to `group_'
/usr/bin/ld: ccifsg.f90:(.text+0x764): undefined reference to `elfun_'
/usr/bin/ld: ccifsg.f90:(.text+0x98f): undefined reference to `group_'
/usr/bin/ld: ccifsg.f90:(.text+0xa0c): undefined reference to `range_'
/usr/bin/ld: libcutest.a(cdh.o): in function `cutest_cdh_threadsafe_':
cdh.f90:(.text+0x277): undefined reference to `elfun_'
/usr/bin/ld: cdh.f90:(.text+0x33f): undefined reference to `elfun_'
/usr/bin/ld: cdh.f90:(.text+0x5a1): undefined reference to `group_'
/usr/bin/ld: cdh.f90:(.text+0x6de): undefined reference to `range_'
/usr/bin/ld: cdh.f90:(.text+0x907): undefined reference to `range_'
/usr/bin/ld: cdh.f90:(.text+0xbba): undefined reference to `range_'
/usr/bin/ld: cdh.f90:(.text+0xde4): undefined reference to `range_'
/usr/bin/ld: libcutest.a(cdhc.o): in function `cutest_cdhc_threadsafe_':
cdhc.f90:(.text+0x277): undefined reference to `elfun_'
/usr/bin/ld: cdhc.f90:(.text+0x33f): undefined reference to `elfun_'
/usr/bin/ld: cdhc.f90:(.text+0x5a1): undefined reference to `group_'
/usr/bin/ld: cdhc.f90:(.text+0x6cb): undefined reference to `range_'
/usr/bin/ld: cdhc.f90:(.text+0x8f4): undefined reference to `range_'
/usr/bin/ld: cdhc.f90:(.text+0xba7): undefined reference to `range_'
/usr/bin/ld: cdhc.f90:(.text+0xdd1): undefined reference to `range_'
/usr/bin/ld: libcutest.a(ceh.o): in function `cutest_ceh_threadsafe_':
ceh.f90:(.text+0x1be): undefined reference to `elfun_'
/usr/bin/ld: ceh.f90:(.text+0x2b5): undefined reference to `elfun_'
/usr/bin/ld: ceh.f90:(.text+0x514): undefined reference to `group_'
/usr/bin/ld: ceh.f90:(.text+0x64b): undefined reference to `range_'
/usr/bin/ld: ceh.f90:(.text+0x81b): undefined reference to `range_'
/usr/bin/ld: ceh.f90:(.text+0xa26): undefined reference to `range_'
/usr/bin/ld: ceh.f90:(.text+0xbfb): undefined reference to `range_'
/usr/bin/ld: libcutest.a(cgrdh.o): in function `cutest_cgrdh_threadsafe_':
cgrdh.f90:(.text+0x523): undefined reference to `elfun_'
/usr/bin/ld: cgrdh.f90:(.text+0x5f3): undefined reference to `elfun_'
/usr/bin/ld: cgrdh.f90:(.text+0x866): undefined reference to `group_'
/usr/bin/ld: cgrdh.f90:(.text+0xbf2): undefined reference to `range_'
/usr/bin/ld: cgrdh.f90:(.text+0xe7c): undefined reference to `range_'
/usr/bin/ld: cgrdh.f90:(.text+0x164e): undefined reference to `range_'
/usr/bin/ld: cgrdh.f90:(.text+0x1880): undefined reference to `range_'
/usr/bin/ld: libcutest.a(cifn.o): in function `cutest_cifn_threadsafe_':
cifn.f90:(.text+0x232): undefined reference to `elfun_'
/usr/bin/ld: cifn.f90:(.text+0x640): undefined reference to `group_'
/usr/bin/ld: cifn.f90:(.text+0xa08): undefined reference to `group_'
/usr/bin/ld: libcutest.a(cigr.o): in function `cutest_cigr_threadsafe_':
cigr.f90:(.text+0x2eb): undefined reference to `elfun_'
/usr/bin/ld: cigr.f90:(.text+0x59b): undefined reference to `elfun_'
/usr/bin/ld: cigr.f90:(.text+0x981): undefined reference to `group_'
/usr/bin/ld: cigr.f90:(.text+0xa00): undefined reference to `group_'
/usr/bin/ld: cigr.f90:(.text+0xa7d): undefined reference to `range_'
/usr/bin/ld: cigr.f90:(.text+0x10db): undefined reference to `group_'
/usr/bin/ld: cigr.f90:(.text+0x114d): undefined reference to `group_'
/usr/bin/ld: cigr.f90:(.text+0x11cb): undefined reference to `range_'
/usr/bin/ld: libcutest.a(cisgr.o): in function `cutest_cisgr_threadsafe_':
cisgr.f90:(.text+0x2eb): undefined reference to `elfun_'
/usr/bin/ld: cisgr.f90:(.text+0x59b): undefined reference to `elfun_'
/usr/bin/ld: cisgr.f90:(.text+0x9be): undefined reference to `group_'
/usr/bin/ld: cisgr.f90:(.text+0xa3d): undefined reference to `group_'
/usr/bin/ld: cisgr.f90:(.text+0xaba): undefined reference to `range_'
/usr/bin/ld: cisgr.f90:(.text+0x126c): undefined reference to `group_'
/usr/bin/ld: cisgr.f90:(.text+0x12de): undefined reference to `group_'
/usr/bin/ld: cisgr.f90:(.text+0x135c): undefined reference to `range_'
/usr/bin/ld: libcutest.a(cidh.o): in function `cutest_cidh_threadsafe_':
cidh.f90:(.text+0x5d3): undefined reference to `elfun_'
/usr/bin/ld: cidh.f90:(.text+0x6a6): undefined reference to `elfun_'
/usr/bin/ld: cidh.f90:(.text+0x9ae): undefined reference to `group_'
/usr/bin/ld: cidh.f90:(.text+0xad7): undefined reference to `range_'
/usr/bin/ld: cidh.f90:(.text+0xd02): undefined reference to `range_'
/usr/bin/ld: cidh.f90:(.text+0xf05): undefined reference to `range_'
/usr/bin/ld: cidh.f90:(.text+0x1131): undefined reference to `range_'
/usr/bin/ld: libcutest.a(csh.o): in function `cutest_csh_threadsafe_':
csh.f90:(.text+0x1a0): undefined reference to `elfun_'
/usr/bin/ld: csh.f90:(.text+0x29a): undefined reference to `elfun_'
/usr/bin/ld: csh.f90:(.text+0x4f9): undefined reference to `group_'
/usr/bin/ld: csh.f90:(.text+0x633): undefined reference to `range_'
/usr/bin/ld: csh.f90:(.text+0x859): undefined reference to `range_'
/usr/bin/ld: csh.f90:(.text+0xad9): undefined reference to `range_'
/usr/bin/ld: csh.f90:(.text+0xd00): undefined reference to `range_'
/usr/bin/ld: libcutest.a(cshc.o): in function `cutest_cshc_threadsafe_':
cshc.f90:(.text+0x1a0): undefined reference to `elfun_'
/usr/bin/ld: cshc.f90:(.text+0x29a): undefined reference to `elfun_'
/usr/bin/ld: cshc.f90:(.text+0x4f9): undefined reference to `group_'
/usr/bin/ld: cshc.f90:(.text+0x620): undefined reference to `range_'
/usr/bin/ld: cshc.f90:(.text+0x846): undefined reference to `range_'
/usr/bin/ld: cshc.f90:(.text+0xac6): undefined reference to `range_'
/usr/bin/ld: cshc.f90:(.text+0xced): undefined reference to `range_'
/usr/bin/ld: libcutest.a(cish.o): in function `cutest_cish_threadsafe_':
cish.f90:(.text+0x531): undefined reference to `elfun_'
/usr/bin/ld: cish.f90:(.text+0x603): undefined reference to `elfun_'
/usr/bin/ld: cish.f90:(.text+0x90b): undefined reference to `group_'
/usr/bin/ld: cish.f90:(.text+0xa2e): undefined reference to `range_'
/usr/bin/ld: cish.f90:(.text+0xc56): undefined reference to `range_'
/usr/bin/ld: cish.f90:(.text+0xeed): undefined reference to `range_'
/usr/bin/ld: cish.f90:(.text+0x1116): undefined reference to `range_'
/usr/bin/ld: libcutest.a(cjprod.o): in function `cutest_cjprod_threadsafe_':
cjprod.f90:(.text+0x235): undefined reference to `elfun_'
/usr/bin/ld: cjprod.f90:(.text+0x411): undefined reference to `elfun_'
/usr/bin/ld: cjprod.f90:(.text+0x668): undefined reference to `group_'
/usr/bin/ld: cjprod.f90:(.text+0x79a): undefined reference to `range_'
/usr/bin/ld: cjprod.f90:(.text+0xaac): undefined reference to `range_'
/usr/bin/ld: libcutest.a(csgr.o): in function `cutest_csgr_threadsafe_':
csgr.f90:(.text+0x1c2): undefined reference to `elfun_'
/usr/bin/ld: csgr.f90:(.text+0x2c0): undefined reference to `elfun_'
/usr/bin/ld: csgr.f90:(.text+0x580): undefined reference to `group_'
/usr/bin/ld: csgr.f90:(.text+0xa0f): undefined reference to `range_'
/usr/bin/ld: csgr.f90:(.text+0xf30): undefined reference to `range_'
/usr/bin/ld: libcutest.a(csgreh.o): in function `cutest_csgreh_threadsafe_':
csgreh.f90:(.text+0x1d8): undefined reference to `elfun_'
/usr/bin/ld: csgreh.f90:(.text+0x2cb): undefined reference to `elfun_'
/usr/bin/ld: csgreh.f90:(.text+0x537): undefined reference to `group_'
/usr/bin/ld: csgreh.f90:(.text+0x92c): undefined reference to `range_'
/usr/bin/ld: csgreh.f90:(.text+0xf06): undefined reference to `range_'
/usr/bin/ld: csgreh.f90:(.text+0x149e): undefined reference to `range_'
/usr/bin/ld: csgreh.f90:(.text+0x1668): undefined reference to `range_'
/usr/bin/ld: libcutest.a(csgrsh.o): in function `cutest_csgrsh_threadsafe_':
csgrsh.f90:(.text+0x1ba): undefined reference to `elfun_'
/usr/bin/ld: csgrsh.f90:(.text+0x2b0): undefined reference to `elfun_'
/usr/bin/ld: csgrsh.f90:(.text+0x524): undefined reference to `group_'
/usr/bin/ld: csgrsh.f90:(.text+0x91f): undefined reference to `range_'
/usr/bin/ld: csgrsh.f90:(.text+0xf00): undefined reference to `range_'
/usr/bin/ld: csgrsh.f90:(.text+0x1242): undefined reference to `range_'
/usr/bin/ld: csgrsh.f90:(.text+0x151e): undefined reference to `range_'
/usr/bin/ld: libcutest.a(csjprod.o): in function `cutest_csjprod_threadsafe_':
csjprod.f90:(.text+0x235): undefined reference to `elfun_'
/usr/bin/ld: csjprod.f90:(.text+0x3ff): undefined reference to `elfun_'
/usr/bin/ld: csjprod.f90:(.text+0x660): undefined reference to `range_'
/usr/bin/ld: csjprod.f90:(.text+0x7e6): undefined reference to `group_'
/usr/bin/ld: csjprod.f90:(.text+0x81f): undefined reference to `range_'
/usr/bin/ld: libcutest.a(chprod.o): in function `cutest_chprod_threadsafe_':
chprod.f90:(.text+0x1db): undefined reference to `elfun_'
/usr/bin/ld: chprod.f90:(.text+0x2c4): undefined reference to `elfun_'
/usr/bin/ld: chprod.f90:(.text+0x545): undefined reference to `group_'
/usr/bin/ld: chprod.f90:(.text+0x5fc): undefined reference to `range_'
/usr/bin/ld: chprod.f90:(.text+0x723): undefined reference to `range_'
/usr/bin/ld: chprod.f90:(.text+0x855): undefined reference to `range_'
/usr/bin/ld: chprod.f90:(.text+0x99c): undefined reference to `range_'
/usr/bin/ld: libcutest.a(chcprod.o): in function `cutest_chcprod_threadsafe_':
chcprod.f90:(.text+0x1d5): undefined reference to `elfun_'
/usr/bin/ld: chcprod.f90:(.text+0x2b9): undefined reference to `elfun_'
/usr/bin/ld: chcprod.f90:(.text+0x52c): undefined reference to `group_'
/usr/bin/ld: chcprod.f90:(.text+0x5d0): undefined reference to `range_'
/usr/bin/ld: chcprod.f90:(.text+0x731): undefined reference to `range_'
/usr/bin/ld: chcprod.f90:(.text+0x87b): undefined reference to `range_'
/usr/bin/ld: chcprod.f90:(.text+0x9a9): undefined reference to `range_'
/usr/bin/ld: libcutest.a(cshprod.o): in function `cutest_cshprod_threadsafe_':
cshprod.f90:(.text+0x1c2): undefined reference to `elfun_'
/usr/bin/ld: cshprod.f90:(.text+0x2cc): undefined reference to `elfun_'
/usr/bin/ld: cshprod.f90:(.text+0x539): undefined reference to `group_'
/usr/bin/ld: cshprod.f90:(.text+0x5f0): undefined reference to `range_'
/usr/bin/ld: cshprod.f90:(.text+0x72a): undefined reference to `range_'
/usr/bin/ld: cshprod.f90:(.text+0x8ba): undefined reference to `range_'
/usr/bin/ld: cshprod.f90:(.text+0x9e8): undefined reference to `range_'
/usr/bin/ld: libcutest.a(cshcprod.o): in function `cutest_cshcprod_threadsafe_':
cshcprod.f90:(.text+0x1c2): undefined reference to `elfun_'
/usr/bin/ld: cshcprod.f90:(.text+0x2a7): undefined reference to `elfun_'
/usr/bin/ld: cshcprod.f90:(.text+0x514): undefined reference to `group_'
/usr/bin/ld: cshcprod.f90:(.text+0x5b8): undefined reference to `range_'
/usr/bin/ld: cshcprod.f90:(.text+0x6fc): undefined reference to `range_'
/usr/bin/ld: cshcprod.f90:(.text+0x8ad): undefined reference to `range_'
/usr/bin/ld: cshcprod.f90:(.text+0x9db): undefined reference to `range_'
/usr/bin/ld: libcutest.a(cchprods.o): in function `cutest_cchprods_threadsafe_':
cchprods.f90:(.text+0x1cb): undefined reference to `elfun_'
/usr/bin/ld: cchprods.f90:(.text+0x2b2): undefined reference to `elfun_'
/usr/bin/ld: cchprods.f90:(.text+0x4d6): undefined reference to `group_'
/usr/bin/ld: cchprods.f90:(.text+0x50a): undefined reference to `range_'
/usr/bin/ld: cchprods.f90:(.text+0x7d2): undefined reference to `range_'
/usr/bin/ld: cchprods.f90:(.text+0xebb): undefined reference to `range_'
/usr/bin/ld: cchprods.f90:(.text+0x1231): undefined reference to `range_'
I suggest adding the topics numerical-optimization
, constrained-optimization
in the About section.
The PDF documentation for CUTEst ureport and creport still claims that the time array has input size 2, however it was increased to be of input size 4 a while ago. The documentation should be updated to reflect this.
This incorrect documentation was the cause of a PyCUTEst bug that I have just fixed.
Jean-Pierre Dussault reported the following behaviour using the Julia interface to CUTEst, but I can reproduce it directly in Fortran. The idea is to compare the values and derivatives of t -> f(x - tg) where x is the initial guess and g the gradient of the objective at the initial guess.
If I stick the following into, e.g., gen90_main.f90
:
OPEN(69, FILE='TVALS.dat', FORM='FORMATTED', STATUS='NEW')
OPEN(70, FILE='FVALS.dat', FORM='FORMATTED', STATUS='NEW')
OPEN(71, FILE='GVALS.dat', FORM='FORMATTED', STATUS='NEW')
tmin = 0.120
tmax = 0.124
dt = (tmax - tmin) / 10000
ALLOCATE(G(n), Gt(n), Xt(n))
CALL CUTEST_ugr(status, n, X, G)
DO i = 0, 10000
t = tmin + i * dt
WRITE(69, '(D22.15)') t
Xt = X - t * G
CALL CUTEST_ufn(status, n, Xt, Ft)
WRITE(70, '(D22.15)') Ft
CALL CUTEST_ugr(status, n, Xt, Gt)
slope = -DDOT(n, Gt, 1, G, 1)
WRITE(71, '(D22.15)') slope
END DO
DEALLOCATE(Xt, Gt, G)
CLOSE(71)
CLOSE(70)
CLOSE(69)
and run runcutest -p gen90 -lblas -D VAREIGVL
, and plot the values in FVALS.dat
and GVALS.dat
, I obtain
Thus the slope is zero around t = 0.123. However, f appears to attain its minimum before 0.121, where the slope is not small.
Would this be related to an error in the SIF file, the decoder, the gradient computation, or between the screen and the chair?
I noticed after some debugging that the standard command
$ARCHDEFS/install_optrove
uses make
internally to compile libcutest.a
. Unfortunately, the compilation rule uses commands modifying the file libcutest.a
in place. The compilation therefore breaks whenever multiple threads are used (i.e., using make -j<n>
or by having MAKEFLAGS="-j<n>"
set in the environment).
Since the behavior is unpredictable and errors of the form
/usr/bin/ar: /cutest/cutest/objects/pc64.lnx.gfo/double/libcutest.a: error reading cutest.o: file truncated
/usr/bin/ar: /cutest/cutest/objects/pc64.lnx.gfo/double/libcutest.a: malformed archive
are not caught, the compilation can silently fail. I think it would be a good idea to put a warning in the wiki to.
I am working on a revamp of CUTEst.jl
and I wanted to generate all Julia wrappers with Clang.jl like I did for GALAHAD but two wrappers were missing.
I implemented the wrappers myself but we should add it in cutest.h
here:
function cutest_uofg_(status, n, x, f, g, grad)
@ccall cutest_lib_path.cutest_uofg_(status::Ptr{Cint}, n::Ptr{Cint}, x::Ptr{Float64},
f::Ptr{Float64}, g::Ptr{Float64}, grad::Ptr{Bool})::Cvoid
end
function cutest_uofg_s_(status, n, x, f, g, grad)
@ccall cutest_lib_path.cutest_uofg_(status::Ptr{Cint}, n::Ptr{Cint}, x::Ptr{Float32},
f::Ptr{Float32}, g::Ptr{Float32}, grad::Ptr{Bool})::Cvoid
end
function cutest_uhprod_(status, n, goth, x, vector, result)
@ccall cutest_lib_path.cutest_uhprod_(status::Ptr{Cint}, n::Ptr{Cint}, goth::Ptr{Cint},
x::Ptr{Float64}, vector::Ptr{Float64},
result::Ptr{Float64})::Cvoid
end
function cutest_uhprod_s(status, n, goth, x, vector, result)
@ccall cutest_lib_path.cutest_uhprod_(status::Ptr{Cint}, n::Ptr{Cint}, goth::Ptr{Float32},
x::Ptr{Float32}, vector::Ptr{Float32},
result::Ptr{Float32})::Cvoid
end
Reference: JuliaSmoothOptimizers/CUTEst.jl#333
When calling chjprod
on ALLINITC with the default starting point x and Lagrange multipliers y:
double y0 = 3.5;
double p[] = {0.3, 0.3, 0.3, 0.3};
CUTEST_chjprod(&status, &CUTEst_nvar, &CUTEst_ncon, true, x, &y0, y, p, r);
CUTEST_cdh(&status, &CUTEst_nvar, &CUTEst_ncon, x+1.5, y-0.2, CUTEst_nvar, r);
CUTEST_chjprod(&status, &CUTEst_nvar, &CUTEst_ncon, true, NULL, &y0, NULL, p, r);
CUTEST_chjprod(&status, &CUTEst_nvar, &CUTEst_ncon, true, x+1.5, &y0, y-0.2, p, r);
gives
chjprod: [ 4.2 2.1 8.4 -10.5]
chjprod: [ 94.314672 100.74225564 128.62426465 78.6433218 ]
chjprod: [330.40135202 352.89789475 450.18492627 275.25162631]
which is clearly incorrect.
We were discussing the classification of the problems in the CUTest suite and found some inconsistencies specifically regarding how constraints are reported in the classification of nonlinear equation (NE) problems.
As an example, the JUDGENE
problem is classified as NOR2-MN-2-20
, i.e., having 20 constraints. This is reflected in the dimension obtained when instantiating the problem. Of course, these correspond to the residuals to be minimized.
Conversely, the HATFLDBNE
problem is classified as NOR2-AN-4-0
, i.e., having no constraints despite having a residual vector with 4 entries.
There are several other instances exhibiting these discrepancies (I wrote a script to detect these kinds of problems).
The question in this regard is which convention should be adopted (zero or the number of residuals, I would prefer the latter) and stick to that convention consistently.
Please intro a method to uninstall CUTEst completely in ubuntu
worhp_main.c:102:55: warning: ‘%s’ directive output may be truncated writing up to 127 bytes into a region of size 112 [-Wformat-truncation=]
102 | snprintf(buffer, sizeof(buffer), "CUTEst problem: %s", cutest_problem);
| ^~ ~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:894,
from worhp_main.c:20:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:71:10: note: ‘__builtin___snprintf_chk’ output between 17 and 144 bytes into a destination of size 128
71 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
72 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
73 | __va_arg_pack ());
Dear Prof. Gould,
I was tying to install CUTEst and its interface with MATLAB via the instruction from https://github.com/ralna/CUTEst/wiki. I'm using 64-bit max osx system. I have gone to the step of
"Now move to the ./cutest directory, enter the command $ARCHDEFS/install_optrove and follow the instructions."
When I change the directory and enter $ARCHDEFS/install_optrove, the first question is "Do you wish to install CUTEst (Y/n)? " I enter ``Y".
The second question is "Do you require the CUTEst-Matlab interface (y/N)?" I enter Y., Then I select platform "13", which is "64-bit MAC OS/X".
Then the third question is "Would you like to review and modify the system commands (y/N)?" I enter "N". Then I select Matlab version "4", which is "R2016b-R2017b", since I'm using R2017a.
Then, it results in a warning "Warning: you need to install gfortran-4.3 to allow
for Matlab and CUTEst interaction. Aborting".
How to fix this issue? I think I have installed gfortran 10.2 from https://github.com/fxcoudert/gfortran-for-macOS/releases, though it's not 4.3. I also tried to run brew install gcc on the terminal, but the warning is still on.
Is there a way to fix this issue?
Although this is warning, I think I haven't installed CUTEst successfully. When I run the test by
cutest2matlab_osx LUBRIFC.SIF
I got the result like
(base) Sens-MacBook-Pro:cutest senna$ cutest2matlab_osx LUBRIFC.SIF
#!/bin/bash -vx
###############################################################################
#
# cutest2matlab_osx: build the bridge between CUTEst and Matlab on OSX
# without relying on Matlab gfortran support
#
# Adapted from cutest2matlab by D. Orban, June 2017. Original version by
# Nick Gould for GALAHAD Productions, January 2013
#
###############################################################################
function help() {
echo 'Use this script on OSX with gfortran and Matlab R2016a or later.'
echo 'The script *may* work with earlier versions of Matlab but was not tested.'
echo
echo "Use: $(basename $0) PROBLEM[.SIF]"
exit 0
}
[[ $# > 0 && ("$1" == '-h' || "$1" == '--help') ]] && help
+ [[ 1 > 0 ]]
+ [[ LUBRIFC.SIF == \-\h ]]
+ [[ LUBRIFC.SIF == \-\-\h\e\l\p ]]
if [[ -z "$MYMATLABARCH" ]]; then
if [[ -z "$MYARCH" ]]; then
echo ' neither environment variable MYMATLABARCH nor MYARCH is set.'
echo ' Set MYMATLABARCH as a gfortran-installed version from the list '
/bin/ls -1 $CUTEST/versions 2>/dev/null
echo ' and re-run.'
exit 1
else
ARCH=${MYARCH}
fi
else
ARCH=${MYMATLABARCH}
fi
+ [[ -z mac64.osx.gfo ]]
+ ARCH=mac64.osx.gfo
# check that the architecture provided in MYMATLABARCH or MYARCH exists
if [[ ! -e $CUTEST/versions/$ARCH ]] ; then
echo ' The architecture privided by the environment variables MYMATLABARCH'
echo ' and MYARCH has not been installed. Install a gfortran version of'
echo ' CUTEst unsing install_cutest and re-run.'
exit 2
fi
+ [[ ! -e /Users/senna/course/Mihai/pro6/simu/code/cutest/versions/mac64.osx.gfo ]]
+ echo ' The architecture privided by the environment variables MYMATLABARCH'
The architecture privided by the environment variables MYMATLABARCH
+ echo ' and MYARCH has not been installed. Install a gfortran version of'
and MYARCH has not been installed. Install a gfortran version of
+ echo ' CUTEst unsing install_cutest and re-run.'
CUTEst unsing install_cutest and re-run.
+ exit 2
Best,
Sen
As discovered by a PyCUTEst user, there appear to be memory leaks in CUTEst (accessed via C interface), valgrind reports:
839,988 bytes in 1 blocks are still reachable in loss record 3,062 of 3,064
at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x473D9CD7: __cutest_MOD_cutest_allocate_array_integer (in /home/jfowkes/pycutest_cache_holder/MODBEALE/_pycutestitf.cpython-310-x86_64-linux-gnu.so)
by 0x473DA009: __cutest_MOD_cutest_sparse_hessian_by_rows (in /home/jfowkes/pycutest_cache_holder/MODBEALE/_pycutestitf.cpython-310-x86_64-linux-gnu.so)
by 0x473DEAB5: __cutest_MOD_cutest_size_sparse_hessian (in /home/jfowkes/pycutest_cache_holder/MODBEALE/_pycutestitf.cpython-310-x86_64-linux-gnu.so)
by 0x473B5717: cutest_udimsh_threadsafe_ (in /home/jfowkes/pycutest_cache_holder/MODBEALE/_pycutestitf.cpython-310-x86_64-linux-gnu.so)
by 0x473B5763: cutest_udimsh_ (in /home/jfowkes/pycutest_cache_holder/MODBEALE/_pycutestitf.cpython-310-x86_64-linux-gnu.so)
by 0x473ACD94: cutest__setup (cutestitf.c:460)
959,976 bytes in 1 blocks are still reachable in loss record 3,063 of 3,064
at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x473B1441: cutest_usetup_threadsafe_ (in /home/jfowkes/pycutest_cache_holder/MODBEALE/_pycutestitf.cpython-310-x86_64-linux-gnu.so)
by 0x473B4DF6: cutest_usetup_ (in /home/jfowkes/pycutest_cache_holder/MODBEALE/_pycutestitf.cpython-310-x86_64-linux-gnu.so)
by 0x473ACD09: cutest__setup (cutestitf.c:425)
2,399,992 bytes in 1 blocks are still reachable in loss record 3,064 of 3,064
at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x473E4850: __cutest_MOD_cutest_initialize_workspace (in /home/jfowkes/pycutest_cache_holder/MODBEALE/_pycutestitf.cpython-310-x86_64-linux-gnu.so)
by 0x473B3608: cutest_usetup_threadsafe_ (in /home/jfowkes/pycutest_cache_holder/MODBEALE/_pycutestitf.cpython-310-x86_64-linux-gnu.so)
by 0x473B4DF6: cutest_usetup_ (in /home/jfowkes/pycutest_cache_holder/MODBEALE/_pycutestitf.cpython-310-x86_64-linux-gnu.so)
by 0x473ACD09: cutest__setup (cutestitf.c:425)
and many more (3,064) such leaks in cutest_usetup
and cutest_udimsh
(all that I tested).
While this may not seem significant it very quickly adds up when one loops over several different problems!
From the traceback it is clear that these leaks are coming from the Fortran (namely the functions cutest_allocate_array_integer
, cutest_usetup_threadsafe
, and cutest_initialize_workspace
in this snippet) possibly automatic array deallocation is failing for some reason? It is probably worth running both the Fortran and C interfaces to cutest_usetup
and cutest_udimsh
through valgrind
or -fsanitize=address
to test for these memory leaks.
The new Meson build system, introduced with release 2.1.0, compiles static libraries (libcutest_single.a
, libcutest_double.a
) by default.
These libraries are incomplete by design and require linking with other object files that are problem-dependent in practice.
But the compilation of shared libraries is now functional.
I have added an additional file, cutest_delegate.f90, which is compiled only when shared libraries are requested to Meson (option -Ddefault_library=shared
).
This approach proves beneficial when using CUTEst through high-level languages like Python or Julia.
With functions such as load_routines_s
, load_routines
, and load_routines_q
, we can dynamically switch the shared library used for a particular problem.
cc @jfowkes
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.