Skip to content

eFAST errors with 2 parameters#229

Description

@drbergman

Describe the bug 馃悶

An eFAST run with two parameters can fail with the wrong number of samples.

Expected behavior

Even if eFAST with 2 parameters is perhaps overkill, this should work.

Minimal Reproducible Example 馃憞

Without MRE, we would only be able to help you to a limited extent, and attention to the issue would be limited. to know more about MRE refer to wikipedia and stackoverflow.

using GlobalSensitivity, Distributions

f(x) = [sum(x)]   # trivial 2-input function
bounds = [[0.0, 1.0], [0.0, 1.0]]   # 2 parameters

GlobalSensitivity.gsa(f, eFAST(num_harmonics=4), bounds; samples=500)

Error & Stacktrace 鈿狅笍

ERROR: ArgumentError: range(1.0, stop=7.0, length=1): endpoints differ
Stacktrace:
 [1] _linspace1(::Type{Float64}, start::Float64, stop::Float64, len::Int64)
   @ Base ./twiceprecision.jl:738
 [2] _linspace(::Type{Float64}, start_n::Int64, stop_n::Int64, len::Int64, den::Int64)
   @ Base ./twiceprecision.jl:718
 [3] _linspace
   @ ./twiceprecision.jl:715 [inlined]
 [4] range_start_stop_length
   @ ./range.jl:604 [inlined]
 [5] _range
   @ ./range.jl:174 [inlined]
 [6] range
   @ ./range.jl:155 [inlined]
 [7] gsa(f::typeof(f), method::eFAST, p_range::Vector{Vector{Float64}}; samples::Int64, batch::Bool, distributed::Val{false}, rng::Random.TaskLocalRNG, kwargs::@Kwargs{})
   @ GlobalSensitivity ~/.julia/packages/GlobalSensitivity/JmOYK/src/eFAST_sensitivity.jl:92
 [8] top-level scope
   @ REPL[34]:1

Environment (please complete the following information):

  • Output of using Pkg; Pkg.status()
Status `~/.julia/dev/SMoReVerse/SMoReGloS/temp/Project.toml`
  [31c24e10] Distributions v0.25.125
  [af5da776] GlobalSensitivity v2.11.0
  • Output of using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
