Project

General

Profile

Support #722

Simulation

Added by Littlefield, Matthew about 12 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Simulation
Target version:
-
Start date:
03 October 2011
Due date:
% Done:

100%

Estimated time:
Workflow:

Description

So, I have been trying to simulate a quad which has been converted from cad and I have been getting an error. I have changed simulate_mice.py and saved a new macro file and the difference between the new one and the standard one is,
41c41
< datacards = io.StringIO(u"keep_tracks = False")
---

datacards = io.StringIO(u"keep_tracks = False\ngeant4_visualisation = True")

58c58
< # 'simulation.out' for the output
---

  1. 'mausput' for the output

64c64
< NUMBER_OF_SPILLS = 10
---

NUMBER_OF_SPILLS = 1

the error I get when i run this macro is

Welcome to MAUS:
Process ID (PID): 11730
Program Arguments: ['simulate_for_matt.py']
Version: MAUS development version 0.0.7
INPUT: Reading some input
MAP: Setting up mappers
Traceback (most recent call last):
File "simulate_for_matt.py", line 65, in <module>
run(NUMBER_OF_SPILLS)
File "simulate_for_matt.py", line 60, in run
MAUS.Go(my_input, my_map, MAUS.ReducePyDoNothing(), my_output, datacards)
File "/home/matt/maus-littlefield/src/common_py/Go.py", line 95, in init
self.native_python_map_reduce()
File "/home/matt/maus-littlefield/src/common_py/Go.py", line 127, in native_python_map_reduce
assert(self.mapper.birth(self.json_config_document) == True)
AssertionError

Many thanks


Files

TDm1152m9315moa3.dat (2.55 KB) TDm1152m9315moa3.dat Littlefield, Matthew, 07 October 2011 09:56
TDm1152m9318moa4.dat (35.3 KB) TDm1152m9318moa4.dat Littlefield, Matthew, 07 October 2011 09:56
TDm1152m9318moa5.dat (35.3 KB) TDm1152m9318moa5.dat Littlefield, Matthew, 07 October 2011 09:56
TDm1152m9318moa6.dat (35.3 KB) TDm1152m9318moa6.dat Littlefield, Matthew, 07 October 2011 09:56
ParentGeometryFile.dat (9.39 KB) ParentGeometryFile.dat Littlefield, Matthew, 07 October 2011 09:56
TDm1152m9314moa0.dat (9.67 KB) TDm1152m9314moa0.dat Littlefield, Matthew, 07 October 2011 09:56
TDm1152m9315.dat (2.55 KB) TDm1152m9315.dat Littlefield, Matthew, 07 October 2011 09:56
TDm1152m9315.dat (2.55 KB) TDm1152m9315.dat Littlefield, Matthew, 07 October 2011 09:56
TDm1152m9318moa7.dat (35.2 KB) TDm1152m9318moa7.dat Littlefield, Matthew, 07 October 2011 09:56
TDm1152m9315moa2.dat (2.55 KB) TDm1152m9315moa2.dat Littlefield, Matthew, 07 October 2011 09:56
TDm1152m9321moa12.dat (6.76 KB) TDm1152m9321moa12.dat Littlefield, Matthew, 07 October 2011 09:57
TDm1152m9321moa13.dat (6.76 KB) TDm1152m9321moa13.dat Littlefield, Matthew, 07 October 2011 09:57
TDm1152m9323.dat (5.18 KB) TDm1152m9323.dat Littlefield, Matthew, 07 October 2011 09:57
TDm1152m9323moa15.dat (5.18 KB) TDm1152m9323moa15.dat Littlefield, Matthew, 07 October 2011 09:57
TDm1152m9320.dat (1.57 KB) TDm1152m9320.dat Littlefield, Matthew, 07 October 2011 09:57
TDm1152m9320moa8.dat (1.57 KB) TDm1152m9320moa8.dat Littlefield, Matthew, 07 October 2011 09:57
TDm1152m9320moa9.dat (1.57 KB) TDm1152m9320moa9.dat Littlefield, Matthew, 07 October 2011 09:57
TDm1152m9320moa10.dat (1.57 KB) TDm1152m9320moa10.dat Littlefield, Matthew, 07 October 2011 09:57
TDm1152m9323moa16.dat (5.19 KB) TDm1152m9323moa16.dat Littlefield, Matthew, 07 October 2011 09:57
TDm1152m9321.dat (6.75 KB) TDm1152m9321.dat Littlefield, Matthew, 07 October 2011 09:57
TDm1152m9325moa18.dat (220 KB) TDm1152m9325moa18.dat Littlefield, Matthew, 07 October 2011 09:58
TDm1152m9327.dat (14.8 KB) TDm1152m9327.dat Littlefield, Matthew, 07 October 2011 09:58
TDm1152m9328.dat (1.56 KB) TDm1152m9328.dat Littlefield, Matthew, 07 October 2011 09:58
match2.dat (469 KB) match2.dat Littlefield, Matthew, 07 October 2011 10:05
simulate_for_matt.py (1.59 KB) simulate_for_matt.py Littlefield, Matthew, 07 October 2011 10:05
geometry.tgz (59 KB) geometry.tgz Littlefield, Matthew, 07 October 2011 10:14
#1

