Error in <TRint::ProcessLine>

Hi,

Kindly i need to understand the below error and how to fix it.

I am trying to compile and run my macro.

Appreciate your help.

thanks,

Mai

[melsawy@lxplus013 test]$ root -l
root [0] .L Monopole_Anaylsis.C
Error in TRint::ProcessLine: macro Monopole_Anaylsis.C not found in path .:/cvmfs/cms.cern.ch/slc6_amd64_gcc530/lcg/root/6.06.00-ikhhed6/macros:

Hi,

the error message states that the file you are trying to load does not exist in the following directories:

  • .
  • /cvmfs/cms.cern.ch/slc6_amd64_gcc530/lcg/root/6.06.00-ikhhed6/macros
    which are the default ones. Thus either cd to the directory where Monopole_Analysis.C is located or specify the full path.

Cheers,
D

Hi,

My working directory path where my macro is located is : /afs/cern.ch/user/m/melsawy/Work/private/Monopole_June2017/CMSSW_8_0_28_patch1/src/Monopoles/MonoAnalysis/test

could you please clarify more what i should do…

thanks,

Mai

Hi Mai,

assuming you set up the CMSSW environment correctly, what happens if you do

root -l
root [0] .L ./Monopole_Anaylsis.C

Cheers,
D

[melsawy@lxplus014 test]$ cmsenv
[melsawy@lxplus014 test]$ root -l
root [0] .L ./Monopole_Anaylsis.C
Error in TRint::ProcessLine: macro ./Monopole_Anaylsis.C not found in path .:/cvmfs/cms.cern.ch/slc6_amd64_gcc530/lcg/root/6.06.00-ikhhed6/macros:

Hi,

this is very odd.
Are you sure that the file is indeed there (try a .x ls before the .L line)?
Can you make sure you can execute and/or load any other macro (in the same directory)?

Cheers,
D

Yes .X is working with me but .L not

[melsawy@lxplus087 test]$ root -l
root [0] .X Monopole_Analysis.C
(Monopole_Analysis) @0x3c0ca30
root [1] .L Monopole_Anaylsis.C
Error in TRint::ProcessLine: macro Monopole_Anaylsis.C not found in path .:/cvmfs/cms.cern.ch/slc6_amd64_gcc530/lcg/root/6.06.00-ikhhed6/macros:
root [2] .q

Hi,

this is really odd.
What happens if you load programmatically the macro with

gROOT->LoadMacro("./Monopole_Anaylsis.C");

https://root.cern.ch/doc/master/classTROOT.html#af6d203ee0ef1a6c82faee8dc2a4b0260

Cheers,
D

Hi,

I try to put my macro and input file at my desktop and i have executed the macro without errors but when i add extra part in the macro i got the below error when i make m.Loop() ,

It just so simple macro to plot histograms…
p.s. i tried to re run the macro again at my lxplus area but i had the same error as before.

root [3] m.Loop()

*** Break *** segmentation violation
Generating stack trace…
0x000000010fdcaf8d in G__getvariable (in libCint.so) + 8093
0x000000010fcc0d63 in G__getitem (in libCint.so) + 483
0x000000010fcbc739 in G__getexpr (in libCint.so) + 31033
0x000000010fcc2bf6 in G__test (in libCint.so) + 38
0x000000010fd41a48 in G__exec_loop(char const*, char*, std::__1::list<G__FastAllocString, std::__1::allocator<G__FastAllocString> > const&) (in libCint.so) + 488
0x000000010fd38c72 in G__exec_statement (in libCint.so) + 13442
0x000000010fd41c29 in G__exec_loop(char const*, char*, std::__1::list<G__FastAllocString, std::__1::allocator<G__FastAllocString> > const&) (in libCint.so) + 969
0x000000010fd38c72 in G__exec_statement (in libCint.so) + 13442
0x000000010fce178b in G__interpret_func (in libCint.so) + 17019
0x000000010fcccdd9 in G__getfunction (in libCint.so) + 5705
0x000000010fdd479d in G__getstructmem(int, G__FastAllocString&, char*, int, char*, int*, G__var_array*, int) (in libCint.so) + 4237
0x000000010fdca142 in G__getvariable (in libCint.so) + 4434
0x000000010fcc0d63 in G__getitem (in libCint.so) + 483
0x000000010fcbc739 in G__getexpr (in libCint.so) + 31033
0x000000010fd399ab in G__exec_statement (in libCint.so) + 16827
0x000000010fca326d in G__exec_tempfile_core(char const*, __sFILE*) (in libCint.so) + 1133
0x000000010fca2df6 in G__exec_tempfile_fp (in libCint.so) + 22
0x000000010fd465d4 in G__process_cmd (in libCint.so) + 7236
0x000000010f58c589 in TCint::ProcessLine(char const*, TInterpreter::EErrorCode*) (in libCore.so) + 873
0x000000010f51c4a6 in TRint::HandleTermInput() (in libRint.so) + 678
0x000000010f5c5218 in TUnixSystem::CheckDescriptors() (in libCore.so) + 328
0x000000010f5ce1dd in TMacOSXSystem::DispatchOneEvent(bool) (in libCore.so) + 429
0x000000010f63754a in TSystem::InnerLoop() (in libCore.so) + 26
0x000000010f63739b in TSystem::Run() (in libCore.so) + 203
0x000000010f5d9ea4 in TApplication::Run(bool) (in libCore.so) + 36
0x000000010f51bdf5 in TRint::Run(bool) (in libRint.so) + 1429
0x000000010f2b1e8f in main (in root.exe) + 79
0x00007fff95f7e5ad in start (in libdyld.dylib) + 1
Root > Function Loop() busy flag cleared


My Macro

#define Monopole_Analysis_cxx
#include “Monopole_Analysis.h”
#include <TH2.h>
#include <TStyle.h>
#include <TCanvas.h>
#include <TH1.h>
#include “TChain.h”
#include “TROOT.h”
#include “TH1F.h”
#include “TFile.h”
#include “TH2F.h”
#include “TMath.h”
#include “TH1D.h”
#include “TH2D.h”

void Monopole_Analysis::Loop()
{
Long64_t nentries = fChain->GetEntries();

TFile *output=new TFile(“macro_output.root”,“recreate”);

TH1F* hist_f51_= new TH1F("hist_f51","",100,0,1.2);

TH2F* h2_NbHits_NbSatHits_ = new TH2F(“Sat_Tot”,"",100,0.0,30.0,100,0.0,1.0);

for (long int i=0;i<nentries; i++)
{
GetEntry(i);

for (unsigned int k=0;k<egClust_size->size();k++)
{

  
hist_f51_->Fill(egClust_frac51->at(k));


}

for (unsigned int j=0;j<Track_Hits->size();j++)
{

    float num = Track_SatSubHits ->at(j);
    float den = Track_SubHits->at(j);
    h2_NbHits_NbSatHits_->Fill(den,num/den);

}

}
hist_f51_->Draw();
h2_NbHits_NbSatHits_->Draw();

output->Write();

}

Hi,

here I think we are mixing too many things here. You have ROOT5 on your machine. Can you try to run your macro without CMSSW with the root version on cvmfs?

ssh lxplus7
. /cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.10.00/x86_64-centos7-gcc48-opt/root/bin/thisroot.sh

(as shown here https://root.cern.ch/content/release-61000)

Cheers,
D

I logged in with lxplus7 and below is the output … I am sorry i am a beginner so maybe i am missing something.

[melsawy@lxplus034 Monopole_June2017]$ . /cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.10.00/x86_64-centos7-gcc48-opt/root/bin/thisroot.sh
-bash: sed: No such file or directory
-bash: sed: No such file or directory
-bash: sed: No such file or directory
-bash: sed: No such file or directory
-bash: sed: No such file or directory
-bash: sed: No such file or directory
-bash: sed: No such file or directory
-bash: sed: No such file or directory
-bash: grep: command not found
-bash: grep: command not found
/usr/bin/env: bash: No such file or directory
[melsawy@lxplus034 Monopole_June2017]$ root -l
sh: ldd: command not found
root [0] .L Monopole_Anaylsis.C
Error in TRint::ProcessLine: macro Monopole_Anaylsis.C not found in path .:/cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.10.00/x86_64-centos7-gcc48-opt/root/macros

Hi,

I think something is fishy here: perhaps something in your environment?

[lxplus034 ~]$ . /cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.10.00/x86_64-centos7-gcc48-opt/root/bin/thisroot.sh
[lxplus034 ~]$  root -b -q
   ------------------------------------------------------------
  | Welcome to ROOT 6.10/00                http://root.cern.ch |
  |                               (c) 1995-2017, The ROOT Team |
  | Built for linuxx8664gcc                                    |
  | From tag v6-10-00, 13 June 2017                            |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
   ------------------------------------------------------------

Cheers,
D

Yes there is something not setting up correctly

[melsawy@lxplus010 ~]$ . /cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.10.00/x86_64-centos7-gcc48-opt/root/bin/thisroot.sh
/cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.10.00/x86_64-centos7-gcc48-opt/root/bin/root-config: line 24: dirname: command not found
readlink: missing operand
Try `readlink --help’ for more information.
/cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.10.00/x86_64-centos7-gcc48-opt/root/bin/root-config: line 42: dirname: command not found

Hi Mai,

I fear this is related to your setup. I can set up the software on the very same machine without problems. Do you have anything like a bashrc or something which is sourced automatically?

Cheers,
D

I am attaching .bashrc and .bash_profile files

.bashrc

User specific aliases and fu

Source global definitions

if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

User specific aliases and functions

#export ROOTSYS=/usr
#export PATH=$PATH:$ROOTSYS/bin
#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib
#export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$ROOTSYS/lib


.bash_profile

export LANG="C"
export LC_CTYPE="C"
export ROOTSYS=/usr
export PATH=$PATH:$ROOTSYS/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$ROOTSYS/lib
export LIBGL_ALWAYS_INDIRECT=1

Get the aliases and functions

if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

#dispdir=dirname $DISPLAY
#dispfile=basename $DISPLAY
#dispnew="$dispdir/:0"
#if [ -e $DISPLAY -a “$dispfile” = “org.x:0” ]; then

mv $DISPLAY $dispnew

#fi
#export DISPLAY=$dispnew

Source global definitions

#if [ -f /etc/bashrc ]; then

. /etc/bashrc

#fi

User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.