Print

Print


Hello Tao,

Thank you very much for catching and reporting this bug! It will be fixed in the next release and a patch will go onto trunk as well.

pax
Gabe

Gabriel Perdue
Associate Scientist

Scientific Computing Division
Fermi National Accelerator Laboratory
PO Box 500, MS 234, Batavia, IL 60510, USA
Office: 630-840-6499
Cell: 630-605-8062

Connect with us!

On Apr 20, 2017, at 9:11 PM, LIN Tao <[log in to unmask]> wrote:

Dear developers,

When using gevgen_atmo ( GENIE 2.12.4 ), we found the app hangs at:
 NOTICE GMCJDriver : [n] <GMCJDriver.cxx::GenerateFluxNeutrino (1045)> : Generating a flux neutrino

We have a look at the code, and found the problem is due to an invalid fMaxEv.
Because fMaxEv is initialized before fNumEnergyBins is initialized, fMaxEv is always the value in the first bin.

Thank you!

Tao Lin


Following is our patch:
Index: src/FluxDrivers/GFLUKAAtmoFlux.cxx
===================================================================
--- src/FluxDrivers/GFLUKAAtmoFlux.cxx  (revision 6939)
+++ src/FluxDrivers/GFLUKAAtmoFlux.cxx  (working copy)
@@ -23,6 +23,7 @@
*/
//____________________________________________________________________________

+#include <iostream>
#include <cassert>
#include <fstream>

@@ -115,11 +116,13 @@
         << ": bin centre = " << (fEnergyBins[i] + fEnergyBins[i+1])/2.;
  }

-  fMaxEv = fEnergyBins[fNumEnergyBins];

  fNumPhiBins      = 1;
  fNumCosThetaBins = kGFlk3DNumCosThetaBins;
  fNumEnergyBins   = kGFlk3DNumLogEvBins;
+
+  std::cout << "fNumEnergyBins:" << fNumEnergyBins << std::endl;
+  fMaxEv = fEnergyBins[fNumEnergyBins];
}