Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sbt.librarymanagement.ResolveException: download failed: #2

Open
jmjmjm123 opened this issue Feb 11, 2019 · 13 comments
Open

sbt.librarymanagement.ResolveException: download failed: #2

jmjmjm123 opened this issue Feb 11, 2019 · 13 comments

Comments

@jmjmjm123
Copy link

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
so I do : ./bin/spatial t1 1. t1 and 1 is only for giving argument to run the project ,but I really do not know how to set the 2 arguments.

And I get the error as the title .
below is the error message:
default

Best Regards,
jm

@mattfel1
Copy link
Member

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/ ?

@jmjmjm123
Copy link
Author

thank you for your reply.
now ,I have downloaded the xxx.jar ,and place it in dir as show below
1

and I run again ,this time it stop in compling for half a hour.
1549987049 1

So, is there some mistakes I made ?

@mattfel1
Copy link
Member

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

@jmjmjm123
Copy link
Author

jmjmjm123 commented Feb 13, 2019

hi, thank you for your reply!
As you said, I just try to get HelloSpatial compiled only ! is this ok?
1550066534 1
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.
image

so, I have to write app(t1) to make the project run?

@mattfel1
Copy link
Member

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

@jmjmjm123
Copy link
Author

jmjmjm123 commented Feb 24, 2019

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 ?

@mattfel1
Copy link
Member

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

@jmjmjm123
Copy link
Author

jmjmjm123 commented Feb 27, 2019

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`

@mattfel1
Copy link
Member

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.

@jmjmjm123
Copy link
Author

jmjmjm123 commented Feb 28, 2019

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:
log dir

the highest ####_IR.log is below:
0068_IR.log

@mattfel1
Copy link
Member

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?

@jmjmjm123
Copy link
Author

jmjmjm123 commented Mar 3, 2019

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.

@mattfel1
Copy link
Member

mattfel1 commented Mar 6, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants