SINGA-72 Minor updates to be consisten with documentation * Update driver.cc to remove the dependency on OpenBLAS's cblas.h file due to the use of openblas_set_num_threads(). * Update README.md file to add comments and instructions for users to install and try one example.
Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/6bb1a8a4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/6bb1a8a4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/6bb1a8a4 Branch: refs/heads/master Commit: 6bb1a8a4ad713c157bf0617f9c5651094f9cf9f5 Parents: 3d1b0dc Author: Wei Wang <[email protected]> Authored: Wed Sep 23 21:24:05 2015 +0800 Committer: Wei Wang <[email protected]> Committed: Sat Sep 26 23:23:41 2015 +0800 ---------------------------------------------------------------------- README.md | 107 +++++++++++++++++++++++++++++++++++++++++++++++------ RELEASE_NOTES | 6 +-- src/driver.cc | 3 +- 3 files changed, 100 insertions(+), 16 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/6bb1a8a4/README.md ---------------------------------------------------------------------- diff --git a/README.md b/README.md index b7d4528..080f4f5 100644 --- a/README.md +++ b/README.md @@ -14,13 +14,13 @@ All the details can be found in [Project Website](http://singa.incubator.apache. ##Dependencies The current code depends on the following external libraries: + * glog (New BSD) * google-protobuf (New BSD) * openblas (New BSD) * zeromq (LGPLv3 + static link exception) * czmq (Mozilla Public License Version 2.0) * zookeeper (Apache 2.0) - * lmdb (OpenLDAP) ##Documentation @@ -28,10 +28,11 @@ Full documentation is available online at [Official Documentation](https://singa ##Building SINGA - - $ ./autogen.sh - $ ./configure - $ make + + $ ./autogen.sh (optional) + # pls refer to FAQ for solutions of errors + $ ./configure + $ make ##Running Examples @@ -43,19 +44,101 @@ at [CNN example](http://singa.incubator.apache.org/docs/cnn). First, download the dataset and create data shards: - $ cd examples/cifar10/ - $ make download - $ make create + $ cd examples/cifar10/ + $ cp Makefile.example Makefile + $ make download + $ make create + +If it reports errors due to libopenblas.so missing, then include the +lib folder of OpenBLAS in LD_LIBRARY_PATH -Next, start the training: + $ export LD_LIBRARY_PATH= OPENBLAS_FOLDER/lib:$LD_LIBRARY_PATH + # delete the newly created folders + $ rm -rf cifar10_t* + $ make create - $ cd ../../ - $ ./bin/singa-run.sh -conf examples/cifar10/job.conf +Next, start the training: -Now we just need to wait until it is done! + $ cd ../../ + $ ./bin/zk-service.sh start + $ ./bin/singa-run.sh -conf examples/cifar10/job.conf + +Now we just need to wait until it is done! ##LICENSE Apache Singa is licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0). For additional information, see the LICENSE and NOTICE files. + +## FAQ + +* Q1:I get error `./configure --> cannot find blas_segmm() function` even I +run `install.sh OpenBLAS`. + + A1: `OpenBLAS` library is installed in `/opt` folder by default or + other folders if you use `sudo apt-get install`. + You need to include the OpenBLAS library folder in the LDFLAGS. + + $ export LDFLAGS=-L/opt/OpenBLAS/lib + + Alternatively, you can include the path in LIBRARY_PATH. + + +* Q2: I get error `cblas.h not such file or directory exists`. + + Q2: You need to include the folder of the cblas.h (e.g., /opt/OpenBLAS/include) + into CPLUS_INCLUDE_PATH + + $ export CPLUS_INCLUDE_PATH=/opt/OpenBLAS/include:$CPLUS_INCLUDE_PATH + # reconfigure and make + $ ./configure + $ make + + +* Q3:While compiling SINGA, I get error `SSE2 instruction set not enabled` + + A3:You can try following command: + + $ make CFLAGS='-msse2' CXXFLAGS='-msse2' + + +* Q4:I get `ImportError: cannot import name enum_type_wrapper` from +google.protobuf.internal when I try to import .py files. + + A4:After install google protobuf by `make install`, we should install python + runtime libraries. Go to protobuf source directory, run: + + $ cd /PROTOBUF/SOURCE/FOLDER + $ cd python + $ python setup.py build + $ python setup.py install + + You may need `sudo` when you try to install python runtime libraries in + the system folder. + + +* Q5: I get a linking error caused by gflags. + + A5: SINGA does not depend on gflags. But you may have installed the glog with + gflags. In that case you can reinstall glog using *thirdparty/install.sh* into + a another folder and export the LDFLAGS and CPPFLAGS to include that folder. + + +* Q6: While compiling SINGA and installing `glog` on mac OS X, I get fatal error +`'ext/slist' file not found` + + A6:Please install `glog` individually and try : + + $ make CFLAGS='-stdlib=libstdc++' CXXFLAGS='stdlib=libstdc++' + +* Q7: When I start a training job, it reports error related with "ZOO_ERROR...zk retcode=-4...". + + A7: This is because the zookeeper is not started. Please start the zookeeper service + + $ ./bin/zk-service start + + If the error still exists, probably that you do not have java. You can simple + check it by + + $ java --version http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/6bb1a8a4/RELEASE_NOTES ---------------------------------------------------------------------- diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 2425cd0..8c5eae0 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -1,9 +1,9 @@ -Release Notes - SINGA - Version singa-incubating-0.1-rc0 +Release Notes - SINGA - Version singa-incubating-0.1-rc1 ----------------------------------------- SINGA is a general distributed deep learning platform for training big deep learning models over large datasets. It is designed with an intuitive programming model based on the layer abstraction. SINGA supports a wide variety of popular -deep learning models. +deep learning models. This release includes following features: @@ -75,7 +75,7 @@ Some bugs are fixed during the development of this release * [SINGA-49] Fix a bug in HandlePutMsg func that sets param fields to invalid values * [SINGA-66] Fix bugs in Worker::RunOneBatch function and ClusterProto -Features planned for the next release +Features planned for the next release * [SINGA-11] Start SINGA using Mesos * [SINGA-31] Extend Blob to support xpu (cpu or gpu) * [SINGA-35] Add random number generators http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/6bb1a8a4/src/driver.cc ---------------------------------------------------------------------- diff --git a/src/driver.cc b/src/driver.cc index 41b2342..6fa70ee 100644 --- a/src/driver.cc +++ b/src/driver.cc @@ -21,7 +21,6 @@ #include "driver.h" -#include <cblas.h> #include <glog/logging.h> #include <string> #include "neuralnet/layer.h" @@ -29,6 +28,8 @@ #include "utils/common.h" #include "utils/tinydir.h" +extern "C" void openblas_set_num_threads(int); + namespace singa { void Driver::Init(int argc, char **argv) {
