You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@singa.apache.org by wa...@apache.org on 2015/09/27 16:34:34 UTC

[11/13] incubator-singa git commit: SINGA-72 Minor updates to be consisten with documentation

SINGA-72 Minor updates to be consisten with documentation

* Remove lmdb from the default installation list (./install.sh all PREFIX).
* Add msse3 for rnnlm/Makefile.example.
* Tested on a virtual machine with Ubuntu 12.04 (g++ is updated to 4.8.1).


Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/2160ab21
Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/2160ab21
Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/2160ab21

Branch: refs/heads/master
Commit: 2160ab21bd2c899369304808af4dfd4656b9d06c
Parents: 88e2ba3
Author: Wei Wang <wa...@comp.nus.edu.sg>
Authored: Sun Sep 27 15:34:29 2015 +0800
Committer: Wei Wang <wa...@comp.nus.edu.sg>
Committed: Sun Sep 27 15:34:29 2015 +0800

----------------------------------------------------------------------
 README.md                       | 33 ++++++++++++++++-----------------
 examples/rnnlm/Makefile.example |  2 +-
 thirdparty/install.sh           | 24 ++++++++++++------------
 3 files changed, 29 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/2160ab21/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 5e20ded..c8171e3 100644
--- a/README.md
+++ b/README.md
@@ -25,12 +25,8 @@ You can install all dependencies into $PREFIX folder by
 
     ./thirdparty/install.sh all $PREFIX
 
-You can also install these libraries one by one. The usage is listed by
-
-    ./thidparty/install.sh
-
-If $PREFIX is not a system path (e.g., /usr/local/), you have to export some
-environment variables,
+If $PREFIX is not a system path (e.g., /usr/local/), please export the following
+variables to continue the building instructions,
 
     export LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH
     export CPLUS_INCLUDE_PATH=$PREFIX/include:$CPLUS_INCLUDE_PATH
@@ -43,6 +39,8 @@ Full documentation is available online at [Official Documentation](https://singa
 
 ##Building SINGA
 
+Please make sure your g++ >= 4.8.1 before building SINGA.
+
     $ ./autogen.sh (optional)
     # pls refer to FAQ for solutions of errors
     $ ./configure
@@ -62,10 +60,10 @@ First, download the dataset and create data shards:
     $ make download
     $ make create
 
-If it reports errors due to libopenblas.so missing, then include the
-lib folder of OpenBLAS in LD_LIBRARY_PATH
+If it reports errors due to library missing, e.g., libopenblas.so or libprotobuf,
+please export the environment variables shown in the Dependencies section and
+continue with the following instructions,
 
-    $ export LD_LIBRARY_PATH=$OPENBLAS_FOLDER/lib:$LD_LIBRARY_PATH
     # delete the newly created folders
     $ rm -rf cifar10_t*
     $ make create
@@ -89,12 +87,11 @@ For additional information, see the LICENSE and NOTICE files.
 * Q1:I get error `./configure --> cannot find blas_segmm() function` even I
 have installed OpenBLAS.
 
-  A1: `OpenBLAS` library is installed in `/opt` folder by default or $PREFIX or
-  other folders if you use `sudo apt-get install`.
-  You need to export the OpenBLAS library folder, e.g.,
+  A1: This means the compiler cannot find the `OpenBLAS` library. If you installed
+  it to $PREFIX (e.g., /opt/OpenBLAS), then you need to export it as
 
       $ export LIBRARY_PATH=$PREFIX/lib:$LIBRARY_PATH
-      # or
+      # e.g.,
       $ export LIBRARY_PATH=/opt/OpenBLAS/lib:$LIBRARY_PATH
 
 
@@ -103,10 +100,10 @@ have installed OpenBLAS.
   Q2: You need to include the folder of the cblas.h into CPLUS_INCLUDE_PATH,
   e.g.,
 
-      $ export CPLUS_INCLUDE_PATH=/opt/OpenBLAS/include:$CPLUS_INCLUDE_PATH
-      # or
       $ export CPLUS_INCLUDE_PATH=$PREFIX/include:$CPLUS_INCLUDE_PATH
-      # reconfigure and make SINGA
+      # e.g.,
+      $ export CPLUS_INCLUDE_PATH=/opt/OpenBLAS/include:$CPLUS_INCLUDE_PATH
+      # then reconfigure and make SINGA
       $ ./configure
       $ make
 
@@ -166,13 +163,15 @@ google.protobuf.internal when I try to import .py files.
 
   or install it using
 
-	    $ sudo apt-get install openblas
+	    $ sudo apt-get install openblas-dev
 
   or
 
 	    $ sudo yum install openblas-devel
 
   It is worth noting that you need root access to run the last two commands.
+  Remember to set the environment variables to include the header and library
+  paths of OpenBLAS after installation (please refer to the Dependencies section).
 
 * Q9: When I build protocol buffer, it reports that GLIBC++_3.4.20 not found in /usr/lib64/libstdc++.so.6.
 

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/2160ab21/examples/rnnlm/Makefile.example
----------------------------------------------------------------------
diff --git a/examples/rnnlm/Makefile.example b/examples/rnnlm/Makefile.example
index 0e2333f..48efd17 100644
--- a/examples/rnnlm/Makefile.example
+++ b/examples/rnnlm/Makefile.example
@@ -47,6 +47,6 @@ create:
 
 rnnlm:
 	protoc --proto_path=../../src/proto --proto_path=. --cpp_out=. rnnlm.proto
-	$(CXX) main.cc rnnlm.cc rnnlm.pb.cc $(MSHADOW_FLAGS) -std=c++11 -lsinga -lglog -lprotobuf -lopenblas -I../../include -I../../include/proto \
+	$(CXX) main.cc rnnlm.cc rnnlm.pb.cc $(MSHADOW_FLAGS) -msse3 -std=c++11 -lsinga -lglog -lprotobuf -lopenblas -I../../include -I../../include/proto \
 		-L../../.libs/ -L/usr/local  -Wl,-unresolved-symbols=ignore-in-shared-libs -Wl,-rpath=../../.libs/\
 		-o rnnlm.bin

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/2160ab21/thirdparty/install.sh
----------------------------------------------------------------------
diff --git a/thirdparty/install.sh b/thirdparty/install.sh
index 9e7b73f..99403b9 100755
--- a/thirdparty/install.sh
+++ b/thirdparty/install.sh
@@ -607,12 +607,12 @@ do
 		        echo "ERROR during glog installation" ;
 		        exit;
 		    fi
-			install_lmdb $2;
-		    if [ $? -ne 0 ]
-		    then
-		        echo "ERROR during lmdb installation" ;
-		        exit;
-		    fi
+#			install_lmdb $2;
+#		    if [ $? -ne 0 ]
+#		    then
+#		        echo "ERROR during lmdb installation" ;
+#		        exit;
+#		    fi
 			install_openblas $2;
 		    if [ $? -ne 0 ]
 		    then
@@ -664,12 +664,12 @@ do
 		        echo "ERROR during glog installation" ;
 		        exit;
 		    fi
-			install_lmdb;
-		    if [ $? -ne 0 ]
-		    then
-		        echo "ERROR during lmdb installation" ;
-		        exit;
-		    fi
+#			install_lmdb;
+#		    if [ $? -ne 0 ]
+#		    then
+#		        echo "ERROR during lmdb installation" ;
+#		        exit;
+#		    fi
 			install_openblas;
 		    if [ $? -ne 0 ]
 		    then