stanford-ppl / spatial

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

Use sbt to run app fails #201

Closed kumasento closed 5 years ago

kumasento commented 5 years ago

Hi,

This issue is possibly due to my misconfiguration, but when I was trying to run a SpatialApp in this codebase, e.g., HelloSpatial, through sbt there was an exception raised:

projects/spatial ‹master› » sbt
[info] Loading settings from idea.sbt ...
[info] Loading global plugins from /home/ruizhe/.sbt/1.0/plugins
[info] Loading settings from plugins.sbt ...
[info] Loading project definition from /home/ruizhe/projects/spatial/project
[info] Updating ProjectRef(uri("file:/home/ruizhe/projects/spatial/project/"), "spatial-build")...
[info] Done updating.
[info] Loading settings from build.sbt ...
[info] Set current project to spatial (in build file:/home/ruizhe/projects/spatial/)
[info] sbt server started at local:///home/ruizhe/.sbt/1.0/server/552e58e58d0e437d3363/sock
sbt:spatial> project apps
[info] Set current project to apps (in build file:/home/ruizhe/projects/spatial/)
sbt:apps> runMain HelloSpatial --sim
[info] Updating utils...
[info] Updating emul...
[info] Done updating.
[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn]  * org.scala-lang.modules:scala-xml_2.12:1.1.0 is selected over 1.0.6
[warn]      +- org.scala-lang:scala-compiler:2.12.6               (depends on 1.0.6)
[warn]      +- edu.stanford.cs.dawn:utils_2.12:1.1-SNAPSHOT       (depends on 1.0.6)
[warn]      +- org.scalatest:scalatest_2.12:3.0.5                 (depends on 1.0.6)
[warn] Run 'evicted' to see detailed eviction warnings
[info] Done updating.
[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn]  * org.scala-lang.modules:scala-xml_2.12:1.1.0 is selected over 1.0.6
[warn]      +- org.scala-lang:scala-compiler:2.12.6               (depends on 1.0.6)
[warn]      +- edu.stanford.cs.dawn:emul_2.12:1.1-SNAPSHOT        (depends on 1.0.6)
[warn]      +- org.scalatest:scalatest_2.12:3.0.5                 (depends on 1.0.6)
[warn] Run 'evicted' to see detailed eviction warnings
[info] Updating forge...
[info] Updating models...
[info] Updating poly...
[info] Done updating.
[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn]  * org.scala-lang.modules:scala-xml_2.12:1.1.0 is selected over 1.0.6
[warn]      +- org.scala-lang:scala-compiler:2.12.6               (depends on 1.0.6)
[warn]      +- edu.stanford.cs.dawn:forge_2.12:1.1-SNAPSHOT       (depends on 1.0.6)
[warn]      +- edu.stanford.cs.dawn:utils_2.12:1.1-SNAPSHOT       (depends on 1.0.6)
[warn]      +- org.scalatest:scalatest_2.12:3.0.5                 (depends on 1.0.6)
[warn] Run 'evicted' to see detailed eviction warnings
[info] Done updating.
[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn]  * org.scala-lang.modules:scala-xml_2.12:1.1.0 is selected over 1.0.6
[warn]      +- org.scala-lang:scala-compiler:2.12.6               (depends on 1.0.6)
[warn]      +- edu.stanford.cs.dawn:utils_2.12:1.1-SNAPSHOT       (depends on 1.0.6)
[warn]      +- edu.stanford.cs.dawn:poly_2.12:1.1-SNAPSHOT        (depends on 1.0.6)
[warn]      +- org.scalatest:scalatest_2.12:3.0.5                 (depends on 1.0.6)
[warn] Run 'evicted' to see detailed eviction warnings
[info] Done updating.
[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn]  * org.scala-lang.modules:scala-xml_2.12:1.1.0 is selected over 1.0.6
[warn]      +- edu.stanford.cs.dawn:models_2.12:1.1-SNAPSHOT      (depends on 1.0.6)
[warn]      +- org.scala-lang:scala-compiler:2.12.6               (depends on 1.0.6)
[warn]      +- edu.stanford.cs.dawn:utils_2.12:1.1-SNAPSHOT       (depends on 1.0.6)
[warn]      +- org.scalatest:scalatest_2.12:3.0.5                 (depends on 1.0.6)
[warn] Run 'evicted' to see detailed eviction warnings
[info] Updating argon...
[info] Done updating.
[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn]  * org.scala-lang.modules:scala-xml_2.12:1.1.0 is selected over 1.0.6
[warn]      +- edu.stanford.cs.dawn:forge_2.12:1.1-SNAPSHOT       (depends on 1.1.0)
[warn]      +- edu.stanford.cs.dawn:emul_2.12:1.1-SNAPSHOT        (depends on 1.1.0)
[warn]      +- org.scala-lang:scala-compiler:2.12.6               (depends on 1.0.6)
[warn]      +- edu.stanford.cs.dawn:utils_2.12:1.1-SNAPSHOT       (depends on 1.0.6)
[warn]      +- edu.stanford.cs.dawn:argon_2.12:1.1-SNAPSHOT       (depends on 1.0.6)
[warn]      +- org.scalatest:scalatest_2.12:3.0.5                 (depends on 1.0.6)
[warn] Run 'evicted' to see detailed eviction warnings
[info] Updating spatial...
[info] Done updating.
[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn]  * org.scala-lang.modules:scala-xml_2.12:1.1.0 is selected over 1.0.6
[warn]      +- edu.stanford.cs.dawn:models_2.12:1.1-SNAPSHOT      (depends on 1.1.0)
[warn]      +- edu.stanford.cs.dawn:poly_2.12:1.1-SNAPSHOT        (depends on 1.1.0)
[warn]      +- edu.stanford.cs.dawn:argon_2.12:1.1-SNAPSHOT       (depends on 1.1.0)
[warn]      +- edu.stanford.cs.dawn:emul_2.12:1.1-SNAPSHOT        (depends on 1.1.0)
[warn]      +- edu.stanford.cs.dawn:spatial_2.12:1.1-SNAPSHOT     (depends on 1.0.6)
[warn]      +- org.scala-lang:scala-compiler:2.12.6               (depends on 1.0.6)
[warn]      +- edu.stanford.cs.dawn:forge_2.12:1.1-SNAPSHOT       (depends on 1.0.6)
[warn]      +- edu.stanford.cs.dawn:utils_2.12:1.1-SNAPSHOT       (depends on 1.0.6)
[warn]      +- org.scalatest:scalatest_2.12:3.0.5                 (depends on 1.0.6)
[warn] Run 'evicted' to see detailed eviction warnings
[info] Updating ...
[info] Done updating.
[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn]  * org.scala-lang.modules:scala-xml_2.12:1.1.0 is selected over 1.0.6
[warn]      +- edu.stanford.cs.dawn:models_2.12:1.1-SNAPSHOT      (depends on 1.1.0)
[warn]      +- edu.stanford.cs.dawn:poly_2.12:1.1-SNAPSHOT        (depends on 1.1.0)
[warn]      +- edu.stanford.cs.dawn:argon_2.12:1.1-SNAPSHOT       (depends on 1.1.0)
[warn]      +- edu.stanford.cs.dawn:emul_2.12:1.1-SNAPSHOT        (depends on 1.1.0)
[warn]      +- edu.stanford.cs.dawn:spatial_2.12:1.1-SNAPSHOT     (depends on 1.0.6)
[warn]      +- org.scala-lang:scala-compiler:2.12.6               (depends on 1.0.6)
[warn]      +- edu.stanford.cs.dawn:forge_2.12:1.1-SNAPSHOT       (depends on 1.0.6)
[warn]      +- edu.stanford.cs.dawn:utils_2.12:1.1-SNAPSHOT       (depends on 1.0.6)
[warn]      +- org.scalatest:scalatest_2.12:3.0.5                 (depends on 1.0.6)
[warn]      +- edu.stanford.cs.dawn:apps_2.12:1.1-SNAPSHOT        (depends on 1.0.6)
[warn] Run 'evicted' to see detailed eviction warnings
[info] Compiling 27 Scala sources to /home/ruizhe/projects/spatial/utils/target/scala-2.12/classes ...
[info] Compiling 21 Scala sources to /home/ruizhe/projects/spatial/emul/target/scala-2.12/classes ...
[info] Done compiling.
[info] Packaging /home/ruizhe/projects/spatial/emul/target/scala-2.12/emul_2.12-1.1-SNAPSHOT.jar ...
[info] Done packaging.
[info] Done compiling.
[info] Compiling 22 Scala sources to /home/ruizhe/projects/spatial/forge/target/scala-2.12/classes ...
[info] Compiling 8 Scala sources to /home/ruizhe/projects/spatial/poly/target/scala-2.12/classes ...
[info] Packaging /home/ruizhe/projects/spatial/utils/target/scala-2.12/utils_2.12-1.1-SNAPSHOT.jar ...
[info] Compiling 12 Scala sources to /home/ruizhe/projects/spatial/models/target/scala-2.12/classes ...
[info] Done packaging.
[info] Done compiling.
[info] Packaging /home/ruizhe/projects/spatial/poly/target/scala-2.12/poly_2.12-1.1-SNAPSHOT.jar ...
[info] Done packaging.
[info] Done compiling.
[info] Packaging /home/ruizhe/projects/spatial/models/target/scala-2.12/models_2.12-1.1-SNAPSHOT.jar ...
[info] Done packaging.
[info] Done compiling.
[info] Packaging /home/ruizhe/projects/spatial/forge/target/scala-2.12/forge_2.12-1.1-SNAPSHOT.jar ...
[info] Compiling 93 Scala sources to /home/ruizhe/projects/spatial/argon/target/scala-2.12/classes ...
[info] Done packaging.
[info] Done compiling.
[info] Compiling 333 Scala sources to /home/ruizhe/projects/spatial/target/scala-2.12/classes ...
[info] Packaging /home/ruizhe/projects/spatial/argon/target/scala-2.12/argon_2.12-1.1-SNAPSHOT.jar ...
[info] Done packaging.
[info] Done compiling.
[info] Compiling 1 Scala source to /home/ruizhe/projects/spatial/apps/target/scala-2.12/classes ...
[info] Packaging /home/ruizhe/projects/spatial/target/scala-2.12/spatial_2.12-1.1-SNAPSHOT.jar ...
[info] Done packaging.
[info] Done compiling.
[warn] Multiple main classes detected.  Run 'show discoveredMainClasses' to see the list
[info] Packaging /home/ruizhe/projects/spatial/apps/target/scala-2.12/apps_2.12-1.1-SNAPSHOT.jar ...
[info] Done packaging.
[info] Running HelloSpatial --sim
[warn] No target specified. Specify target using: --fpga <device> or
[warn] override val target = <device>
[warn] Defaulting to 'Default' device.
[warn] Area model file Zynq_Area.csv for target Zynq was missing expected fields: 
[warn] BRAM
[info] Compiling HelloSpatial to /home/ruizhe/projects/spatial/gen/HelloSpatial/
Emptiness: true, /home/ruizhe/bin/emptiness
[warn] HelloSpatial.scala:40:36: sram5D is defined here but never read.
[warn]       val sram5D        = SRAM[Int](2,2,2,2,16)
[warn]                                    ^
[warn] HelloSpatial.scala:44:14: Write to memory sram5D is never used. Write will be removed.
[warn]       sram5D load dram5D // Load 5D tensor
[warn]              ^
[bug] An exception was encountered while compiling HelloSpatial: 
[bug]   java.lang.NullPointerException
[bug] This is due to a compiler bug. A log file has been created at: 
[bug]   /home/ruizhe/projects/spatial/logs/HelloSpatial/HelloSpatial_exception.log
[warn] 3 warnings found
[failed] Total time: 3.6450 seconds

Exception: sbt.TrapExitSecurityException thrown from the UncaughtExceptionHandler in thread "run-main-0"
[error] java.lang.RuntimeException: Nonzero exit code: 1
[error]     at sbt.Run$.executeTrapExit(Run.scala:124)
[error]     at sbt.Run.run(Run.scala:77)
[error]     at sbt.Defaults$.$anonfun$bgRunMainTask$6(Defaults.scala:1147)
[error]     at sbt.Defaults$.$anonfun$bgRunMainTask$6$adapted(Defaults.scala:1142)
[error]     at sbt.internal.BackgroundThreadPool.$anonfun$run$1(DefaultBackgroundJobService.scala:366)
[error]     at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
[error]     at scala.util.Try$.apply(Try.scala:209)
[error]     at sbt.internal.BackgroundThreadPool$BackgroundRunnable.run(DefaultBackgroundJobService.scala:289)
[error]     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error]     at java.lang.Thread.run(Thread.java:748)
[error] (Compile / runMain) Nonzero exit code: 1
[error] Total time: 139 s, completed 10-Apr-2019 17:21:36

But after I run make apps, everything turns out to be OK.

Is this an expected behaviour?

Thanks

mattfel1 commented 5 years ago

Can you try running again with --vv flag so I can see a little more context about the error? Also can you double check that it was able to compile emptiness properly? Try cd spatial/poly/resources && gcc emptiness.c -lisl

dkoeplin commented 5 years ago

Just throwing this out there, make apps includes a make install call which builds the ISL dependency. Possibly it's not catching the missing dependency properly there in a nice way.

mattfel1 commented 5 years ago

We actually moved the emptiness compilation to inside the ISL trait so that when we deployed the jars for quickstart, the emptiness executable would get created during normal app compilation rather than require someone to go fetch it from somewhere else. It is* also sensitive to the version of the executable (emptiness.c has changed once so far) and will recompile automatically if that ever changes. My guess is that the error here happens during that compilation

( * Just noticed the version check is still marked as todo, working on it now)

kumasento commented 5 years ago

Thanks for all your reply. Here I've collected more information based on your suggestions (including commands for reproduction):

git clone https://github.com/stanford-ppl/spatial
cd spatial
sbt "; project apps; runMain HelloSpatial --vv --sim"

Commit ID: 8cae8e4f22b25348561949f066e4840d80066fcd

Output:

[info] Loading settings from plugins.sbt ...
[info] Loading project definition from /mnt/ccnas2/bdp/rz3515/projects/sandbox/spatial/project
[info] Updating ProjectRef(uri("file:/mnt/ccnas2/bdp/rz3515/projects/sandbox/spatial/project/"), "spatial-build")...
[info] Done updating.
[info] Loading settings from build.sbt ...
[info] Set current project to spatial (in build file:/mnt/ccnas2/bdp/rz3515/projects/sandbox/spatial/)
[info] Set current project to apps (in build file:/mnt/ccnas2/bdp/rz3515/projects/sandbox/spatial/)
[info] Updating emul...
[info] Updating utils...
[info] Done updating.
[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn]  * org.scala-lang.modules:scala-xml_2.12:1.1.0 is selected over 1.0.6
[warn]      +- edu.stanford.cs.dawn:emul_2.12:1.1-SNAPSHOT        (depends on 1.1.0)
[warn]      +- org.scala-lang:scala-compiler:2.12.6               (depends on 1.0.6)
[warn]      +- org.scalatest:scalatest_2.12:3.0.5                 (depends on 1.0.6)
[warn] Run 'evicted' to see detailed eviction warnings
[info] Done updating.
[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn]  * org.scala-lang.modules:scala-xml_2.12:1.1.0 is selected over 1.0.6
[warn]      +- edu.stanford.cs.dawn:utils_2.12:1.1-SNAPSHOT       (depends on 1.1.0)
[warn]      +- org.scala-lang:scala-compiler:2.12.6               (depends on 1.0.6)
[warn]      +- org.scalatest:scalatest_2.12:3.0.5                 (depends on 1.0.6)
[warn] Run 'evicted' to see detailed eviction warnings
[info] Updating poly...
[info] Updating forge...
[info] Updating models...
[info] Done updating.
[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn]  * org.scala-lang.modules:scala-xml_2.12:1.1.0 is selected over 1.0.6
[warn]      +- edu.stanford.cs.dawn:utils_2.12:1.1-SNAPSHOT       (depends on 1.1.0)
[warn]      +- edu.stanford.cs.dawn:poly_2.12:1.1-SNAPSHOT        (depends on 1.1.0)
[warn]      +- org.scala-lang:scala-compiler:2.12.6               (depends on 1.0.6)
[warn]      +- org.scalatest:scalatest_2.12:3.0.5                 (depends on 1.0.6)
[warn] Run 'evicted' to see detailed eviction warnings
[info] Done updating.
[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn]  * org.scala-lang.modules:scala-xml_2.12:1.1.0 is selected over 1.0.6
[warn]      +- edu.stanford.cs.dawn:models_2.12:1.1-SNAPSHOT      (depends on 1.1.0)
[warn]      +- edu.stanford.cs.dawn:utils_2.12:1.1-SNAPSHOT       (depends on 1.1.0)
[warn]      +- org.scala-lang:scala-compiler:2.12.6               (depends on 1.0.6)
[warn]      +- org.scalatest:scalatest_2.12:3.0.5                 (depends on 1.0.6)
[warn] Run 'evicted' to see detailed eviction warnings
[info] Done updating.
[spatial] 0:..ndbox/spatial*                                                    
[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn]  * org.scala-lang.modules:scala-xml_2.12:1.1.0 is selected over 1.0.6
[warn]      +- edu.stanford.cs.dawn:forge_2.12:1.1-SNAPSHOT       (depends on 1.1.0)
[warn]      +- edu.stanford.cs.dawn:utils_2.12:1.1-SNAPSHOT       (depends on 1.1.0)
[warn]      +- org.scala-lang:scala-compiler:2.12.6               (depends on 1.0.6)
[warn]      +- org.scalatest:scalatest_2.12:3.0.5                 (depends on 1.0.6)
[warn] Run 'evicted' to see detailed eviction warnings
[info] Updating argon...
[info] Done updating.
[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn]  * org.scala-lang.modules:scala-xml_2.12:1.1.0 is selected over 1.0.6
[warn]      +- edu.stanford.cs.dawn:forge_2.12:1.1-SNAPSHOT       (depends on 1.1.0)
[warn]      +- edu.stanford.cs.dawn:utils_2.12:1.1-SNAPSHOT       (depends on 1.1.0)
[warn]      +- edu.stanford.cs.dawn:argon_2.12:1.1-SNAPSHOT       (depends on 1.1.0)
[warn]      +- edu.stanford.cs.dawn:emul_2.12:1.1-SNAPSHOT        (depends on 1.1.0)
[warn]      +- org.scala-lang:scala-compiler:2.12.6               (depends on 1.0.6)
[warn]      +- org.scalatest:scalatest_2.12:3.0.5                 (depends on 1.0.6)
[warn] Run 'evicted' to see detailed eviction warnings
[info] Updating spatial...
[info] Done updating.
[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn]  * org.scala-lang.modules:scala-xml_2.12:1.1.0 is selected over 1.0.6
[warn]      +- edu.stanford.cs.dawn:models_2.12:1.1-SNAPSHOT      (depends on 1.1.0)
[warn]      +- edu.stanford.cs.dawn:spatial_2.12:1.1-SNAPSHOT     (depends on 1.1.0)
[warn]      +- edu.stanford.cs.dawn:forge_2.12:1.1-SNAPSHOT       (depends on 1.1.0)
[warn]      +- edu.stanford.cs.dawn:utils_2.12:1.1-SNAPSHOT       (depends on 1.1.0)
[warn]      +- edu.stanford.cs.dawn:poly_2.12:1.1-SNAPSHOT        (depends on 1.1.0)
[warn]      +- edu.stanford.cs.dawn:argon_2.12:1.1-SNAPSHOT       (depends on 1.1.0)
[warn]      +- edu.stanford.cs.dawn:emul_2.12:1.1-SNAPSHOT        (depends on 1.1.0)
[warn]      +- org.scala-lang:scala-compiler:2.12.6               (depends on 1.0.6)
[warn]      +- org.scalatest:scalatest_2.12:3.0.5                 (depends on 1.0.6)
[warn] Run 'evicted' to see detailed eviction warnings
[info] Updating ...
[info] Done updating.
[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn]  * org.scala-lang.modules:scala-xml_2.12:1.1.0 is selected over 1.0.6
[warn]      +- edu.stanford.cs.dawn:models_2.12:1.1-SNAPSHOT      (depends on 1.1.0)
[warn]      +- edu.stanford.cs.dawn:spatial_2.12:1.1-SNAPSHOT     (depends on 1.1.0)
[warn]      +- edu.stanford.cs.dawn:forge_2.12:1.1-SNAPSHOT       (depends on 1.1.0)
[warn]      +- edu.stanford.cs.dawn:utils_2.12:1.1-SNAPSHOT       (depends on 1.1.0)
[warn]      +- edu.stanford.cs.dawn:poly_2.12:1.1-SNAPSHOT        (depends on 1.1.0)
[warn]      +- edu.stanford.cs.dawn:argon_2.12:1.1-SNAPSHOT       (depends on 1.1.0)
[warn]      +- edu.stanford.cs.dawn:emul_2.12:1.1-SNAPSHOT        (depends on 1.1.0)
[warn]      +- edu.stanford.cs.dawn:apps_2.12:1.1-SNAPSHOT        (depends on 1.1.0)
[warn]      +- org.scala-lang:scala-compiler:2.12.6               (depends on 1.0.6)
[warn]      +- org.scalatest:scalatest_2.12:3.0.5                 (depends on 1.0.6)
[warn] Run 'evicted' to see detailed eviction warnings
[info] Compiling 21 Scala sources to /mnt/ccnas2/bdp/rz3515/projects/sandbox/spatial/emul/target/scala-2.12/classes ...
[info] Compiling 27 Scala sources to /mnt/ccnas2/bdp/rz3515/projects/sandbox/spatial/utils/target/scala-2.12/classes ...
[info] Done compiling.
[info] Packaging /mnt/ccnas2/bdp/rz3515/projects/sandbox/spatial/emul/target/scala-2.12/emul_2.12-1.1-SNAPSHOT.jar ...
[info] Done packaging.
[info] Done compiling.
[info] Packaging /mnt/ccnas2/bdp/rz3515/projects/sandbox/spatial/utils/target/scala-2.12/utils_2.12-1.1-SNAPSHOT.jar ...
[info] Compiling 8 Scala sources to /mnt/ccnas2/bdp/rz3515/projects/sandbox/spatial/poly/target/scala-2.12/classes ...
[info] Compiling 12 Scala sources to /mnt/ccnas2/bdp/rz3515/projects/sandbox/spatial/models/target/scala-2.12/classes ...
[info] Compiling 22 Scala sources to /mnt/ccnas2/bdp/rz3515/projects/sandbox/spatial/forge/target/scala-2.12/classes ...
[info] Done packaging.
[info] Done compiling.
[info] Packaging /mnt/ccnas2/bdp/rz3515/projects/sandbox/spatial/poly/target/scala-2.12/poly_2.12-1.1-SNAPSHOT.jar ...
[info] Done packaging.
[info] Done compiling.
[info] Packaging /mnt/ccnas2/bdp/rz3515/projects/sandbox/spatial/models/target/scala-2.12/models_2.12-1.1-SNAPSHOT.jar ...
[info] Done packaging.
[info] Done compiling.
[info] Packaging /mnt/ccnas2/bdp/rz3515/projects/sandbox/spatial/forge/target/scala-2.12/forge_2.12-1.1-SNAPSHOT.jar ...
[info] Compiling 93 Scala sources to /mnt/ccnas2/bdp/rz3515/projects/sandbox/spatial/argon/target/scala-2.12/classes ...
[info] Done packaging.
[info] Done compiling.                                                                                                                                                                                                                                               
[info] Compiling 333 Scala sources to /mnt/ccnas2/bdp/rz3515/projects/sandbox/spatial/target/scala-2.12/classes ...
[info] Packaging /mnt/ccnas2/bdp/rz3515/projects/sandbox/spatial/argon/target/scala-2.12/argon_2.12-1.1-SNAPSHOT.jar ...
[info] Done packaging.
[info] Done compiling.
[info] Compiling 1 Scala source to /mnt/ccnas2/bdp/rz3515/projects/sandbox/spatial/apps/target/scala-2.12/classes ...
[info] Packaging /mnt/ccnas2/bdp/rz3515/projects/sandbox/spatial/target/scala-2.12/spatial_2.12-1.1-SNAPSHOT.jar ...
[info] Done compiling.
[warn] Multiple main classes detected.  Run 'show discoveredMainClasses' to see the list
[info] Packaging /mnt/ccnas2/bdp/rz3515/projects/sandbox/spatial/apps/target/scala-2.12/apps_2.12-1.1-SNAPSHOT.jar ...
[info] Done packaging.
[info] Done packaging.
[info] Running HelloSpatial --vv --sim
[warn] No target specified. Specify target using: --fpga <device> or
[warn] override val target = <device>
[warn] Defaulting to 'Default' device.
[warn] Area model file Zynq_Area.csv for target Zynq was missing expected fields:
[warn] BRAM
[info] Compiling HelloSpatial to /mnt/ccnas2/bdp/rz3515/projects/sandbox/spatial/gen/HelloSpatial/
[info] Logging HelloSpatial to /mnt/ccnas2/bdp/rz3515/projects/sandbox/spatial/logs/HelloSpatial/
Emptiness: true, /homes/rz3515/bin/emptiness
[info] Pass: IR
[info] Pass: CLINaming
[info] Pass: FriendlyTransformer
[info] Pass: IR
[info] Pass: CompilerSanityChecks
[info] Pass: UserSanityChecks
[info] Pass: SwitchTransformer
[info] Pass: IR
[info] Pass: CompilerSanityChecks
[info] Pass: SwitchOptimizer
[info] Pass: IR
[info] Pass: CompilerSanityChecks
[info] Pass: BlackboxLowering
[info] Pass: IR
[info] Pass: CompilerSanityChecks
[info] Pass: BlackboxLowering
[info] Pass: IR
[info] Pass: CompilerSanityChecks
[info] Pass: SwitchTransformer
[info] Pass: IR
[info] Pass: CompilerSanityChecks
[info] Pass: SwitchOptimizer
[info] Pass: IR
[info] Pass: CompilerSanityChecks
[info] Pass: MemoryDealiasing
[info] Pass: IR
[info] Pass: CompilerSanityChecks
[info] Pass: PipeInserter
[info] Pass: IR
[info] Pass: CompilerSanityChecks
[info] Pass: RegReadCSE
[info] Pass: UseAnalyzer
[warn] HelloSpatial.scala:40:36: sram5D is defined here but never read.
[warn]       val sram5D        = SRAM[Int](2,2,2,2,16)
[warn]                                    ^
[info] Pass: TransientCleanup
[info] Pass: IR
[info] Pass: CompilerSanityChecks
[info] Pass: RetimingAnalyzer
[info] Pass: AccessAnalyzer
[info] Pass: IterationDiffAnalyzer
[info] Pass: MemoryAnalyzer
[warn] HelloSpatial.scala:44:14: Write to memory sram5D is never used. Write will be removed.
[warn]       sram5D load dram5D // Load 5D tensor
[warn]              ^
[info] Pass: MemoryAllocator
[info] Pass: IR
[info] Pass: UnrollingTransformer
[info] Pass: IR
[info] Pass: CompilerSanityChecks
[info] Pass: RegReadCSE
...
[info] Pass: RewriteAnalyzer
[info] Pass: RewriteTransformer
[info] Pass: IR
[info] Pass: CompilerSanityChecks
[info] Pass: FlatteningTransformer
[info] Pass: BufferRecompute
[info] Pass: IR
[info] Pass: CompilerSanityChecks
[info] Pass: AccumAnalyzer
[info] Pass: IR
[info] Pass: AccumTransformer
[info] Pass: IR
[info] Pass: CompilerSanityChecks
[info] Pass: RetimingAnalyzer
[info] Pass: IR
[info] Pass: RetimingTransformer
[info] Pass: IR
[info] Pass: CompilerSanityChecks
[info] Pass: RetimeReporter
[info] Pass: BroadcastCleanupAnalyzer
[info] Pass: IR
[info] Pass: InitiationAnalyzer
[info] Pass: MemoryReporter
[info] Pass: IR
[info] Pass: CompilerSanityChecks
[info] Pass: TreeGen
[info] Pass: HtmlIRGenSpatial
[info] Pass: ScalaGenSpatial
[bug] An exception was encountered while compiling HelloSpatial:
[bug]   java.lang.NullPointerException
[bug]   scala.io.Source$.fromURL(Source.scala:141)
[bug]   argon.codegen.FileDependencies.files_list(FileDependencies.scala:10)
[bug]   argon.codegen.FileDependencies.files_list$(FileDependencies.scala:9)
[bug]   spatial.codegen.scalagen.ScalaGenSpatial.files_list$lzycompute(ScalaGenSpatial.scala:5)
[bug]   spatial.codegen.scalagen.ScalaGenSpatial.files_list(ScalaGenSpatial.scala:5)
[bug]   argon.codegen.FileDependencies$DirDep.copy(FileDependencies.scala:53)
[bug]   argon.codegen.FileDependencies.$anonfun$copyDependencies$1(FileDependencies.scala:60)
[bug]   argon.codegen.FileDependencies.$anonfun$copyDependencies$1$adapted(FileDependencies.scala:60)
[bug]   scala.collection.immutable.List.foreach(List.scala:389)
[bug]   argon.codegen.FileDependencies.copyDependencies(FileDependencies.scala:60)
[bug]   argon.codegen.FileDependencies.copyDependencies$(FileDependencies.scala:59)
[bug]   spatial.codegen.scalagen.ScalaGenSpatial.spatial$codegen$scalagen$ScalaCodegen$$super$copyDependencies(ScalaGenSpatial.scala:5)
[bug]   spatial.codegen.scalagen.ScalaCodegen.copyDependencies(ScalaCodegen.scala:91)
[bug]   spatial.codegen.scalagen.ScalaCodegen.copyDependencies$(ScalaCodegen.scala:88)
[bug]   spatial.codegen.scalagen.ScalaGenSpatial.copyDependencies(ScalaGenSpatial.scala:36)
[bug]   argon.codegen.FileDependencies.postprocess(FileDependencies.scala:64)
[bug]   argon.codegen.FileDependencies.postprocess$(FileDependencies.scala:63)
[bug]   spatial.codegen.scalagen.ScalaGenSpatial.argon$codegen$StructCodegen$$super$postprocess(ScalaGenSpatial.scala:5)
[bug]   argon.codegen.StructCodegen.postprocess(StructCodegen.scala:24)
[bug]   argon.codegen.StructCodegen.postprocess$(StructCodegen.scala:22)
[bug]  .. [see /mnt/ccnas2/bdp/rz3515/projects/sandbox/spatial/logs/HelloSpatial/HelloSpatial_exception.log]
[bug] This is due to a compiler bug. A log file has been created at:
[bug]   /mnt/ccnas2/bdp/rz3515/projects/sandbox/spatial/logs/HelloSpatial/HelloSpatial_exception.log
[warn] 3 warnings found
[failed] Total time: 6.4360 seconds

