cygwin+python+MG5=mess

Asked by Gabriele Ferretti on 2011-07-31

Hi, this is a "dumb theorist" problem, but I can't fix it by myself...
I put it under "questions" and not "bugs" because it is probably a compatibility issue with cygwin but I still would like to solve it.
If it is too complicated for a string theorist, just say so and I'll try installing a virtualbox :)
I need to run MG5 on cygwin and I get as far as generating a test run using the tutorial but when I try
"output MY_FIRTS_MG5_RUN" here is what I get:

INFO: initialize a new directory: MY_FIRST_MG5_RUN
INFO: remove old information in MY_FIRST_MG5_RUN
1180053052 [main] python 2456 C:\cygwin\bin\python.exe: *** fatal error - unable to remap \\?\C:\cygwin\lib\python2.6\lib-dynload\select.dll to same address as parent: 0x330000 != 0x380000
Stack trace:
Frame Function Args
00289AC8 6102796B (00289AC8, 00000000, 00000000, 00000000)
00289DB8 6102796B (6117EC60, 00008000, 00000000, 61180977)
0028ADE8 61004F1B (611A7FAC, 61249104, 00330000, 00380000)
End of stack trace
1180058814 [main] python 1288 fork: child 2456 - died waiting for dll loading, errno 11
Command "output MY_FIRST_MG5_RUN" interrupted with error:
MadGraph5Error : Failed to clean correctly MY_FIRST_MG5_RUN:
         [Errno 11] Resource temporarily unavailable
Please report this bug on https://bugs.launchpad.net/madgraph5
More information is found in 'MG5_debug'.
Please attach this file to your report.

I now add the file MG5_debug:

#************************************************************
#* MadGraph 5 *
#* *
#* * * *
#* * * * * *
#* * * * * 5 * * * * *
#* * * * * *
#* * * *
#* *
#* *
#* VERSION 1.3.8 2011-07-25 *
#* *
#* The MadGraph Development Team - Please visit us at *
#* https://server06.fynu.ucl.ac.be/projects/madgraph *
#* *
#************************************************************
#* *
#* Command File for MadGraph 5 *
#* *
#* run as ./bin/mg5 filename *
#* *
#************************************************************
import model sm
tutorial
tutorial
generate p p > t t~
output MY_FIRST_MG5_RUN
Traceback (most recent call last):
  File "/home/MadGraph5_v1_3_8/madgraph/interface/extended_cmd.py", line 151, in onecmd
    return cmd.Cmd.onecmd(self, line)
  File "/usr/lib/python2.6/cmd.py", line 219, in onecmd
    return func(arg)
  File "/home/MadGraph5_v1_3_8/madgraph/interface/cmd_interface.py", line 2739, in do_output
    self._curr_exporter.copy_v4template()
  File "/home/MadGraph5_v1_3_8/madgraph/iolibs/export_v4.py", line 1897, in copy_v4template
    super(ProcessExporterFortranME, self).copy_v4template()
  File "/home/MadGraph5_v1_3_8/madgraph/iolibs/export_v4.py", line 113, in copy_v4template
    % (os.path.basename(self.dir_path),why))
MadGraph5Error: Failed to clean correctly MY_FIRST_MG5_RUN:
 [Errno 11] Resource temporarily unavailable
-------------------------------

One thing I know is that my python2.6.5 is working fine, other than that I am at a loss. MG/ME version 4 works fine too.

Cheers
Gabriele

Question information

Language:
English Edit question
Status:
Answered
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Last query:
2011-08-03
Last reply:
2011-08-03
Johan Alwall (johan-alwall) said : #1

Hello Gabriele,

It seems that problematic point is at the calling of the bash script clean_template. Is it possible that bash scripts don't work well with cygwin? What happens if you try to call a bash script directly? You can try with a simple test script:

cat > test.sh <<EOF
#!/bin/bash
ls
EOF
chmod +x test.sh
./test.sh

If this doesn't work, then the problem is the bash installation.

All the best,
Johan

Gabriele Ferretti (ferretti-o) said : #2

Hi Johan,

thanks for your time. The bash seems to work fine.
I tried your script and I get the list of my files (that was the point, right? Thanks for not writing rm * :) )

A further hint: MadGraph5_v1_3_6 was giving me a similar problem already at the stage ./bin/MG5
That disappeared in MadGraph5_v1_3_8.

Best
Gabriele

This is the error in MadGraph5_v1_3_6
-----------------
$ ./bin/MG5
      0 [main] python 4508 C:\cygwin\bin\python.exe: *** fatal error - unable to remap \\?\C:\cygwin\lib\python2.6\lib-dynload\time.dll to same address as parent: 0x3A0000 != 0x3D0000
Stack trace:
Frame Function Args
0028A9E8 6102796B (0028A9E8, 00000000, 00000000, 00000000)
0028ACD8 6102796B (6117EC60, 00008000, 00000000, 61180977)
0028BD08 61004F1B (611A7FAC, 61249C8C, 003A0000, 003D0000)
End of stack trace
      0 [main] python 4376 fork: child 4508 - died waiting for dll loading, errno 11
Traceback (most recent call last):
  File "./bin/MG5", line 58, in <module>
    subprocess.call([sys.executable] + ['-O'] + sys.argv)
  File "/usr/lib/python2.6/subprocess.py", line 480, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.6/subprocess.py", line 633, in __init__
    errread, errwrite)
  File "/usr/lib/python2.6/subprocess.py", line 1049, in _execute_child
    self.pid = os.fork()
OSError: [Errno 11] Resource temporarily unavailable
---------------

All the best
Gabriele

________________________________________
From: <email address hidden> [<email address hidden>] On Behalf Of Johan Alwall [<email address hidden>]
Sent: Monday, August 01, 2011 2:45 AM
To: Gabriele Ferretti
Subject: Re: [Question #166526]: cygwin+python+MG5=mess

Your question #166526 on MadGraph5 changed:
https://answers.launchpad.net/madgraph5/+question/166526

    Status: Open => Answered

Johan Alwall proposed the following answer:
Hello Gabriele,

It seems that problematic point is at the calling of the bash script
clean_template. Is it possible that bash scripts don't work well with
cygwin? What happens if you try to call a bash script directly? You can
try with a simple test script:

cat > test.sh <<EOF
#!/bin/bash
ls
EOF
chmod +x test.sh
./test.sh

If this doesn't work, then the problem is the bash installation.

All the best,
Johan

--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.launchpad.net/madgraph5/+question/166526/+confirm?answer_id=0

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.launchpad.net/madgraph5/+question/166526

You received this question notification because you asked the question.

Johan Alwall (johan-alwall) said : #3

Hello Gabriele,

In that case it seems to be an internal Python problem on cygwin. Since we are all running on Mac or Linux machines, we can't easily test your setup. Have you tried calling your test.sh script from Python using subprocess?

Perhaps try
cat > test.py <<EOF
import subprocess
subprocess.call(['test.sh'])
EOF
python test.py

and let us know if it works. If not, then the problem is the Python "subprocess" library, if it works, then I have no idea...

Best,
Johan

Gabriele Ferretti (ferretti-o) said : #4

Hi Johan,
thanks, yes indeed the problem is with Python. Now I am on vacation :) I'll try reinstalling it when I get back. I will probably just install a virtual machine, it seems more stable.
But thanks for your quick replies, you can close the issue.
Best
Gabriele
________________________________________
From: <email address hidden> [<email address hidden>] On Behalf Of Johan Alwall [<email address hidden>]
Sent: Wednesday, August 03, 2011 4:06 AM
To: Gabriele Ferretti
Subject: Re: [Question #166526]: cygwin+python+MG5=mess

Your question #166526 on MadGraph5 changed:
https://answers.launchpad.net/madgraph5/+question/166526

    Status: Open => Answered

Johan Alwall proposed the following answer:
Hello Gabriele,

In that case it seems to be an internal Python problem on cygwin. Since
we are all running on Mac or Linux machines, we can't easily test your
setup. Have you tried calling your test.sh script from Python using
subprocess?

Perhaps try
cat > test.py <<EOF
import subprocess
subprocess.call(['test.sh'])
EOF
python test.py

and let us know if it works. If not, then the problem is the Python
"subprocess" library, if it works, then I have no idea...

Best,
Johan

--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.launchpad.net/madgraph5/+question/166526/+confirm?answer_id=2

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.launchpad.net/madgraph5/+question/166526

You received this question notification because you asked the question.

Thanks for the question. If someone has the same issue or an idea. Please don't hesitate.

Cheers,

Olivier

Can you help with this problem?

Provide an answer of your own, or ask Gabriele Ferretti for more information if necessary.

To post a message you must log in.