Skip to content
This repository has been archived by the owner on Nov 16, 2019. It is now read-only.

caffe-grid-0.1-SNAPSHOT-jar-with-dependencies.jar does not exist #69

Closed
vishakhhegde opened this issue May 19, 2016 · 13 comments
Closed

Comments

@vishakhhegde
Copy link

Hi,

I have followed the steps mentioned in the README file. So, CaffeOnSpark, Caffe, Spark and Hadoop have been installed.

However, the directory $(CAFFE_ON_SPARK)/caffe-grid/target/ does not contain the JAR file, caffe-grid-0.1-SNAPSHOT-jar-with-dependencies.jar

Has the file been deleted in your github repo or is there a work-around for it?

Here is the error:

rescomp-14-310339:caffe-public vishakhhegde$ spark-submit --master ${MASTER_URL} \

--files ${CAFFE_ON_SPARK}/data/lenet_memory_solver.prototxt,${CAFFE_ON_SPARK}/data/lenet_memory_train_test.prototxt \
--conf spark.cores.max=${TOTAL_CORES} \
--conf spark.task.cpus=${CORES_PER_WORKER} \
--conf spark.driver.extraLibraryPath="${LD_LIBRARY_PATH}" \
--conf spark.executorEnv.LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" \
--class com.yahoo.ml.caffe.CaffeOnSpark  \
${CAFFE_ON_SPARK}/caffe-grid/target/caffe-grid-0.1-SNAPSHOT-jar-with-dependencies.jar \
    -train \
    -features accuracy,loss -label label \
    -conf lenet_memory_solver.prototxt \
-clusterSize ${SPARK_WORKER_INSTANCES} \
    -devices 1 \
-connection ethernet \
    -model file:${CAFFE_ON_SPARK}/mnist_lenet.model \
    -output file:${CAFFE_ON_SPARK}/lenet_features_result

Warning: Local jar /Users/vishakhhegde/CaffeOnSpark/caffe-grid/target/caffe-grid-0.1-SNAPSHOT-jar-with-dependencies.jar does not exist, skipping.
java.lang.ClassNotFoundException: com.yahoo.ml.caffe.CaffeOnSpark
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:274)
at org.apache.spark.util.Utils$.classForName(Utils.scala:174)
at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:689)
at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:181)
at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:206)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:121)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)

Thanks a lot!

@anfeng
Copy link
Contributor

anfeng commented May 19, 2016

You need to build the jar file via make build. See README for details.

Andy Feng

Sent from my iPhone

On May 19, 2016, at 4:06 PM, vishakhhegde notifications@github.com wrote:

Hi,

I have followed the steps mentioned in the README file. So, CaffeOnSpark, Caffe, Spark and Hadoop have been installed.

However, the directory $(CAFFE_ON_SPARK)/caffe-grid/target/ does not contain the JAR file, caffe-grid-0.1-SNAPSHOT-jar-with-dependencies.jar

Has the file been deleted in your github repo or is there a work-around for it?

Here is the error:

rescomp-14-310339:caffe-public vishakhhegde$ spark-submit --master ${MASTER_URL} \

--files ${CAFFE_ON_SPARK}/data/lenet_memory_solver.prototxt,${CAFFE_ON_SPARK}/data/lenet_memory_train_test.prototxt
--conf spark.cores.max=${TOTAL_CORES}
--conf spark.task.cpus=${CORES_PER_WORKER}
--conf spark.driver.extraLibraryPath="${LD_LIBRARY_PATH}"
--conf spark.executorEnv.LD_LIBRARY_PATH="${LD_LIBRARY_PATH}"
--class com.yahoo.ml.caffe.CaffeOnSpark
${CAFFE_ON_SPARK}/caffe-grid/target/caffe-grid-0.1-SNAPSHOT-jar-with-dependencies.jar
-train
-features accuracy,loss -label label
-conf lenet_memory_solver.prototxt
-clusterSize ${SPARK_WORKER_INSTANCES}
-devices 1
-connection ethernet
-model file:${CAFFE_ON_SPARK}/mnist_lenet.model
-output file:${CAFFE_ON_SPARK}/lenet_features_result
Warning: Local jar /Users/vishakhhegde/CaffeOnSpark/caffe-grid/target/caffe-grid-0.1-SNAPSHOT-jar-with-dependencies.jar does not exist, skipping.
java.lang.ClassNotFoundException: com.yahoo.ml.caffe.CaffeOnSpark
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:274)
at org.apache.spark.util.Utils$.classForName(Utils.scala:174)
at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:689)
at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:181)
at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:206)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:121)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)

Thanks a lot!


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub

@vishakhhegde
Copy link
Author

