|
[Rivet] more fun with alpgenGavin Hesketh hesketh at cern.chThu Dec 16 18:04:05 GMT 2010
Hi Andy, I'll have to do more digging to figure out what really happens, but here's a bit more info. I use this command: agile-runmc AlpGenPythia6:423:2.1.3d --beams=TVT:1960 -n 230 -P params.txt -o hepmc.fifo & rivet --analysis=D0_2009_S8349509 hepmc.fifo The number of events that are read in, pass UPVETO and make it out of pythia is only 224. The loop in agile-runmc: ## Make and write events for i in range(opts.NEVTS): st = run.makeEvent() logging.debug(run.eventSummary()) if not st: logging.error("Writing events failed") break if RECVD_KILL_SIGNAL is not None: logging.critical("Leaving event loop early due to signal " + str(RECVD_KILL_SIGNAL)) break gen.finalize() does loop over 230 (not 224), and gen.finalize() seems to be called. eg the end of the output: AGILe.PYTHIA: INFO Finalising... 1********* PYSTAT: Statistics on Number of Events and Cross-sections ********* ============================================================================== I I I I I Subprocess I Number of points I Sigma I I I I I I----------------------------------I----------------------------I (mb) I I I I I I N:o Type I Generated Tried I I I I I I ============================================================================== I I I I I 0 All included subprocesses I 224 488 I 1.435E-09 I I 4 User process 661 I 224 488 I 1.435E-09 I I I I I ============================================================================== ********* Total number of errors, excluding junctions = 0 ************* ********* Total number of errors, including junctions = 0 ************* ********* Total number of warnings = 1 ************* ********* Fraction of events that fail fragmentation cuts = 0.54098 ********* HeavyIon input stream invalid line type: HepMC::IO_GenEvent-END_EVENT_LISTING HeavyIon input stream setting badbit. and now it just hangs (even ctrl-c won't kill it!). The last two lines of the output are probably a clue... If I just run agile-runmc (no rivet) and dump to a file, it exits without hanging. The last 6 events in the file are junk though, so ideally it would stop when there are no more events to read in rather than going for the number I specify at the command line. However, it does have the "end event listing" flag: E 230 -1 -1.0000000000000000e+00 -1.0000000000000000e+00 -1.0000000000000000e+00 0 0 0 0 0 0 1 1.0000000000000000e+00 N 1 "0" U GEV MM C 1.4347291803278606e+00 9.5861875635604679e-02 HepMC::IO_GenEvent-END_EVENT_LISTING So, I'm not sure what happens. cheers, Gavin On 16/12/10 17:04, Andy Buckley wrote: > On 16/12/10 16:39, Gavin Hesketh wrote: >> Hello, >> hopefully a simple one. >> >> I'm running alpgen+pythia using agile, piping into a fifo being read by >> rivet. I specify the number of events: agile-runmc -n 1000. >> >> The problem is pythia is reading from an external file (from the alpgen >> matrix element generator), which might not contain 1000 events. Then, >> pythia calls UPVETO, to veto events based on parton-particle jet >> matching. So, even if the external file contains 1000 events, they might >> not all get processed through pythia to make it to the fifo. >> >> The result being that rivet does not get 1000 events, and just hangs >> once the fifo is not being filled. I have to kill it by hand, which >> means no .aida file, and no way to run this on the batch queue... >> >> Now, I have no way of knowing in advance exactly how many events will be >> in the external file read by pythia, or how many of those will fail >> UPVETO. So I want to tell agile to run over as many as possible (it >> seems to cleanly stop once the external file is exhausted, even if this >> is less than the "n" I specify). But is there a way to make rivet wrap >> up cleanly once the fifo is not receiving any more events (or when agile >> is no longer running)? > > Hi Gavin, > > Are you telling rivet to expect exactly 1000 events? In that case I > think it will wait even when AGILe has died. It should exit cleanly, > with an output file, if Ctrl-C'd. And if you don't specify a number of > events to Rivet, it should run until the end of the HepMC stream, which > is written by AGILe shutting down correctly. Maybe the AGILe AlpGen > interface *doesn't* exit smoothly enough to write that terminating run > footer. > > Without having time right now to look into it, I think that Rivet is > doing the right thing, and heuristics to guess when the fifo is not > receiving more events would probably have their own edge cases and > problems. I've put a 1 hour timeout on the first event into the SVN > version of Rivet, to catch a never-amusing batch farm gotcha where jobs > appear to be running for days but are actually doing nothing at all, but > even if I were to extend that to the event loop it wouldn't have the > sort of responsive behaviour that you want. > > So the problem is probably either that agile-runmc is *not* exiting as > smoothly as required when the external file is exhausted, or that you > are explicitly telling rivet to wait for a fixed number of events which > never arrive. Which is it? If the former, we should fix that before > making the next AGILe release (pretty soon, I hope) > > Andy >
More information about the Rivet mailing list |