No such file or directory: '.current_run.csv'
Open-Source Framework for Distributed Constraint Optimization (DCOP)
Brought to you by:
radsz,
thomasleaute
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:
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.
Best,
Thomas
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.
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.
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:
with the following instead:
I got an error message saying
NameError: global name 'myJavaParams' is not defined
I have put the required lib files in the \lib folder.
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.
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.