Skip to content

rcall hangs when executed via include() but works when executed directly #62

@ProfAJRoberts

Description

@ProfAJRoberts

I successfully do the following step-by-step by hand in the CLI (aka REPL I guess).

using Reduce
@force using Reduce.Algebra
println("starting reduce")
R"in \"randmat.txt\"$"   # executes Reduce commands in randa.txt
A = eval(rcall(:(randmat(6))))

The dialogue is

julia> using Reduce
julia> @force using Reduce.Algebra
julia> println("starting reduce")
starting reduce
julia> R"in \"randmat.txt\"$"   # executes Reduce commands in randmat.txt
julia> println("starting rcall of the Reduce function")
starting rcall of the Reduce function
julia> A = eval(rcall(:(randmat(6))))
6×6 Matrix{Int64}:
 0  0  0  0  1  6
 2  0  0  1  6  5
 2  0  0  3  7  6
 0  1  1  2  0  7
 3  0  0  6  7  3
 3  2  5  1  3  8
julia> println("finished rcall")
finished rcall
julia> 

But when I try to execute it a a sequence of commands in a file, it fails in the eval(rcall(.)) step: execution hangs waiting for something. So I expanded the eval(rcall()) and the problem appears to be rcall() (which I understand is derived from another "call()" function). Trace printing in my script reports the following, and hangs in the rcall

julia> include("test.jl")
starting reduce
setting up Reduce function randmat
doing rcall

Any suggestions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions