ROOT with script working at prompt but not in batch

Hi ROOT experts,

I have a very simple problem: the script below is supposed to dump a ROOT file in an ascii file.

#!/bin/tcsh -f bbrroot -b <<! TFile *f=new TFile("/nfs/farm/babar/AWG21/Breco/GLWADS/test/ntp/signal/Dstar0K/TMVA/var6/Chained1005-BchToD0KAll-R18b-dk-Rec3023_Fisher.root"); TTree *mytree=f->Get("T"); mytree->SetScanField(0); int numb=mytree->GetEntries(); cout << numb << endl; mytree->Scan("*","","precision=12",numb,0); >/output/Fisher.dat ! gzip /output/Fisher.dat exit

My problem is the following: the script gets completed properly (ie I get the .dat file as output with the correct content) when I execute it from a Unix prompt, but when I submit it in batch, the job fails, and it seems due to ROOT.

[yakut01] ~/TMVA/reader > bsub -q short -C 0 -o log/myFisher-3023-ccbar.log myFisher/myFisher-3023-ccbar.csh

The log file contains:

[quote] [yakut01] ~/TMVA/reader > more log/myFisher-3023-ccbar.log

  •                                     *
  •    W E L C O M E  to  R O O T       *
  •                                     *
  • Version 5.10/00c 31 March 2006 *
  •                                     *
  • You are welcome to visit our Web site *
  •      [](            *
  •                                     *

Compiled on 22 June 2006 for linux with thread support.

CINT/ROOT C/C++ Interpreter version 5.16.8, February 9, 2006
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
Vincent Tisserand Root Logon
LOAD libRooFit

RooFit v2.07 – Developed by Wouter Verkerke and David Kirkby
Copyright © 2000-2005 NIKHEF, University of California & Stanford University
All rights reserved, please read

For approved plots use: gROOT->SetStyle("BABAR");

To add a BABAR label use: BABARLabel();
To add a better-scaling BABAR label use: BABARSmartLabel();
type “BABARSmartLabel(-2);” for options
BaBar Style has been loaded


*** Break *** segmentation violation
Generating stack trace…
0x003b697d in from /afs/
0x003b7790 in G__process_cmd + 0x2da from /afs/
0x007ab300 in TCint::ProcessLine(char const*, TInterpreter::EErrorCode*) + 0x138 from /afs/
0x006ee556 in TApplication::ProcessLine(char const*, bool, int*) + 0x61e from /afs/
0x001f9d8f in TRint::HandleTermInput() + 0x1dd from /afs/
0x001f8a7e in TTermInputHandler::Notify() + 0x24 from /afs/
0x001fa644 in TTermInputHandler::ReadNotify() + 0x12 from /afs/
0x0083146e in TUnixSystem::CheckDescriptors() + 0x144 from /afs/
0x0083035c in TUnixSystem::DispatchOneEvent(bool) + 0x152 from /afs/
0x007669f8 in TSystem::InnerLoop() + 0x18 from /afs/
0x0076699d in TSystem::Run() + 0x6f from /afs/
0x006ef036 in TApplication::Run(bool) + 0x32 from /afs/
0x001f9820 in TRint::Run(bool) + 0x3ea from /afs/
0x080488dd in main + 0x71 from /afs/
0x0266d79a in __libc_start_main + 0xda from /lib/tls/
0x080487e1 in _Unwind_Resume + 0x31 from /afs/

This is the end of ROOT – Goodbye

gzip: /nfs/farm/babar/AWG21/Breco/GLWADS/test/ntp/signal/Dstar0K/TMVA/var6/3023_Fisher-ccbar.dat: No such file or directory

Sender: LSF System lsf@cob0303
Subject: Job 933108: <myFisher/myFisher-3023-ccbar.csh> Done

Job <myFisher/myFisher-3023-ccbar.csh> was submitted from host by user .
Job was executed on host(s) , in queue , as user .
</u/br/latour> was used as the home directory.
</u/br/latour/TMVA/reader> was used as the working directory.
Started at Mon Aug 21 08:52:09 2006
Results reported at Mon Aug 21 08:52:16 2006

Your job looked like:

LSBATCH: User input


Successfully completed.

Resource usage summary:

CPU time   :      1.38 sec.
Max Memory :         1 MB
Max Swap   :         4 MB

Max Processes  :         1
Max Threads    :         1

The output (if any) is above this job summary.[/quote]

Has anyone any idea what the problem can be, and what I can do to be able to get this job completed in batch?
Thanks in advance.


looks like Cint cannot write to /output/Fisher.dat on your batch nodes. I’ll make it write an error msg instead of crashing…

Cheers, Axel.