RE: running root at background without display or supressing plots

From: Nevzat Guler <nguler_at_jlab.org>
Date: Sun, 17 Jun 2007 00:24:23 -0400 (EDT)

	Hello,
	Sorry for not replying sooner. Meanwhile I solved my problem about
batch mode. The cause of the problem was while producing some gif files, it was crashing.. I solved the problem by using:
      if (gROOT->IsBatch())
        {
          el_c1->Print("temp.eps");
          gSystem->Exec("pstopnm -ppm -xborder 0 -yborder 0 -portrait temp.eps");
          char tempCommand[200];
          sprintf(tempCommand,"ppmtogif temp.eps001.ppm > %s",elName_th);
          gSystem->Exec(tempCommand);
        }
      else
        {
          el_c1->Print(elName_th);
        }

my root version is:
Version 5.14/00e

The interesting point is some gif files don't require this conversion but some does.. But for now, I am happy with my temporary solution right now.

I could not run the debuggers you told me on my program yet.. I will try to do that later for curiosity to find out the main cause as soon as I am more free from other jobs..

Thank you for now..

                                Nevzat Guler

On Wed, 13 Jun 2007, Fine, Valeri wrote:

> Hello Nevzat,
>
>
> > Hi,
> > I don't actually see TCanvas with -b option. But I get
> > segmentation violation.
>
> This is another story, isn't it ?
>
> > I tracked the segmentation violation to a place where I create some gif
> > files, el_c1->Print(el_name);
>
> You did not specify your ROOT version yet.
> Please do not use the private mail, reply to the list you sent your original message to. Other people are investigating your issue too and they will want to see the extra information also.
>
> If that is "segmentation fault" then you can start your application under "gdb" and send use the call stack to show where the problem occurs. Another tool to apply is "valgrind". Can you run your root session under "valgrind" and send us the log file.
>
> Thank you, Valeri
>
> --------------------
> when i disable those print statements, it works fine. Even if I have
> similar print statements along the way, they don't create any problem..
> The program is a bit long, I tried to write a simple version to reproduce
> the problem but the simple version worked fine..
>
> I will work on it for a while, I am now thinking it might not be related
> to batch mode even if it appears only in batch mode...
> Now at least i know -b option better.
>
> And, gROOT->SetBatch(kTRUE); does not set to batch mode if I dont use -b
> option. And if I use -b option, I don't need gROOT->SetBatch(kTRUE);
> So looks like gROOT->SetBatch(kTRUE); is not doing useful or I am using it
> wrong..
>
> Thanks for your time,
>
> Nevzat Guler
>
> On Tue, 12 Jun 2007, Fine, Valeri wrote:
>
> > As soon as you apply "-b" option you should see no TCanvas
> > ... But you did see it.
> > This means there is some crucial detail you missed to report and one can
> > not guess yet ...
> >
> > So if you want the assistance you need to provide the "technical"
> > information rather the narrative description of what you saw. I need to
> > know what you missed. One needs to see the hardcopy of your session.
> > One needs to know the ROOT version your are working with, may be other
> > details too.
> >
> >
> > Best Regards
> > Valeri Fine
> > ---------------
> > Brookhaven National Laboratory
> > Upton, NY 11973, USA
> > Phone: +1 631 344 7806
> > Fax: +1 631 344 4206
> > E-mail: fine_at_bnl.gov
> >
> > > -----Original Message-----
> > > From: Nevzat Guler [mailto:nguler_at_jlab.org]
> > > Sent: Tuesday, June 12, 2007 9:37 PM
> > > To: Fine, Valeri
> > > Subject: RE: [ROOT] running root at background without display or
> > > supressing plots
> > >
> > >
> > > I am running my C++ script in root. That's all. Nothing
> > > complicated. I create TCanvases and save them as .gif files. New
> > canvases
> > > continuously pop up on my screen because I plot hunderds of graphs. I
> > am
> > > creating new TCanvas whithin some loop. One thing, I could create the
> > > canvas
> > > before entering the loop which will prevent some of the graphs to pop
> > up
> > > continuously but I am wondering if there is a way to make all the
> > > proccesses at the background without using the display or to prevent
> > the
> > > canvas from poping up to the screen..?
> > > Thanks,
> > >
> > > Nevzat Guler
> > >
> > > On Tue, 12 Jun 2007, Fine, Valeri wrote:
> > >
> > > > Hello Nevzat,
> > > >
> > > > Can you elaborate a little bit more?
> > > >
> > > > Are you really running "root.exe" executable or your are speaking
> > about
> > > > your own application you built yourself. Some log file of your
> > session
> > > > would be appreciated also.
> > > >
> > > > Best Regards
> > > > Valeri Fine
> > > > ---------------
> > > > Brookhaven National Laboratory
> > > > Upton, NY 11973, USA
> > > > Phone: +1 631 344 7806
> > > > Fax: +1 631 344 4206
> > > > E-mail: fine_at_bnl.gov
> > > >
> > > > > -----Original Message-----
> > > > > From: owner-roottalk_at_pcroot.cern.ch
> > > > [mailto:owner-roottalk_at_pcroot.cern.ch]
> > > > > On Behalf Of Nevzat Guler
> > > > > Sent: Tuesday, June 12, 2007 7:25 PM
> > > > > To: Root Group
> > > > > Subject: [ROOT] running root at background without display or
> > > > supressing
> > > > > plots
> > > > >
> > > > >
> > > > > Hello,
> > > > > Is there a way to run root at background without any graphs
> > > > being
> > > > > poped up on the display?
> > > > > Main reason I want this is that I am plotting hundreds of graphs
> > > > > and it takes time, during the process therefore I cannot do other
> > > > things
> > > > > because new graph windows keep poping up pushing the other
> > terminals i
> > > > > am working to back... So, supressing the plots to back can
> > > > > also help me if there is an easy way for that. But if there is a
> > way
> > > > to
> > > > > run programs without using the display at all, that would be great
> > > > because
> > > > > then I can run programs without X window.. and it might even run
> > > > faster
> > > > > where internet connections are slow..
> > > > >
> > > > > I tried "-b" option, did not work for me. I also tried "unsetenv
> > > > DISPLAY"
> > > > > it gives me : *** Break *** segmentation violation
> > > > >
> > > > > My codes are set in such a way that I need to load it with .L
> > before
> > > > > running the subroutine because I need to pass arguments to
> > > > subroutines..
> > > > >
> > > > > Thanks in advance for any suggestion..
> > > > >
> > > > >
> > > > > Nevzat Guler
> > > >
> > > >
> > > >
> >
> >
>
>
>
Received on Sun Jun 17 2007 - 06:24:32 CEST

This archive was generated by hypermail 2.2.0 : Sun Jun 17 2007 - 23:50:01 CEST