I have made modification on batch mode and daemon mode at rev.1129, 1136 and 1137.
The difference of daemon and batch mode is written in ROME homepage
http://midas.psi.ch/rome/usersGuide.html#fwcommandline
You can disable all graphics with -ng option explicitly. And when ROME failed to open display, it goes into
no graphics mode automatically.
Please try. And please report when you still have a problem.
> (sorry for top-reply- I am trying to avoid elcode garbling my answer)
>
> In the past, I have seen problems like yours, there are at least two issues:
>
> 1) "non interactive" ROOT running from cron or some other incomplete user
> environment (no DISPLAY, no tty, no user)- a hello world script runs, but large
> app does not, because some silly class somewhere requires an X11 connection. I
> once had to fake it by running Xvnc and telling the cron jobs to use it as a
> DISPLAY. I know ROOT now have a "dummy" graphics module exactly for this
> purpose. I do not know how to activate it from the Rome environement, but I am
> sure it is documented somewhere on the ROOT web site.
>
> 2) some programs coming from the MIDAS family assume existance of a keyboard and
> display. Sometimes they can be faked by using "program < /dev/null", sometimes
> not, I do not know what Rome does.
>
> K.O.
>
>
> [quote="Todd Bredeweg"]I would like to use a bash script run from cron to
> analyze new midas event files automatically. Below is an abbreviated example
> script to test the way ROOT and ROME handle true batch mode
>
> [CODE]
> #! /bin/bash
>
> BASEDIR=/data/0/PostRunQA # Base directory for output files
> ROMEDIR=${BASEDIR}/dance-rome # Location of danceanalyzer
>
> NRUN=7581
> ROMECFG="romeConfig_Continuous.xml";
>
> # Set PATH and LD_LIBRARY_PATH for correct versions of ...
> # This also sets up the *SYS variables
> source /opt/wnr/new/bin/newVersion --new root rome wnr
>
> cd ${ROMEDIR};
>
> # Check that ROOT works correctly
> echo " Running ROOT batch mode test ";
> root -b -q ../jmodScript.C
>
> # Check that ROME works correctly
> echo " Running danceanalyzer batch mode test ";
> ./danceanalyzer.exe -b -ns -q -i ${ROMECFG} -r ${NRUN}
> [/CODE]
>
> The results for the ROOT section are the same when the script is run from the
> command line (full interactive environment) or when using at or crontab
> (non-interactive).
>
> [CODE]
> Running ROOT batch mode test
> *******************************************
> * *
> * W E L C O M E to R O O T *
> * *
> * Version 5.10/00 1 March 2006 *
> * *
> * You are welcome to visit our Web site *
> * http://root.cern.ch *
> * *
> *******************************************
>
>
> Compiled on 3 April 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 { }.
> Executing rootlogon.C (31-MAY-2006)... Finished setup
>
>
> Processing ../jmodScript.C...
> hello world
> This is the end of ROOT -- Goodbye
> [/CODE]
>
> jmodScript.C is merely a classic "hello world" script. The ROME test, on the
> other hand, returns quite different results for the two cases. When run from the
> command line it works as expected
>
> [CODE]
> ...
> Running danceanalyzer batch mode test
> Executing rootlogon.C (31-MAY-2006)... Finished setup
> reading configuration from romeConfig_Continuous.xml
> [bredeweg@enlil PostRunQA]$
> [/CODE]
>
> but when run from at or crontab we get
>
> [CODE] Running danceanalyzer batch mode test
> Executing rootlogon.C (31-MAY-2006)... Finished setup
>
>
> *** Break *** segmentation violation
> Generating stack trace...
> 0x081ec18b in main + 0x21b from ./danceanalyzer.exe
> 0x0734678a in __libc_start_main + 0xda from /lib/tls/libc.so.6
> 0x080dcd31 in TFile::TFile(char const*, char const*, char const*, int) + 0x51
> from ./danceanalyzer.exe
> /bin/bash: line 22: 28096 Aborted ./danceanalyzer.exe -b -ns -q
> -i ${ROMECFG} -r ${NRUN}[/CODE]
>
> One question that we have been unable to answer as yet is whether rome is
> requiring a real TTY, which I do not believe is provided by cron.
>
> We are using the following setup:
> Redhat Enterprise Linux v3
> ROOT v5.10.00
> ROME RELEASE_2_4_R1004
>
> I can provide additional information if needed.
>
> Thanks in advance.
>
> tab[/quote] |