Ticket #5979 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

SaveMD crashes Mantid when saving large MD files

Reported by: Alex Buts Owned by: Alex Buts
Priority: blocker Milestone: Release 2.3
Component: VATES Keywords:
Cc: Blocked By:
Blocking: Tester: Michael Reuter

Description (last modified by Alex Buts) (diff)

The following script works fine if one combines 20 (maxNum=20)files, but when there are 100 (maxNum=100), there is crash on SaveMD, somewhere in saving boxes.

print 'start\n'
cur_ws='wsn';
md_ws='mdws4D';
MDWSF='';
LoadNXSPE(Filename='D:/Data/Fe/Fe_Mantid/MAP'+str(15052)+'.nxspe',OutputWorkspace=cur_ws)
maxNum = 20;
for n in range(1,maxNum):
	print "Step: ",n," of ",maxNum
	AddSampleLog(cur_ws,LogName='Psi',LogText=str(2*n),LogType='Number');
	SetGoniometer(cur_ws,Axis0='Psi,0,1,0,1');
	SetUB(Workspace=cur_ws,a='2.87',b='2.87',c='2.87')
	
	ConvertToMD(InputWorkspace=cur_ws,OutputWorkspace=md_ws,QDimensions='Q3D',QConversionScales='HKL',OverwriteExisting='0',MinValues='-4.2,-4.2,-4.2,-50',MaxValues='8.2,8.2,4.2,350')
	

SaveMD(md_ws,'FeFake_025.nxs');

Change History

comment:1 Changed 8 years ago by Alex Buts

  • Description modified (diff)
  • Summary changed from SaveMD crashes Mantid when saving lage MD files to SaveMD crashes Mantid when saving large MD files

comment:2 Changed 8 years ago by Alex Buts

  • Description modified (diff)

comment:3 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.3 to Release 2.4

Moved to milestone 2.4

comment:4 Changed 8 years ago by Alex Buts

  • Status changed from new to assigned
  • Owner set to Alex Buts
  • Priority changed from major to blocker
  • Milestone changed from Release 2.4 to Release 2.3

comment:5 Changed 8 years ago by Alex Buts

  • Status changed from assigned to accepted

comment:6 Changed 8 years ago by Alex Buts

refs #5979 test which shows errors without handling huge files

Changeset: 88b3b7779d959e428c7735ed3b2c70d3800b0a97

comment:7 Changed 8 years ago by Alex Buts

refs #5979 This hopefully fixes it

Open data in NeXus has to be always followed by close data.

Changeset: 7350601b1f5ce89531b37714e604c71608186b77

comment:8 Changed 8 years ago by Alex Buts

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

the script below runs faster that the initial one and demonstrates that there are no this error any more (it was crashing on 60 files before)

from mantid import logger

print 'start\n'
cur_ws='wsn';
md_ws='mdws4D';
logger.notice('started combining');
MDWSF='';
LoadNXSPE(Filename='D:/Data/Fe/Fe_Mantid/MAP'+str(15052)+'.nxspe',OutputWorkspace='wsn1')
ConvertUnits(InputWorkspace='wsn1',OutputWorkspace=cur_ws,Target='TOF',EMode='Direct')

maxNum = 80;
maxNname= str(maxNum)
for n in range(0,maxNum):
	logMess = "Step: "+str(n+1)+" of "+maxNname
	print logMess
	logger.notice('started combining');	

	AddSampleLog(cur_ws,LogName='Psi',LogText=str(2*n),LogType='Number');
	SetGoniometer(cur_ws,Axis0='Psi,0,1,0,1');
	SetUB(Workspace=cur_ws,a='2.87',b='2.87',c='2.87')
	
	#ConvertToMD(InputWorkspace=cur_ws,OutputWorkspace=md_ws,QDimensions='Q3D',QConversionScales='HKL',OverwriteExisting='0',MinValues='-4.2,-4.2,-4.2,-50',MaxValues='8.2,8.2,4.2,350')
	
	ConvertToDiffractionMDWorkspace(InputWorkspace=cur_ws,OutputWorkspace=md_ws,Append='1')	

SaveMD(md_ws,'FeFake_Lr80.nxs');


comment:9 Changed 8 years ago by Michael Reuter

  • Status changed from verify to verifying
  • Tester set to Michael Reuter

comment:10 Changed 8 years ago by Michael Reuter

  • Status changed from verifying to closed

This seems to be working correctly.

comment:11 Changed 8 years ago by Alex Buts

refs #5979 test which shows errors without handling huge files

Changeset: 88b3b7779d959e428c7735ed3b2c70d3800b0a97

comment:12 Changed 8 years ago by Alex Buts

refs #5979 This hopefully fixes it

Open data in NeXus has to be always followed by close data.

Changeset: 7350601b1f5ce89531b37714e604c71608186b77

comment:13 Changed 8 years ago by Alex Buts

refs #5979 test which shows errors without handling huge files

Changeset: 88b3b7779d959e428c7735ed3b2c70d3800b0a97

comment:14 Changed 8 years ago by Alex Buts

refs #5979 This hopefully fixes it

Open data in NeXus has to be always followed by close data.

Changeset: 7350601b1f5ce89531b37714e604c71608186b77

comment:15 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 6825

Note: See TracTickets for help on using tickets.