Updated by Rogers, Chris about 12 years ago

  • Assignee changed from Tunnell, Christopher to Rogers, Chris

When was the last time you did a merge? Can you update to the trunk; set verbose level to 0; and then run again?

Cheers,
Chris

#2

Updated by Littlefield, Matthew about 12 years ago

Sorry I ask this every time but what command updates the trunk?

#3

Updated by Rogers, Chris about 12 years ago

Follow the links:

MAUS wiki > MAUS developer documentation > Contributing to MAUS > Branch merge procedure

#4

Updated by Tunnell, Christopher about 12 years ago

What the error means is that one of your maps is failing to launch. It may be worthwhile starting just with MapCppSimulation in the list to make sure it's that one. I should probably add a check that prints out which map is failing.

So you have all the standard maps in there and the only thing you've touched is MapCppSimulation? What changes have been made to birth within that? Could geant4 be failing for some reason to load your geometry that MapCppSimulation catches?

#5

Updated by Littlefield, Matthew about 12 years ago

I did the merge preview with lp:maus and it turns out there is a lot of changes which I don't have but there were also a couple of conflicts. So I thought I would just delete these couple of files and the merge will just replace them with the new ones and they didn't. I then revert back to the version before the merge to then do the merge properly and the merge command says 'nothing to do'. How can I merge the trunk now.

I think that the error is coming about because of the missing file from the trunk. (hopefully)

#6

Updated by Littlefield, Matthew about 12 years ago

I have now updated the trunk and everything seems to be working :-) I have just tried simulating the CAD quad (after I noticed some errors in my conversion which have been corrected) and I am getting this error when I simulate

MatPlotLib not detected - matplotlib graphing functions will not be available
Welcome to MAUS:
Process ID (PID): 8945
Program Arguments: ['simulate_for_matt.py', '-simulation_geometry_filename', '/home/matt/maus-littlefield/src/common_py/geometry/ParentGeometryFile.dat']
Version: MAUS development version 0.0.8
INPUT: Reading some input
MAP: Setting up mappers
Traceback (most recent call last):
File "simulate_for_matt.py", line 65, in <module>
run(NUMBER_OF_SPILLS)
File "simulate_for_matt.py", line 60, in run
MAUS.Go(my_input, my_map, MAUS.ReducePyDoNothing(), my_output, datacards)
File "/home/matt/maus-littlefield/src/common_py/Go.py", line 93, in init
self.native_python_map_reduce()
File "/home/matt/maus-littlefield/src/common_py/Go.py", line 125, in native_python_map_reduce
assert(self.mapper.birth(self.json_config_document) == True)
AssertionError

I will turn the verbose level to debug to see what it says and post it ....

#7

Updated by Littlefield, Matthew about 12 years ago

verbose level 0 gives,

MatPlotLib not detected - matplotlib graphing functions will not be available
Welcome to MAUS:
Process ID (PID): 9054
Program Arguments: ['simulate_for_matt.py', '-simulation_geometry_filename', '/home/matt/maus-littlefield/src/common_py/geometry/ParentGeometryFile.dat']
Version: MAUS development version 0.0.8
INPUT: Reading some input
MAP: Setting up mappers
Traceback (most recent call last):
File "/home/matt/maus-littlefield/src/common_py/ErrorHandler.py", line 159, in HandleCppException
raise(CppError(error_message))
ErrorHandler.CppError: std::exception
Traceback (most recent call last):
File "simulate_for_matt.py", line 65, in <module>
run(NUMBER_OF_SPILLS)
File "simulate_for_matt.py", line 60, in run
MAUS.Go(my_input, my_map, MAUS.ReducePyDoNothing(), my_output, datacards)
File "/home/matt/maus-littlefield/src/common_py/Go.py", line 93, in init
self.native_python_map_reduce()
File "/home/matt/maus-littlefield/src/common_py/Go.py", line 125, in native_python_map_reduce
assert(self.mapper.birth(self.json_config_document) == True)
AssertionError

#8

Updated by Rogers, Chris about 12 years ago

Something evil in a file io operation probably. Can you give me a copy of the input files so I can run it myself (say, attach to the issue).

