stanford-ppl / spatial

Spatial: "Specify Parameterized Accelerators Through Inordinately Abstract Language"
https://spatial.stanford.edu
MIT License
274 stars 32 forks source link

Mysterious ISL Issue #162

Closed mattfel1 closed 5 years ago

mattfel1 commented 5 years ago

Seen it in a few places now but have no idea how to reproduce it:

[info] Pass: MemoryAnalyzer
[bug] An exception was encountered while compiling Test:
[bug]   Stream closed
[bug]   java.io.IOException: Stream closed
[bug]   java.lang.ProcessBuilder$NullOutputStream.write(ProcessBuilder.java:433)
[bug]   java.io.OutputStream.write(OutputStream.java:116)
[bug]   java.iw.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
[bug]   java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
[bug]   sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:297)
[bug]   sun.niw.cs.StreamEncoder.flush(StreamEncoder.java:141)
[bug]   java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
[bug]   java.io.BufferedWriter.flush(BufferedWriter.java:254)
[bug]   utils.process.BackgroundProcess.send(BackgroundProcess.scala:16)
[bug]   poly.ISL.isEmpty(ISL.scala:115)
[bug]   poly.ISL.isEmpty$(ISL.scala:112)
[bug]   spatial.Spatial$SpatialISL.isEmpty(Spatial.scala:36)
[bug]   poly.ISL.nonEmpty(ISL.scala:110)
[bug]   poly.CSL.nonEmpty$(ISL.scala:110)
[bug]   spatial.Spatial$SpatialISL.nonEmpty(Spatial.scala:36)
[bug]   poly.ISL.overlapsAddress(ISL.scala:130)
[bug]   poly.TSL.overlapsAddress$(ISL.scala:128)
[bug]   spatial.Spatial$SpatialISL.overlapsAddress(Spatial.scala:36)
 bug]   spatial.metadata.access.AccessMatrix.overlapsAddress(AffineData.scala:38)
 bug]   spatial.traversal.banking.MemoryConfigurer.accessesConflict(MemoryConfigurer.scala:515)
[bug]  .. [see /armadillo/users/ctimothy/fpga-grazelle/spatial-quickstart/logs/Test/Test_exception.log]
 bug] This is due to a compiler bug. A log file has been created at:
 bug]   /armadillo/users/ctimothy/fpga-grazelle/spatial-quickstart/logs/Test/Test_exception.log
[warn] 1 warning found
[failed] Total time: 1.8860 seconds
dkoeplin commented 5 years ago

Just ran into this as well. I'm not sure why the external process is shutting down, but gonna try a workaround to just reopen it when this happens

mattfel1 commented 5 years ago

Yay! Students have seen this on corn and on their own computers but I've never been able to reproduce it anywhere, even when I installed on corn myself.

dkoeplin commented 5 years ago

Scratch that.. looks like the issue I was seeing was a simple binary incompatibility issue, just had to recompile emptiness. If a student sees that issue again, try changing BackgroundProcess.scala to include:

  def send(line: String): Unit = {
    if (p eq null) run()
    try {
      writer.write(line + "\n")
      writer.flush()
    }
    catch {case _:Throwable =>
      checkErrors()
    }
  }

Hopefully this'll give a slightly more useful error message as to why the process closed.