Hi Andy,
Thanks for replying. Since yesterday I have made some progress in fixing some issues. I still have the following error:


T E S T S

Running TestSuite
Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNG652Configurator@5dda32d0
Tests run: 17, Failures: 9, Errors: 0, Skipped: 7, Time elapsed: 1.516 sec <<< FAILURE!
setUp(com.yahoo.ml.jcaffe.CaffeNetTest) Time elapsed: 0.408 sec <<< FAILURE!
java.lang.UnsatisfiedLinkError: /Users/vishakhhegde/CaffeOnSpark/caffe-distri/.build_release/lib/libcaffedistri.jnilib: dlopen(/Users/vishakhhegde/CaffeOnSpark/caffe-distri/.build_release/lib/libcaffedistri.jnilib, 1): Library not loaded: libcaffe.so.1.0.0-rc3
Referenced from: /Users/vishakhhegde/CaffeOnSpark/caffe-distri/.build_release/lib/libcaffedistri.jnilib
Reason: image not found
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1894)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1880)
at java.lang.Runtime.loadLibrary0(Runtime.java:849)
at java.lang.System.loadLibrary(System.java:1088)
at com.yahoo.ml.jcaffe.BaseObject.(BaseObject.java:10)
at com.yahoo.ml.jcaffe.CaffeNetTest.setUp(CaffeNetTest.java:39)

testAllocate(com.yahoo.ml.jcaffe.FloatBlobTest) Time elapsed: 0.002 sec <<< FAILURE!
java.lang.NoClassDefFoundError: com.yahoo.ml.jcaffe.BaseObject
at com.yahoo.ml.jcaffe.FloatBlobTest.testAllocate(FloatBlobTest.java:13)

testBasic(com.yahoo.ml.jcaffe.FloatBlobTest) Time elapsed: 0.001 sec <<< FAILURE!
java.lang.NoClassDefFoundError: com.yahoo.ml.jcaffe.BaseObject
at com.yahoo.ml.jcaffe.FloatBlobTest.testBasic(FloatBlobTest.java:19)

testCopy(com.yahoo.ml.jcaffe.FloatBlobTest) Time elapsed: 0.001 sec <<< FAILURE!
java.lang.NoClassDefFoundError: com.yahoo.ml.jcaffe.BaseObject
at com.yahoo.ml.jcaffe.FloatBlobTest.testCopy(FloatBlobTest.java:36)

basicDataTest(com.yahoo.ml.jcaffe.MatTest) Time elapsed: 0.002 sec <<< FAILURE!
java.lang.NoClassDefFoundError: com.yahoo.ml.jcaffe.BaseObject
at com.yahoo.ml.jcaffe.MatTest.basicDataTest(MatTest.java:137)

basicTest(com.yahoo.ml.jcaffe.MatTest) Time elapsed: 0.001 sec <<< FAILURE!
java.lang.NoClassDefFoundError: com.yahoo.ml.jcaffe.BaseObject
at com.yahoo.ml.jcaffe.MatTest.basicTest(MatTest.java:46)

matChannelsTest(com.yahoo.ml.jcaffe.MatTest) Time elapsed: 0.01 sec <<< FAILURE!
java.lang.NoClassDefFoundError: com.yahoo.ml.jcaffe.BaseObject
at com.yahoo.ml.jcaffe.MatTest.matChannelsTest(MatTest.java:130)

matResizeDecodeTest(com.yahoo.ml.jcaffe.MatTest) Time elapsed: 0.011 sec <<< FAILURE!
java.lang.NoClassDefFoundError: com.yahoo.ml.jcaffe.BaseObject
at com.yahoo.ml.jcaffe.MatTest.matResizeDecodeTest(MatTest.java:121)

setUp(com.yahoo.ml.jcaffe.TransformTest) Time elapsed: 0.65 sec <<< FAILURE!
java.lang.NoClassDefFoundError: com.yahoo.ml.jcaffe.BaseObject
at com.yahoo.ml.jcaffe.TransformTest.setUp(TransformTest.java:43)

Results :