Cheers...

#9

Updated by Littlefield, Matthew about 12 years ago

Yeah sure, It may be something happening with the xslt script because I did notice some strange things happening as well so I'll scrutinise the files as well. :-)

#11

Updated by Littlefield, Matthew about 12 years ago

theres a few but not all of them are necessary you could turn them off (remove them) from the parent file if it makes life easier

#12

Updated by Rogers, Chris about 12 years ago

Could you attach also simulate_for_matt.py?

#13

Updated by Littlefield, Matthew about 12 years ago

sure

#14

Updated by Littlefield, Matthew about 12 years ago

woops

#15

Updated by Rogers, Chris about 12 years ago

Better also to make a tarball, like

tar -czf geometry.tgz TDm*.dat

and then upload geometry.tgz

#16

Updated by Littlefield, Matthew about 12 years ago

Oh yeah forgot about that, makes life easier..

#17

Updated by Rogers, Chris about 12 years ago

I ran against the trunk and got something like:

cr67@linux-fyo8:~/G4MICE/MAUS/work/bugs/ioerror_bug> python simulate_for_matt.py -simulation_geometry_filename ParentGeometryFile-copy.dat -verbose_level 0
MatPlotLib not detected - matplotlib graphing functions will not be available

WARNING: YOU ARE RUNNING MAUS OUTSIDE ITS MAUS_ROOT_DIR
WARNING:        MAUS_ROOT_DIR = /home/cr67/G4MICE/MAUS/maus_trunk
WARNING:        CURRENT DIRECTORY = /home/cr67/G4MICE/MAUS/work/bugs/ioerror_bug

Welcome to MAUS:
        Process ID (PID): 11354
        Program Arguments: ['simulate_for_matt.py', '-simulation_geometry_filename', 'ParentGeometryFile-copy.dat', '-verbose_level', '0']
        Version: MAUS development version 0.0.8
INPUT: Reading some input
MAP: Setting up mappers
Warning - failed to open module /home/cr67/G4MICE/MAUS/maus_trunk/src/legacy/FILES/Models/Modules//home/matt/maus-littlefield/src/common_py/geometry/Download/TDm1152m9315.dat - I assume it is not required
Warning - failed to open module /home/cr67/G4MICE/MAUS/maus_trunk/src/legacy/FILES/Models/Modules//home/matt/maus-littlefield/src/common_py/geometry/Download/TDm1152m9315.dat - I assume it is not required

*************************************************************
 Geant4 version Name: geant4-09-02-patch-04    (16-September-2010)
                      Copyright : Geant4 Collaboration
                      Reference : NIM A 506 (2003), 250-303
                            WWW : http://cern.ch/geant4
*************************************************************

<<< Geant4 Physics List engine packaging library: PACK 5.4
<<< Geant4 Physics List simulation engine: QGSP_BERT 3.3

Traceback (most recent call last):
  File "/home/cr67/G4MICE/MAUS/maus_trunk/src/common_py/ErrorHandler.py", line 159, in HandleCppException
    raise(CppError(error_message))
ErrorHandler.CppError: Dimension x in module ParentGeometryFile-copy.dat/TDm1152m9315.dat0 out of range at MiceModToG4Solid::checkDim
Traceback (most recent call last):
  File "simulate_for_matt.py", line 44, in <module>
    run()
  File "simulate_for_matt.py", line 41, in run
    MAUS.Go(my_input, my_map, MAUS.ReducePyDoNothing(), my_output, datacards)
  File "/home/cr67/G4MICE/MAUS/maus_trunk/src/common_py/Go.py", line 93, in __init__
    self.native_python_map_reduce()
  File "/home/cr67/G4MICE/MAUS/maus_trunk/src/common_py/Go.py", line 125, in native_python_map_reduce
    assert(self.mapper.birth(self.json_config_document) == True)
AssertionError

Note the error message is different

ErrorHandler.CppError: Dimension x in module ParentGeometryFile-copy.dat/TDm1152m9315.dat0 out of range at MiceModToG4Solid::checkDim

so worrying that the errors aren't coming through correctly, but looks like bad user input.

#18

Updated by Rogers, Chris about 12 years ago

Looking at the input file TDm1152m9315.dat, I also note that there is no closing brace.

#19

Updated by Littlefield, Matthew about 12 years ago

Its odd that doesn't come up on my machine :-( but that is an error I've seen before so I know what that is ill fix it and see if I get the same error again

#20

Updated by Rogers, Chris about 12 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Yeah, it's a bit of a worry, I think some machine-dependent problem with the build. Anyway, I'll close the issue.

Also available in: Atom PDF