Skip to content

Blueprint plugin cannot read output from XRayImage Query on Windows #20499

@biagas

Description

@biagas

Describe the bug

I was running the regression suite on Windows , noticed crashes with xrayimage query.
I extracted enough code from the test file to run just one of the tests failing.

The issue comes up when a full-path is specified for the XRayImage query's output.

Here's the script: (TestingStuff.py contains methods to handle test-specific methods like Test and silo_data_path)

Source("TestingStuff.py")

def calc_midpoints(arr):
    midpts = []
    for i in range(0, len(arr) - 1):
        midpts.append((arr[i] + arr[i + 1]) / 2)
    return midpts

OpenDatabase(silo_data_path("curv3d.silo"))
DefineScalarExpression("d1", 'd')
DefineScalarExpression("p1", 'p')
DefineScalarExpression("d2", 'd * 6')
DefineScalarExpression("p2", 'p * 6')
DefineScalarExpression("d3", 'd * 3')
DefineScalarExpression("p3", 'p * 3')
DefineArrayExpression("darr", "array_compose(d1,d2,d3)")
DefineArrayExpression("parr", "array_compose(p1,p2,d3)")
AddPlot("Pseudocolor", "d")
DrawPlots()

# common place for args
divide_emis_by_absorb = 1
origin = (0.0, 2.5, 10.0)
theta = 0
phi = 0
width = 15
height = 10
image_size = (300, 200)

energy_group_bounds      = [0, 2, 6, 8]
fake_energy_group_bounds = [0, 1, 2, 3]

energy_group_midpts      = calc_midpoints(energy_group_bounds)
fake_energy_group_midpts = calc_midpoints(fake_energy_group_bounds)

calltype = "legacy"
output_type="hdf5"

# This outdir works
#outdir="."

# This outdir does not work
outdir="C:\\A_VisIt\\Run"

Query("XRay Image",
    output_type,
    outdir,
    divide_emis_by_absorb,
    origin[0],
    origin[1],
    origin[2],
    theta,
    phi,
    width,
    height,
    image_size[0],
    image_size[1],
    ("darr", "parr"),
    energy_group_bounds)

DeleteAllPlots()
DeleteExpression("d1")
DeleteExpression("p1")
DeleteExpression("d2")
DeleteExpression("p2")
DeleteExpression("d3")
DeleteExpression("p3")
DeleteExpression("darr")
DeleteExpression("parr")

CloseDatabase(silo_data_path("curv3d.silo"))

conduit_db = pjoin(outdir, "output.root")
OpenDatabase(conduit_db)
AddPlot("Pseudocolor", "mesh_image_topo/intensities")
DrawPlots()
Test("_image_topo_intensities_" + calltype)

Here is the relevant output from engine log when the query's output dir is: "C:\A_VisIt\Run"
Notice there is an extra Run in the path.

GetMesh: mesh_image_topo [domain 0]
ReadBlueprintMesh: mesh_image_topo [domain 0]
mesh name: mesh
topo name: image_topo
coordset path mesh/coordsets/image_coords
GenerateTreePath using partition map for mesh: mesh
GenerateFilePath using partition map for mesh: mesh
tree cache read [domain 0] C:\A_VisIt\Run\Run/output.root:/mesh/coordsets/image_coords
[blueprint plugin error] HDF5 Error code-1 Error opening HDF5 file for reading: C:\A_VisIt\Run\Run/output.root
Exception: (InvalidVariableException) C:\A_VisIt\visit\src\databases\Blueprint\avtBlueprintTreeCache.C, line 166: An invalid variable (HDF5 Error code-1 Error opening HDF5 file for reading: C:\A_VisIt\Run\Run/output.root
) was specified.
[blueprint warning] failed to load conduit coordset for mesh_image_topo [domain 0] -- skipping mesh for this domainMesh returned by file format is NULL for domain 0, material = _all

Attachments

Here's the generated output.root in case it is helpful.

output.zip

Desktop

  • OS and version: Windows 11
  • VisIt Version: develop

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingimpact mediumProductivity partially degraded (not easily mitigated bug) or improved (enhancement)likelihood mediumNeither low nor high likelihood

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions