Menu

#50 No such file or directory: '.current_run.csv'

verified
closed-fixed
None
5
2014-05-04
2014-04-24
costa
No

I got an error message saying "IOError: [Errno 2] No such file or directory: '.current_run.csv'" when running experiment party_experiment.py. Hope you can look into this bug.

Discussion

  • costa

    costa - 2014-04-24

    more error messages are shown below
    /home/spade/Desktop/frodo2.11/frodo2/frodo2.jar/frodo2/benchmarks/frodo2.py in runAtDepth(depth, indent, genParams)
    212 needsHeader = not os.path.exists(output)
    213 outFile = open(output, "a+")
    --> 214 tmpFile = open(tmpFileName, "r")
    215 line = tmpFile.readline()
    216 if needsHeader:

     
  • Thomas B. Léauté

    Hi Costa,

    Just by looking at the Python code, I suspect that the only reason why Python would fail to find the file ".current_run.csv" is because the Java process failed to produce this file.

    Can you please provide more information to help me diagnose what is going on? I am unable to reproduce this error.

    • What are the exact steps that you followed to run the experiment?
    • What was output to the console before the error message?
    • What are your operating system, your Python version and your Java version?

    Best,

    Thomas

     
  • Thomas B. Léauté

    • status: open --> pending
    • assigned_to: Thomas B. Léauté
     
  • costa

    costa - 2014-04-28

    Hi Thomas

    I ran the experiment using Canopy. I opened the experiment file and clicked run button. I have given the frodo2.jar read/write permissions.

    The output before the error:
    %run /home/spade/Desktop/frodo2.11/frodo2/experiments/graph_coloring_experiment.py
    Run 1/7
    Picking 3 from [3, 4, 5, 6, 7, 8, 9, 10]
    Generating a problem instance using the following Java arguments:
    ['frodo2.benchmarks.graphcoloring.GraphColoring', '-i', '3', '0.4', '0.0', '3']
    15:24:26 Starting DPOP
    15:24:27 Starting P-DPOP
    15:24:27 Starting P3/2-DPOP
    15:24:27 Starting P2-DPOP
    15:24:27 Starting MPC-DisCSP4


    IOError Traceback (most recent call last)
    /home/spade/Canopy/appdata/canopy-1.3.0.1715.rh5-x86_64/lib/python2.7/site-packages/IPython/utils/py3compat.pyc in execfile(fname, where)
    202 else:
    203 filename = fname
    --> 204 builtin.execfile(filename,
    where)

    I am using java version "1.7.0_51", Enthought Canopy Python 2.7.6, and Ubuntu 13.10.

     
  • Thomas B. Léauté

    After installing Canopy, I am able to reproduce the problem. I can now start investigating and looking for a fix.

    In the mean time, you might want to try with a different Python distribution to see if it works better.

     
  • Thomas B. Léauté

    • Group: unverified --> verified
     
  • Thomas B. Léauté

    I have identified the source of the problem: I strongly suspect that the JVM is prematurely exiting before the point where it is supposed to create the file .current_run.csv. The problem is that the errors that the JVM might be outputting are not being displayed, so you have no clue that the JVM is prematurely terminating and why.

    Possible reasons for premature termination could include an incomplete FRODO installation: have you properly downloaded the required JAR dependencies and saved them inside the lib/ folder?

    In order to display the errors output by the JVM, you could patch frodo2.py, replacing the following two lines of code:

    :::python
                javaProcess = subprocess.Popen([java] + myJavaParams + [algo[1]] + algo[0:4] + [str(timeout), tmpFileName], preexec_fn = ignoreInterruption)
                javaProcess.wait()
    

    with the following instead:

    :::python
                javaProcess = subprocess.Popen([java] + myJavaParams + [algo[1]] + algo[0:4] + [str(timeout), tmpFileName], preexec_fn = ignoreInterruption, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
                out, err = javaProcess.communicate()
                if err:
                    print(err)
    
     
  • costa

    costa - 2014-04-30

    I got an error message saying
    NameError: global name 'myJavaParams' is not defined

    I have put the required lib files in the \lib folder.

     
  • Thomas B. Léauté

    I suspect you messed up the indentation when you copied and pasted the lines above into frodo2.py to attempt to patch it. Make sure that there is exactly the same number of spaces (12) before each of these lines as before the previous and following lines, as illustrated below.

    :::python
                # Run the algorithm
                print(indent + time.strftime("%H:%M:%S", time.localtime()) + " Starting " + algo[0])
                javaProcess = subprocess.Popen([java] + myJavaParams + [algo[1]] + algo[0:4] + [str(timeout), tmpFileName], preexec_fn = ignoreInterruption, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
                out, err = javaProcess.communicate()
                if err:
                    print(err)
                javaProcess = None
    
     
  • Thomas B. Léauté

    • status: pending --> closed-fixed
     
  • Thomas B. Léauté

    The newly released version 2.11.2 addresses this problem by displaying the Java error messages when launched from Canopy, and by more elegantly exiting when the file '.current_run.csv' is not found.

     

Log in to post a comment.

Monday.com Logo