ibcn-cloudlet / dianne

DIANNE - DIstributed Artificial Neural NEtworks
http://dianne.intec.ugent.be
GNU Affero General Public License v3.0
22 stars 8 forks source link

Failing to run #15

Closed EricLiu2000 closed 6 years ago

EricLiu2000 commented 6 years ago

I'm on Mac High Sierra, and am currently having trouble running ./gradlew run.all and http://localhost:8080/dianne. The output of ./gradlew run.all is below:

output of gradlew run all

Any help would be appreciated. Thanks.

tverbele commented 6 years ago

It seems it fails to load the native tensor library. Did ./gradlew build succeed without errors?

EricLiu2000 commented 6 years ago

Yes, finishes successfully.

screen shot 2018-07-11 at 11 04 11 pm

I'm using the CPU version, if that's worth noting.

tverbele commented 6 years ago

Can you run ./gradlew cleanAll be.iminds.iot.dianne.tensor.native:build to rebuild the native code and post the output?

EricLiu2000 commented 6 years ago
screen shot 2018-07-11 at 11 11 59 pm
tverbele commented 6 years ago

Clearly building the native code is failing. Did you initialize the submodules? i.e. run

git submodule init
git submodule update
EricLiu2000 commented 6 years ago

Just ran both commands with no result.

screen shot 2018-07-12 at 12 27 42 am
tverbele commented 6 years ago

It seems OpenBLAS is complaining that clang is not supporting OpenMP on your system. Maybe this can help (I am not a Mac user myself unfortunately). Another option is to run inside a (ubuntu) docker container. If you have docker installed, you should be able to build a docker with DIANNE using the ./gradlew docker command.

EricLiu2000 commented 6 years ago

I've just installed the OpenMP runtime library. Which commands should I specifically call OpenMP on?

tverbele commented 6 years ago

Try to build again with ./gradlew cleanAll build ?

EricLiu2000 commented 6 years ago

It seems to encounter the same error, however this time around it took much longer.

screen shot 2018-07-12 at 1 20 57 am
sbohez commented 6 years ago

Hi Eric,

It seems your gcc compiler is a symlink to Apple's clang, which unfortunately does not support OpenMP. You can however install gcc via Homebrew:

brew install gcc --without-multilib

This might take a while, because brew has to compile gcc (compiling a compiler, the irony) due to the --without-multilib. Once finished, gcc will still point to clang, as not to break Apple's systems, but you can explicitly set the compiler using:

CC=gcc-8 CXX=g++-8 ./gradlew build

This is assuming you installed the latest version available from HomeBrew. I've not been able to test this one though, so if you run into trouble, I suggest you try gcc-6 which is tested.

Please let us know if this works.

EricLiu2000 commented 6 years ago
screen shot 2018-07-12 at 5 09 07 am screen shot 2018-07-12 at 5 14 00 am

It works! Thank you for your help. I'd actually previously already tried these same commands (to no avail), and brew complains about the --without-multilib option not existing (which it still does, but irrelevant now). Seems like separately installing the OpenMP library fixed the issue! Thanks again.

tverbele commented 6 years ago

Great! Have fun!