Status `~/.julia/dev/SMoReVerse/SMoReGloS/temp/Manifest.toml`
  [47edcb42] ADTypes v1.22.0
  [621f4979] AbstractFFTs v1.5.0
  [1520ce14] AbstractTrees v0.4.5
  [7d9f7c33] Accessors v0.1.44
  [79e6a3ab] Adapt v4.6.0
  [66dad0bd] AliasTables v1.1.3
  [4fba245c] ArrayInterface v7.25.0
  [13072b0f] AxisAlgorithms v1.1.0
  [0e736298] Bessels v0.2.8
  [d360d2e6] ChainRulesCore v1.26.1
  [08986516] Collects v1.1.0
  [861a8166] Combinatorics v1.1.0
  [38540f10] CommonSolve v0.2.6
  [bbf7d656] CommonSubexpressions v0.3.1
  [34da2185] Compat v4.18.1
  [ab4b797d] ComplexityMeasures v3.10.1
  [a33af91c] CompositionsBase v0.1.2
  [2569d6c7] ConcreteStructs v0.2.4
  [187b0558] ConstructionBase v1.6.0
  [ae264745] Copulas v0.1.34
  [717857b8] DSP v0.8.5
  [9a962f9c] DataAPI v1.16.0
  [864edb3b] DataStructures v0.19.4
  [5732040d] DelayEmbeddings v2.9.0
  [8bb1440f] DelimitedFiles v1.9.1
  [163ba53b] DiffResults v1.1.0
  [b552c78f] DiffRules v1.15.1
  [a0c0ee7d] DifferentiationInterface v0.7.18
  [b4f34e82] Distances v0.10.12
  [31c24e10] Distributions v0.25.125
  [ffbed154] DocStringExtensions v0.9.5
  [4e289a0a] EnumX v1.0.7
  [e2ba6199] ExprTools v0.1.10
  [b86e33f2] FFTA v0.3.1
  [7a1cc6ca] FFTW v1.10.0
  [1a297f60] FillArrays v1.16.0
  [6a86dc24] FiniteDiff v2.31.0
  [3821ddf9] FixedSizeArrays v1.3.0
  [f6369f11] ForwardDiff v1.3.3
  [46192b85] GPUArraysCore v0.2.0
  [af5da776] GlobalSensitivity v2.11.0
  [19dc6840] HCubature v1.8.0
  [34004b35] HypergeometricFunctions v0.3.28
  [18e54dd8] IntegerMathUtils v0.1.3
  [a98d9a8b] Interpolations v0.16.2
  [3587e190] InverseFunctions v0.1.17
  [92d709cd] IrrationalConstants v0.2.6
  [c8e1da08] IterTools v1.10.0
  [692b3bcd] JLLWrappers v1.8.0
  [5ab0869b] KernelDensity v0.6.11
  [0b1a1467] KrylovKit v0.10.3
  [984bce1d] LambertW v1.0.0
  [73f95e8e] LatticeRules v0.0.1
  [d3d80556] LineSearches v7.6.2
  [2ab3a3ac] LogExpFunctions v0.3.29
  [1914dd2f] MacroTools v0.5.16
  [e1d29d7a] Missings v1.2.0
  [46d2c3a1] MuladdMacro v0.2.4
  [37188c8d] MvNormalCDF v0.3.2
  [d41bc354] NLSolversBase v8.0.0
  [77ba4419] NaNMath v1.1.3
  [b8a86587] NearestNeighbors v0.4.27
  [645ca80c] Neighborhood v0.2.5
  [6fe1bfb0] OffsetArrays v1.17.0
  [429524aa] Optim v2.0.1
  [bac558e1] OrderedCollections v1.8.1
  [90014a1f] PDMats v0.11.37
  [65ce6f38] PackageExtensionCompat v1.0.2
  [85e3b03c] PolyLog v2.6.2
  [f27b6e38] Polynomials v4.1.1
  [85a6dd25] PositiveFactorizations v0.2.4
  [aea7be01] PrecompileTools v1.3.4
  [21216c6a] Preferences v1.5.2
  [27ebfcd6] Primes v0.5.7
  [43287f4e] PtrArrays v1.4.0
  [1fd47b50] QuadGK v2.11.3
  [8a4e6c94] QuasiMonteCarlo v0.3.5
  [c84ed2f1] Ratios v0.4.5
  [3cdcf5f2] RecipesBase v1.3.4
  [731186ca] RecursiveArrayTools v4.3.0
  [189a3867] Reexport v1.2.2
  [ae029012] Requires v1.3.1
  [79098fc4] Rmath v0.9.0
  [f2b01f46] Roots v3.0.0
  [7e49a35a] RuntimeGeneratedFunctions v0.5.19
  [efcf1570] Setfield v1.1.2
  [ed01d8cd] Sobol v1.5.0
  [a2af1166] SortingAlgorithms v1.2.2
  [276daf66] SpecialFunctions v2.7.2
  [40b095a5] StateSpaceSets v2.5.3
  [90137ffa] StaticArrays v1.9.18
  [1e83bf80] StaticArraysCore v1.4.4
  [10745b16] Statistics v1.11.1
  [82ae8749] StatsAPI v1.8.0
  [2913bbd2] StatsBase v0.34.10
  [4c63d2b9] StatsFuns v1.5.2
  [2efcf032] SymbolicIndexingInterface v0.3.48
  [6aa5eb33] TaylorSeries v0.21.9
  [592b5752] Trapz v2.0.3
  [409d34a3] VectorInterface v0.5.0
  [29a6e085] Wavelets v0.10.1
  [efce3f68] WoodburyMatrices v1.1.0
  [f5851436] FFTW_jll v3.3.12+0
  [1d5cc7b8] IntelOpenMP_jll v2025.2.0+0
  [856f044c] MKL_jll v2025.2.0+0
  [efe28fd5] OpenSpecFun_jll v0.5.6+0
  [f50d1b31] Rmath_jll v0.5.1+0
  [1317d2d5] oneTBB_jll v2022.3.0+0
  [0dad84c5] ArgTools v1.1.2
  [56f22d72] Artifacts v1.11.0
  [2a0f44e3] Base64 v1.11.0
  [ade2ca70] Dates v1.11.0
  [8ba89e20] Distributed v1.11.0
  [f43a241f] Downloads v1.7.0
  [7b1f6079] FileWatching v1.11.0
  [9fa8497b] Future v1.11.0
  [b77e0a4c] InteractiveUtils v1.11.0
  [ac6e5ff7] JuliaSyntaxHighlighting v1.12.0
  [4af54fe1] LazyArtifacts v1.11.0
  [b27032c2] LibCURL v0.6.4
  [76f85450] LibGit2 v1.11.0
  [8f399da3] Libdl v1.11.0
  [37e2e46d] LinearAlgebra v1.12.0
  [56ddb016] Logging v1.11.0
  [d6f4376e] Markdown v1.11.0
  [a63ad114] Mmap v1.11.0
  [ca575930] NetworkOptions v1.3.0
  [44cfe95a] Pkg v1.12.1
  [de0858da] Printf v1.11.0
  [9a3f8284] Random v1.11.0
  [ea8e919c] SHA v0.7.0
  [9e88b42a] Serialization v1.11.0
  [1a1011a3] SharedArrays v1.11.0
  [6462fe0b] Sockets v1.11.0
  [2f01184e] SparseArrays v1.12.0
  [f489334b] StyledStrings v1.11.0
  [4607b0f0] SuiteSparse
  [fa267f1f] TOML v1.0.3
  [a4e569a6] Tar v1.10.0
  [8dfed614] Test v1.11.0
  [cf7118a7] UUIDs v1.11.0
  [4ec0a83e] Unicode v1.11.0
  [e66e0078] CompilerSupportLibraries_jll v1.3.0+1
  [deac9b47] LibCURL_jll v8.15.0+0
  [e37daf67] LibGit2_jll v1.9.0+0
  [29816b5a] LibSSH2_jll v1.11.3+1
  [14a3606d] MozillaCACerts_jll v2025.11.4
  [4536629a] OpenBLAS_jll v0.3.29+0
  [05823500] OpenLibm_jll v0.8.7+0
  [458c3c95] OpenSSL_jll v3.5.4+0
  [bea87d4a] SuiteSparse_jll v7.8.3+2
  [83775a58] Zlib_jll v1.3.1+2
  [8e850b90] libblastrampoline_jll v5.15.0+0
  [8e850ede] nghttp2_jll v1.64.0+1
  [3f19e933] p7zip_jll v17.7.0+0
  • Output of versioninfo()
Julia Version 1.12.6
Commit 15346901f00 (2026-04-09 19:20 UTC)
Build Info:
  Official https://julialang.org release
Platform Info:
  OS: macOS (arm64-apple-darwin24.0.0)
  CPU: 16  Apple M4 Max
  WORD_SIZE: 64
  LLVM: libLLVM-18.1.7 (ORCJIT, apple-m4)
  GC: Built with stock GC
Threads: 1 default, 1 interactive, 1 GC (on 12 virtual cores)
Environment:
  JULIA_PROJECT = @.
  DYLD_LIBRARY_PATH = :./addons/libRoadrunner/roadrunner/lib

Additional context

A different error occurs if you replace samples=500 with samples=50. I will open a PR shortly on both.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions