Ticket #11220 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

PlusMD broken with file backed workspace

Reported by: Martyn Gigg Owned by: Martyn Gigg
Priority: critical Milestone: Release 3.4
Component: Framework Keywords:
Cc: Blocked By:
Blocking: Tester: Federico M Pouzols

Description

PlusMD is segfaulting when used with a file-backed MD workspace.

Change History

comment:1 Changed 6 years ago by Martyn Gigg

Test script to reproduce the bug

import os

from mantid.simpleapi import *

barefilename = "cncs.nxs"
try:
    os.remove(os.path.join(config["defaultsave.directory"], barefilename))
except OSError:
    pass

# Load then convert to Q in the lab frame
LoadEventNexus(Filename=r'CNCS_7860_event.nxs',OutputWorkspace='cncs_nxs')

ConvertToDiffractionMDWorkspace(InputWorkspace='cncs_nxs', OutputWorkspace='cncs_original', SplitInto=2)
alg = SaveMD(InputWorkspace='cncs_original', Filename=barefilename)

# Load into memory
LoadMD(Filename=barefilename,FileBackEnd='0',Memory='100',OutputWorkspace='cncs_mem')

# ======== File + mem, with write buffer ===========
LoadMD(Filename='cncs.nxs',FileBackEnd='1',Memory='100',OutputWorkspace='cncs_file')
PlusMD(LHSWorkspace="cncs_file", RHSWorkspace="cncs_mem", OutputWorkspace="cncs_file")
BinMD(InputWorkspace="cncs_file",AlignedDim0='Q_lab_x, -3, 3, 100',AlignedDim1='Q_lab_y, -3, 3, 100',AlignedDim2='Q_lab_z, -3, 3, 100',ForceOrthogonal='1',OutputWorkspace="test_binned")

DeleteWorkspace('cncs_file')

comment:2 Changed 6 years ago by Martyn Gigg

  • Status changed from new to inprogress

Use the filename in FileBackExperimentInfo

It turns out that the NeXus object is not as persistent throughout the system as was first suspected. Refs #11220

Changeset: 3e342c637c642b3c91e3a36ef32b7fb806465f7c

comment:3 Changed 6 years ago by Martyn Gigg

Pass filename instead of pointer to FileBackedExperimentInfo

Refs #11220

Changeset: 8fb0da1d4adc9bc4b569c84b4fde4ce589e0ce75

comment:4 Changed 6 years ago by Martyn Gigg

  • Status changed from inprogress to verify
  • Resolution set to fixed

This is being verified as pull request #345.

comment:5 Changed 6 years ago by Martyn Gigg

@FedeMPouzols Would you mind taking a look at this? It fixes the my ticket that you tested yesterday. A system test picked up a minor hole in the implementation.

comment:6 Changed 6 years ago by Federico M Pouzols

  • Status changed from verify to verifying
  • Tester set to Federico M Pouzols

comment:7 Changed 6 years ago by Federico M Pouzols

Nice, the example script is working well and the MDWTests passes now. I'm running all system tests to make absolutely sure, and will merge this in.

comment:8 Changed 6 years ago by Federico M Pouzols

  • Status changed from verifying to closed

Merge pull request #345 from mantidproject/11220_fix_binmd_with_filebacked_ws

Fix BinMD when used with a file-backed MD workspace

Full changeset: 97f8c8b9ff37280303b390a8872ad473b63ffb8b

comment:9 Changed 5 years ago by Nick Draper

Somehow these slipped through without a resolution. Set to Fixed.

comment:10 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 12059

Note: See TracTickets for help on using tickets.