Skip to content

LoadError: syntax: malformed expression #39705

@jagot

Description

@jagot

Running on latest nightly, I get this cryptic error:

ERROR: LoadError: syntax: malformed expression
Stacktrace:
  [1] top-level scope
    @ ~/debug-julia/he-gst.jl:13
  [2] EnergyExpressions.NBodyMatrixElement(bcs::EnergyExpressions.BitConfigurations{EnergyExpressions.Orbitals{SpinOrbital{Orbital{Int64}, Tuple{Int64, HalfIntegers.Half{Int64}}}, SparseArrays.SparseMatrixCSC{EnergyExpressions.NBodyTerm, Int64}, BitMatrix, BitVector}}, op::EnergyExpressions.FieldFreeOneBodyHamiltonian, i::Int64, j::Int64)
    @ EnergyExpressions ~/.julia/dev/EnergyExpressions/src/bit_configurations.jl:423
  [3] EnergyExpressions.NBodyMatrixElement(bcs::EnergyExpressions.BitConfigurations{EnergyExpressions.Orbitals{SpinOrbital{Orbital{Int64}, Tuple{Int64, HalfIntegers.Half{Int64}}}, SparseArrays.SparseMatrixCSC{EnergyExpressions.NBodyTerm, Int64}, BitMatrix, BitVector}}, op::EnergyExpressions.LinearCombinationOperator, i::Int64, j::Int64)
    @ EnergyExpressions ~/.julia/dev/EnergyExpressions/src/bit_configurations.jl:431
  [4] (Matrix{T} where T)(bcs::EnergyExpressions.BitConfigurations{EnergyExpressions.Orbitals{SpinOrbital{Orbital{Int64}, Tuple{Int64, HalfIntegers.Half{Int64}}}, SparseArrays.SparseMatrixCSC{EnergyExpressions.NBodyTerm, Int64}, BitMatrix, BitVector}}, rows::UnitRange{Int64}, op::EnergyExpressions.LinearCombinationOperator, cols::UnitRange{Int64}; verbosity::Int64)
    @ EnergyExpressions ~/.julia/dev/EnergyExpressions/src/bit_configurations.jl:453

Project attached, which should reproduce the problem: malformed-syntax.zip

This appeared a few days ago, e.g. I see the error on

Julia Version 1.7.0-DEV.560
Commit dff13e157d* (2021-02-17 07:24 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: AMD Ryzen 9 3950X 16-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, znver2)

but not on

julia> versioninfo()
Julia Version 1.7.0-DEV.499
Commit 21557721f2* (2021-02-09 08:54 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: AMD Ryzen 9 3950X 16-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, znver2)

julia> include("he-gst.jl")
Fock operator with
- quantum system: Atom{Float64}(R=Staggered finite differences basis {Float64} on 0.0..10.049999999999999 with 100 points spaced by ρ = 0.1; Z = 2 [helium]; 2 e⁻  Q = 0) with 1 SpinConfiguration{SpinOrbital{Orbital{Int64}, Tuple{Int64, HalfIntegers.Half{Int64}}}}: 1s₀α 1s₀β
- SCF equations:
  - Hartree–Fock equation: E|1s₀α⟩ = OrbitalEquation(1s₀α):
 + 1ĥ₀|1s₀α⟩ + 1r⁻¹×Y⁰(1s₀β,1s₀β)|1s₀α⟩

⟨1s₀α| 𝓗 |1s₀α⟩ = -0.7500579719133716 Ha = -20.409827473734754 eV

  - Hartree–Fock equation: E|1s₀β⟩ = OrbitalEquation(1s₀β):
 + 1ĥ₀|1s₀β⟩ + 1r⁻¹×Y⁰(1s₀α,1s₀α)|1s₀β⟩

⟨1s₀β| 𝓗 |1s₀β⟩ = -0.7500579719133716 Ha = -20.409827473734754 eV

Metadata

Metadata

Assignees

No one assigned

    Labels

    compiler:loweringSyntax lowering (compiler front end, 2nd stage)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions