Comment 1 for bug 1657615

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote : Re: [Bug 1657615] [NEW] Configuration writing to a read-only file system in 2.5.1

Hi Zach,

The problem is that at the first time the code is run at NLO (more exactly the first time a loop is requested) we check the status of the ninja package.
If that option is on default and not installed, then we ask a question on which set of program need to be installed to perform the reduction of the loop.

One potential solution would be to not ask the question at all if you do not have writeacces.
Can you test that? The patch is written at the end of the message.

A work around is to ensure that all the reduction tools that you do not want are set to None in the
$MADGRAPH_INSTALLATION_DIR/input/mg5_configuration.txt

Cheers,

Olivier

PS: I would strongly suggest to not use 2.5.1 since 2.5.2 contains a lot of important (but not critical) bug fixing. One of those is that some log file are HUGE in 2.5.1

=== modified file 'madgraph/interface/loop_interface.py'
--- madgraph/interface/loop_interface.py 2016-09-01 10:26:58 +0000
+++ madgraph/interface/loop_interface.py 2017-01-19 08:29:15 +0000
@@ -23,7 +23,7 @@
 import re

 import madgraph
-from madgraph import MG4DIR, MG5DIR, MadGraph5Error
+from madgraph import MG4DIR, MG5DIR, MadGraph5Error, ReadWrite
 import madgraph.interface.madgraph_interface as mg_interface
 import madgraph.interface.extended_cmd as cmd
 import madgraph.interface.launch_ext_program as launch_ext
@@ -500,6 +500,8 @@
         # Check if first time:
         if (opt['ninja'] is None) or (os.path.isfile(pjoin(MG5DIR, opt['ninja'],'libninja.a'))):
             return
+ if not ReadWrite:
+ return

         logger.info("First output using loop matrix-elements has been detected. Now asking for loop reduction:", '$MG:color:BLACK')
         to_install = self.ask('install', '0', ask_class=AskLoopInstaller, timeout=300,

> On Jan 19, 2017, at 02:26, Zachary Marshall <email address hidden> wrote:
>
> Public bug reported:
>
> Hello,
>
> In 2.5.1, we can run:
>
> $MADGRAPH_INSTALLATION_DIR/bin/mg5_aMC
>
> generate p p > t t~ [QCD]
> output
>
> where the installation directory is on a read-only file system, but
> `pwd` is read/write (e.g. a scratch area or tmp directory). This now
> asks about which programs to install, and then attempts two write a
> configuration file back to the read-only area:
>
> set golem ''
> save options --auto
> save configuration file to
> /cvmfs/atlas.cern.ch/repo/sw/software/x86_64-slc6-gcc47-opt/19.2.5/sw/lcg/external/MCGenerators_lcgcmt67c/madgraph5amc/2.5.1.atlas/x86_64-slc6-gcc47-opt/input/mg5_configuration.txt
> Command "output tt" interrupted with error:
> IOError : [Errno 30] Read-only file system:
> '/cvmfs/atlas.cern.ch/repo/sw/software/x86_64-slc6-gcc47-opt/19.2.5/sw/lcg/external/MCGenerators_lcgcmt67c/madgraph5amc/2.5.1.atlas/x86_64-slc6-gcc47-opt/input/mg5_configuration.txt'
>
> I believe this is because of a change in
>
> madgraph/interface/extended_cmd.py
>
> which now tries to save a configuration file via the write_configuration
> function when you try to do almost anything. I think, since we have the
> dependencies set to save locally, the correct behavior would be to make
> a locally directory and write there (or simply not update the config
> card at all).
>
> Thanks,
> Zach
>
> ** Affects: mg5amcnlo
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to
> MadGraph5_aMC@NLO.
> https://bugs.launchpad.net/bugs/1657615
>
> Title:
> Configuration writing to a read-only file system in 2.5.1
>
> Status in MadGraph5_aMC@NLO:
> New
>
> Bug description:
> Hello,
>
> In 2.5.1, we can run:
>
> $MADGRAPH_INSTALLATION_DIR/bin/mg5_aMC
>
> generate p p > t t~ [QCD]
> output
>
> where the installation directory is on a read-only file system, but
> `pwd` is read/write (e.g. a scratch area or tmp directory). This now
> asks about which programs to install, and then attempts two write a
> configuration file back to the read-only area:
>
> set golem ''
> save options --auto
> save configuration file to
> /cvmfs/atlas.cern.ch/repo/sw/software/x86_64-slc6-gcc47-opt/19.2.5/sw/lcg/external/MCGenerators_lcgcmt67c/madgraph5amc/2.5.1.atlas/x86_64-slc6-gcc47-opt/input/mg5_configuration.txt
> Command "output tt" interrupted with error:
> IOError : [Errno 30] Read-only file system:
> '/cvmfs/atlas.cern.ch/repo/sw/software/x86_64-slc6-gcc47-opt/19.2.5/sw/lcg/external/MCGenerators_lcgcmt67c/madgraph5amc/2.5.1.atlas/x86_64-slc6-gcc47-opt/input/mg5_configuration.txt'
>
> I believe this is because of a change in
>
> madgraph/interface/extended_cmd.py
>
> which now tries to save a configuration file via the
> write_configuration function when you try to do almost anything. I
> think, since we have the dependencies set to save locally, the correct
> behavior would be to make a locally directory and write there (or
> simply not update the config card at all).
>
> Thanks,
> Zach
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mg5amcnlo/+bug/1657615/+subscriptions