Failed tests: setUp(com.yahoo.ml.jcaffe.CaffeNetTest): /Users/vishakhhegde/CaffeOnSpark/caffe-distri/.build_release/lib/libcaffedistri.jnilib: dlopen(/Users/vishakhhegde/CaffeOnSpark/caffe-distri/.build_release/lib/libcaffedistri.jnilib, 1): Library not loaded: libcaffe.so.1.0.0-rc3(..)
testAllocate(com.yahoo.ml.jcaffe.FloatBlobTest): com.yahoo.ml.jcaffe.BaseObject
testBasic(com.yahoo.ml.jcaffe.FloatBlobTest): com.yahoo.ml.jcaffe.BaseObject
testCopy(com.yahoo.ml.jcaffe.FloatBlobTest): com.yahoo.ml.jcaffe.BaseObject
basicDataTest(com.yahoo.ml.jcaffe.MatTest): com.yahoo.ml.jcaffe.BaseObject
basicTest(com.yahoo.ml.jcaffe.MatTest): com.yahoo.ml.jcaffe.BaseObject
matChannelsTest(com.yahoo.ml.jcaffe.MatTest): com.yahoo.ml.jcaffe.BaseObject
matResizeDecodeTest(com.yahoo.ml.jcaffe.MatTest): com.yahoo.ml.jcaffe.BaseObject
setUp(com.yahoo.ml.jcaffe.TransformTest): com.yahoo.ml.jcaffe.BaseObject

Tests run: 17, Failures: 9, Errors: 0, Skipped: 7

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] caffe .............................................. SUCCESS [ 0.004 s]
[INFO] caffe-distri ....................................... FAILURE [01:23 min]
[INFO] caffe-grid ......................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:24 min
[INFO] Finished at: 2016-05-21T12:27:20-07:00
[INFO] Final Memory: 17M/247M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project caffe-distri: There are test failures.
[ERROR]
[ERROR] Please refer to /Users/vishakhhegde/CaffeOnSpark/caffe-distri/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :caffe-distri
make: *** [build] Error 1

Can anyone help me with what I can do to fix the error?

@vishakhhegde
Copy link
Author

Is it necessary to have protobuf 2.5.0?
I have protobuf 2.6.1, but in pom.xml file, I change the version from 2.5.0 to 2.6.1 so that it is consistent. Will this cause problems?

@mriduljain
Copy link
Contributor

Protobuf 2.5.0 works well. I don't remember if I tried with 2.6.1.
The above error however has to do with setting your LD_LIBRARY_PATH. Please
set that to path of libcaffe.so....

On Sat, May 21, 2016 at 1:25 PM, vishakhhegde notifications@github.com
wrote:

Is it necessary to have protobuf 2.5.0?
I have protobuf 2.6.1, but in pom.xml file, I change the version from
2.5.0 to 2.6.1 so that it is consistent. Will this cause problems?


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#69 (comment)

@vishakhhegde
Copy link
Author

Hi Mridul,
Thanks a lot for your reply.
I did change LD_LIBRARY_PATH to be the path to libcaffe.so.
However, I am still encountering errors:

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] caffe .............................................. SUCCESS [ 0.003 s]
[INFO] caffe-distri ....................................... FAILURE [01:12 min]
[INFO] caffe-grid ......................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:13 min
[INFO] Finished at: 2016-05-21T14:08:24-07:00
[INFO] Final Memory: 20M/487M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project caffe-distri: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ? -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :caffe-distri
make: *** [build] Error 1

This seems to be a common issue with maven-surefire-plugin. Has anyone encountered this issue and has anyone solved it?

Thanks a lot in advance.

@mriduljain
Copy link
Contributor

Does it work when you skiptest?

@LinHungShi
Copy link

how to skip the test?

@mriduljain
Copy link
Contributor

Look into the Makefile under CaffeOnSpark/ . There in the build/buldosx
steps add mvn package -DskipTests ...or something equivalent.

On Thu, Jun 9, 2016 at 7:15 AM, RedHaur notifications@github.com wrote:

how to skip the test?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#69 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ACCTVVvkrnAqa1Jkz-XFtk9YbJVbQVuhks5qKCAAgaJpZM4IivD8
.

@mriduljain
Copy link
Contributor

@vishakhhegde Please comment and close this, if it works

@vishakhhegde
Copy link
Author

Skipping tests did not work for me.

@Aaheer17
Copy link

Aaheer17 commented Jun 8, 2018

I am facing the same issue while following this link https://github.com/yahoo/CaffeOnSpark/wiki/GetStarted_standalone
github
sorry for the png file. As working with CloudLab, cannot copy and paste the log.
And the solution mentioned here is not working for me. Can anyone find me out the solution? Thanks in advance.

@junshi15
Copy link
Collaborator

junshi15 commented Jun 8, 2018

It looks like the jar was not generated. Did the build stage finish error-free?

@Aaheer17
Copy link

Aaheer17 commented Jun 9, 2018

screenshot from 2018-06-09 12-05-53
1
2
3
4

During the build stage, the build was successful for all of the three folders. But there was test case failure issues similar to this https://github.com/yahoo/CaffeOnSpark/issues/235. And the solution mentioned here also didn't work for me.

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

No branches or pull requests

6 participants