Exception: sbt.TrapExitSecurityException thrown from the UncaughtExceptionHandler in thread "run-main-0"
[error] java.lang.RuntimeException: Nonzero exit code: 1
[error]         at sbt.Run$.executeTrapExit(Run.scala:124)
[error]         at sbt.Run.run(Run.scala:77)
[error]         at sbt.Defaults$.$anonfun$bgRunMainTask$6(Defaults.scala:1147)
[error]         at sbt.Defaults$.$anonfun$bgRunMainTask$6$adapted(Defaults.scala:1142)
[error]         at sbt.internal.BackgroundThreadPool.$anonfun$run$1(DefaultBackgroundJobService.scala:366)
[error]         at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
[error]         at scala.util.Try$.apply(Try.scala:209)
[error]         at sbt.internal.BackgroundThreadPool$BackgroundRunnable.run(DefaultBackgroundJobService.scala:289)
[error]         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error]         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error]         at java.lang.Thread.run(Thread.java:748)
[error] (Compile / runMain) Nonzero exit code: 1
[error] Total time: 155 s, completed 10-Apr-2019 22:20:03

And compiling the emptiness.c file results in the same error.

dkoeplin commented 5 years ago

@mattfel1 ah, but we don't yet build files_list automatically :P

mattfel1 commented 5 years ago

Heh, yep. I'll make that happen automatically.

@kumasento try running bin/update_resources.sh and then recompile. It looks like there are some missing dependencies that should be fixed by this script

kumasento commented 5 years ago

@mattfel1 Yes, it fixes the issue, thanks!