spatial-quickstart
spatial-quickstart copied to clipboard
sbt.librarymanagement.ResolveException: download failed:
Hi, thank you very much for the project. I have read your paper, and want to try it .
I have installed java, and sbt .
but I have such problem as I try to excute : bin/spatial
And I get the error as the title .
below is the error message:
Best Regards, jm
Hi. It looks like it found the snapshot but then timed out on trying to retrieve it. Any chance you are behind a proxy or firewall that may interfere with sbt fetching jars?
You should be able to find everything here: https://oss.sonatype.org/content/repositories/snapshots/edu/stanford/cs/dawn/ Not sure if this works, but maybe you can download them and place them manually in their appropriate spots such as ~/.ivy2/cache/edu.stanford.cs.dawn/emul_2.12/jars/ ?
thank you for your reply.
now ,I have downloaded the xxx.jar ,and place it in dir as show below
and I run again ,this time it stop in compling for half a hour.
So, is there some mistakes I made ?
I'm a little confused about why its hanging here. It looks like it happily resolved all of the jars now, and is compiling some scala directly in spatial-quickstart. The only scala files should be in src and should be the apps you wrote + HelloSpatial. I wonder if you comment anything you wrote and just try to get HelloSpatial compiled, will that work?
Also, for now use bin/spatial t1 --sim --vv so that it knows what backend to use and so that it gives us a little extra debug info.
For reference, this is what my ivy2 looks like. But it doesn't sound like this is the problem:
mattfel@london:~/.ivy2/cache/edu.stanford.cs.dawn$ ls -R . | awk '
/:$/&&f{s=$0;f=0}
/:$/&&!f{sub(/:$/,"");s=$0;f=1;next}
NF&&f{ print s"/"$0 }'
./argon_2.12
./emul_2.12
./forge_2.12
./models_2.12
./poly_2.12
./spatial_2.12
./utils_2.12
./argon_2.12/ivy-1.0-SNAPSHOT.xml
./argon_2.12/ivy-1.0-SNAPSHOT.xml.original
./argon_2.12/ivy-1.1-SNAPSHOT.xml
./argon_2.12/ivy-1.1-SNAPSHOT.xml.original
./argon_2.12/ivydata-1.0-SNAPSHOT.properties
./argon_2.12/ivydata-1.1-SNAPSHOT.properties
./argon_2.12/jars
./argon_2.12/jars/argon_2.12-1.0-SNAPSHOT.jar
./argon_2.12/jars/argon_2.12-1.1-SNAPSHOT.jar
./emul_2.12/ivy-1.0-SNAPSHOT.xml
./emul_2.12/ivy-1.0-SNAPSHOT.xml.original
./emul_2.12/ivy-1.1-SNAPSHOT.xml
./emul_2.12/ivy-1.1-SNAPSHOT.xml.original
./emul_2.12/ivydata-1.0-SNAPSHOT.properties
./emul_2.12/ivydata-1.1-SNAPSHOT.properties
./emul_2.12/jars
./emul_2.12/jars/emul_2.12-1.0-SNAPSHOT.jar
./emul_2.12/jars/emul_2.12-1.1-SNAPSHOT.jar
./forge_2.12/ivy-1.0-SNAPSHOT.xml
./forge_2.12/ivy-1.0-SNAPSHOT.xml.original
./forge_2.12/ivy-1.1-SNAPSHOT.xml
./forge_2.12/ivy-1.1-SNAPSHOT.xml.original
./forge_2.12/ivydata-1.0-SNAPSHOT.properties
./forge_2.12/ivydata-1.1-SNAPSHOT.properties
./forge_2.12/jars
./forge_2.12/jars/forge_2.12-1.0-SNAPSHOT.jar
./forge_2.12/jars/forge_2.12-1.1-SNAPSHOT.jar
./models_2.12/ivy-1.0-SNAPSHOT.xml
./models_2.12/ivy-1.0-SNAPSHOT.xml.original
./models_2.12/ivy-1.1-SNAPSHOT.xml
./models_2.12/ivy-1.1-SNAPSHOT.xml.original
./models_2.12/ivydata-1.0-SNAPSHOT.properties
./models_2.12/ivydata-1.1-SNAPSHOT.properties
./models_2.12/jars
./models_2.12/jars/models_2.12-1.0-SNAPSHOT.jar
./models_2.12/jars/models_2.12-1.1-SNAPSHOT.jar
./poly_2.12/ivy-1.0-SNAPSHOT.xml
./poly_2.12/ivy-1.0-SNAPSHOT.xml.original
./poly_2.12/ivy-1.1-SNAPSHOT.xml
./poly_2.12/ivy-1.1-SNAPSHOT.xml.original
./poly_2.12/ivydata-1.0-SNAPSHOT.properties
./poly_2.12/ivydata-1.1-SNAPSHOT.properties
./poly_2.12/jars
./poly_2.12/jars/poly_2.12-1.0-SNAPSHOT.jar
./poly_2.12/jars/poly_2.12-1.1-SNAPSHOT.jar
./spatial_2.12/ivy-1.0-SNAPSHOT.xml
./spatial_2.12/ivy-1.0-SNAPSHOT.xml.original
./spatial_2.12/ivy-1.1-SNAPSHOT.xml
./spatial_2.12/ivy-1.1-SNAPSHOT.xml.original
./spatial_2.12/ivydata-1.0-SNAPSHOT.properties
./spatial_2.12/ivydata-1.1-SNAPSHOT.properties
./spatial_2.12/jars
./spatial_2.12/jars/spatial_2.12-1.0-SNAPSHOT.jar
./spatial_2.12/jars/spatial_2.12-1.1-SNAPSHOT.jar
./utils_2.12/ivy-1.0-SNAPSHOT.xml
./utils_2.12/ivy-1.0-SNAPSHOT.xml.original
./utils_2.12/ivy-1.1-SNAPSHOT.xml
./utils_2.12/ivy-1.1-SNAPSHOT.xml.original
./utils_2.12/ivydata-1.0-SNAPSHOT.properties
./utils_2.12/ivydata-1.1-SNAPSHOT.properties
./utils_2.12/jars
./utils_2.12/jars/utils_2.12-1.0-SNAPSHOT.jar
./utils_2.12/jars/utils_2.12-1.1-SNAPSHOT.jar
hi, thank you for your reply!
As you said, I just try to get HelloSpatial compiled only ! is this ok?
i do know how to set the 2 parameter in the above picture.
and now the compiling faied with following message. t1 is not defined.
so, I have to write app(t1) to make the project run?
Right. bin/spatial t1
means that you have some @spatial object t1 extends SpatialApp
defined somewhere in src/. There should only be one app specified when running bin/spatial
hi, thank you for your reply! now, I run: ./bin/spatial HelloSpatial --fpga Zynq it give the following bug info:
- `root@DESKTOP-CR77KA5:/work/spatial-quickstart# ./bin/spatial HelloSpatial --fpga Zynq sbt "runMain HelloSpatial --fpga Zynq" [info] Loading project definition from /work/spatial-quickstart/project [info] Loading settings for project spatial-quickstart from build.sbt ... [info] Set current project to spatial-app (in build file:/work/spatial-quickstart/) [info] Running HelloSpatial --fpga Zynq [warn] Area model file Zynq_Area.csv for target Zynq was missing expected fields: [warn] BRAM [info] Compiling HelloSpatial to /work/spatial-quickstart/gen/HelloSpatial/ Emptiness: false, /root/bin/emptiness [bug] An exception was encountered while compiling HelloSpatial: [bug] Cannot run program "pkg-config": error=2, No such file or directory [bug] java.io.IOException: error=2, No such file or directory [bug] This is due to a compiler bug. A log file has been created at: [bug] /work/spatial-quickstart/logs/HelloSpatial/HelloSpatial_exception.log [failed] Total time: 0.4740 seconds
Exception: sbt.TrapExitSecurityException thrown from the UncaughtExceptionHandler in thread "run-main-0" [error] Nonzero exit code: 1 [error] (Compile / runMain) Nonzero exit code: 1 [error] Total time: 3 s, completed Feb 24, 2019 7:18:50 AM [error] Spatial compilation failed`
it looks like Zynq_Area.csv is missing ?
Based on that error info, it looks like its having trouble with compiling emptiness. Can you install these packages and try again?
sudo apt-get install pkg-config libgmp3-dev libisl-dev
Hi,thank you for your reply! I installed the three pkg,and get new error :
`root@DESKTOP-CR77KA5:/work/spatial-quickstart# ./bin/spatial HelloSpatial --fpga Zynq sbt "runMain HelloSpatial --fpga Zynq" [info] Loading project definition from /work/spatial-quickstart/project [info] Loading settings for project spatial-quickstart from build.sbt ... [info] Set current project to spatial-app (in build file:/work/spatial-quickstart/) [info] Running HelloSpatial --fpga Zynq [warn] Area model file Zynq_Area.csv for target Zynq was missing expected fields: [warn] BRAM [info] Compiling HelloSpatial to /work/spatial-quickstart/gen/HelloSpatial/ Emptiness: false, /root/bin/emptiness Pkg Config: -lisl -lgmp /*
- Adapted from ISL's isl_polyhedron_sample example */
#include <assert.h> #include <isl/vec.h> #include <isl/set.h> #include <string.h>
int main(int argc, char **argv) { float version = 1.1; if (argc == 2 && strcmp(argv[1], "-version") == 0) { fprintf(stderr, "Version: %.1f\n", version); return 0; } else { struct isl_ctx *ctx = isl_ctx_alloc(); struct isl_basic_set *bset;
// Don't buffer stdout (it's buffered in compiler)
setbuf(stdout, NULL);
//setbuf(stderr, NULL);
while(1) {
bset = isl_basic_set_read_from_file(ctx, stdin);
if (isl_basic_set_plain_is_empty(bset)) {
printf("0");
}
else {
// Is there "really" a collision?
if (isl_basic_set_is_empty(bset)) {
printf("0");
} else {
printf("1");
}
}
isl_basic_set_free(bset);
}
isl_ctx_free(ctx);
return 0;
}
}
Compile Retcode: 0 Finished Compiling [warn] HelloSpatial.scala:40:36: sram5D is defined here but never read. [warn] val sram5D = SRAMInt [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] scala.Tuple2 cannot be cast to argon.codegen.Codegen$StmWithWeight [bug] java.lang.ClassCastException: scala.Tuple2 cannot be cast to argon.codegen.Codegen$StmWithWeight [bug] This is due to a compiler bug. A log file has been created at: [bug] /work/spatial-quickstart/logs/HelloSpatial/HelloSpatial_exception.log [warn] 2 warnings found [failed] Total time: 4.0190 seconds
Exception: sbt.TrapExitSecurityException thrown from the UncaughtExceptionHandler in thread "run-main-0" [error] Nonzero exit code: 1 [error] (Compile / runMain) Nonzero exit code: 1 [error] Total time: 6 s, completed Feb 27, 2019 1:47:59 PM [error] Spatial compilation failed`
Hi. It looks like it is getting confused about how to codegen for some part of your app that has a tuple. Any chance you can either send me the app code, or recompile with --vv and send the IR logfile? (spatial/logs/HelloSpatial/#####_IR.log, with highest #####).
This is probably just a case we overlooked so we need to add it. You can also try finding the scala tuple in the source code and remove it if possible.
Hi,thank you for your reply! The app I excuted is just the project's original code ,which is spatial-uickstart/src/main/scala/HelloSpatial.scala I change nothing.
I just run : ./bin/spatial HelloSpatial --vv --fpga Zynq (delete the logs's dir firstly)
and get log. the log dir is shown below:
the highest ####_IR.log is below: 0068_IR.log
Hi. I'm trying to reproduce this myself with master branch of spatial-quickstart but it isn't giving me the error. There are a few things we can try next. Can you try cleaning out all of the cached files? In spatial-quickstart/, run sbt clean
. Also try deleting everything in .ivy2 with rm -rf ~/.ivy2/*
.
If this doesn't work, can you send me the full error stack trace when you run with --vv?
Hi,thank you for your reply! I did as you said: sbt clean , rm -rf ~/.ivy2/* still not work: here is printed info: info.txt
THERE are some warnings.
Hi. I was trying to figure out what this is pointing to, but it seems like the error is referring to lines that don't exist any more so I'm not sure why it is resolving to this older version. Have you already tried building spatial locally and working from that?
rm -rf ~/.ivy2/*
git clone https://github.com/stanford-ppl/spatial
cd spatial/
make install
then either make publish
and go back to working in spatial-quickstart, or just write apps directly in spatial/apps/src