You are correct, running the example from the documentation at https://github.com/JuliaNLSolvers/Optim.jl/blob/master/docs/src/algo/samin.md
using Optim, OptimTestProblems
prob = UnconstrainedProblems.examples["Rosenbrock"];
res = Optim.optimize(prob.f, fill(-100.0, 2), fill(100.0, 2), prob.initial_x, SAMIN(), Optim.Options(iterations=10^6))
println(res)
I also see
================================================================================
SAMIN results
==> Normal convergence <==
total number of objective function evaluations: 22451
Obj. value: 0.0000000000
parameter search width
1.00000 0.00000
1.00000 0.00000
================================================================================
* Status: failure
* Candidate solution
Final objective value: 1.178874e-15
* Found with
Algorithm: SAMIN
* Convergence measures
|x - x'| = NaN ≰ 0.0e+00
|x - x'|/|x'| = NaN ≰ 0.0e+00
|f(x) - f(x')| = NaN ≰ 0.0e+00
|f(x) - f(x')|/|f(x')| = NaN ≰ 0.0e+00
|g(x)| = NaN ≰ 0.0e+00
* Work counters
Seconds run: 1 (vs limit Inf)
Iterations: 22451
f(x) calls: 22451
∇f(x) calls: 0
Furthermore the documentation and current reporting differ and in the documentation I miss the status information signalling success or failure.