Weird error message

Hi,

I did some small changes in my (until now) working ROOT macro, but afterwards I get the following error message:

Processing trkComparison_TIFNote.C…
Error: Unexpected EOF G__exec_statement() trkComparison_TIFNote.C:388:
Advice: You may need to use +P or -p option
*** Interpreter error recovered ***

No idea what that means, and undoing the changes also doesn’t help. How can I find the problem?? I’m working with ROOT 5.14/00b.

Cheers,
Carsten

Hi,

your script misses a bracket or something similar. Try to compile it (.L trkComparison_TIFNote.C+) and the compiler will give you a more decent error message. Btw, the message is a lot more informative in the most recent ROOT versions :slight_smile:

Cheers, Axel.

Hi,
sometimes and without any reason my macros give me the following error:

Error: Unexpected EOF G__exec_statement() /afs/cern.ch/na48/user/bifani/na48_2/macro/macro.C:240:
Advice: You may need to use +P or -p option

I tried to compile them with .L macro.C but no error comes out. Actually I’m not surprised because all of them are ok (running a second time, no error appears).

How can I understand what is going on?
What are the +P and -p options?

Cheers,
s.

As already indicated by Axel, somewhere in your code you have a missing bracket or parenthesis.
Do: .L macro.C+
Notice the “+” at the end. Your macro will be compiled by the native compiler and a better error message will tell you at which line/statement you have a problem.

Rene

A very strange feature of this “+” option is that the compiler reports error also for “cout”, “endl” and “TH1D” statements:

/afs/cern.ch/na48/user/bifani/na48_2/macro/path.C:117: error: `cout’ was not declared in this scope

Btw… Do you know why this kind of errors doesn’t show up everytime I use the macro? They only appear for random LSF jobs and never for interactive executions.

s.

I suspect your batch jobs have some problem to access the /tmp folder.
Cint needs to create some temporary files there. For example, lack of the disk space or write privilege on certain node may entail the problem you complain about

Can you test that?

How many problems are we discussing?
Are you telling us that your macro “path.C” shows the same problem as your “trkComparison_TIFNote.C” and “macro.C”?

I can add an “ls -ltr /tmp/bifani” in my script and wait for the next job to crash :slight_smile:

s.

[quote=“bifani”]A very strange feature of this “+” option is that the compiler reports error also for “cout”, “endl” and “TH1D” statements:
. . .
/afs/cern.ch/na48/user/bifani/na48_2/macro/path.C:117: error: `cout’ was not declared in this scope
. . .
s.[/quote]You are adviced to provide all C++ header files needed to compile your code with the native compiler.
Do something like this:

[code]#ifndef CINT

include “TCanvas.h”

include "Riostream.h

include "TH1.h

include

… etc
#endif

void syst(string path, string run, string var, Int_t nstep, Int_t step) {[/code]Can you show us your batch script or any other information to reproduce your troubles?

[quote=“bifani”]I can add an “ls -ltr /tmp/bifani” in my script and wait for the next job to crash :slight_smile:

s.[/quote] :confused: You should try touch /tmp/bifani/testaccessto make sure you are given the “write access” and df /tmp/bifani (see: en.wikipedia.org/wiki/Df_%28Unix%29 )

As far as I can see no LSF machines have the /tmp/user dir. Adding the following lines to my script:

df /tmp/bifani/
touch /tmp/bifani/test
ls -ltr /tmp/bifani/

I always get an output like:

Working directory is </pool/lsf/bifani/68775> on <lxb6220.cern.ch>

df: /tmp/bifani/': No such file or directory touch: cannot touch/tmp/bifani/test’: No such file or directory
ls: /tmp/bifani/: No such file or directory

s.

Hi,

What was the result of compiling your script with ACliC (by adding the +) after you added the #include directive?

Philippe.