mkdir -p /project/k1341/.usr/local/share/modulefiles
- create a file
common
#%Module
module swap PrgEnv-cray/6.0.4 PrgEnv-intel
module load cmake/3.10.2
module load hdf5/1.8.21
module load depends_caffe/1.0
- create a file
depends_caffe/1.0
#%Module
set root /project/k1341/.usr/local
prepend-path PATH $root/bin
prepend-path CPLUS_INCLUDE_PATH $root/include
prepend-path C_INCLUDE_PATH $root/include
prepend-path LD_LIBRARY_PATH $root/lib:$root/lib64
prepend-path LIBRARY_PATH $root/lib:$root/lib64
prepend-path MANPATH $root/share
prepend-path C_INCLUDE_PATH /sw/xc40cle6/hdf5/1.8.21/cle6.0.5_intel18.0.1.163/include
prepend-path CPLUS_INCLUDE_PATH /sw/xc40cle6/hdf5/1.8.21/cle6.0.5_intel18.0.1.163/include
prepend-path LIBRARY_PATH /sw/xc40cle6/hdf5/1.8.21/cle6.0.5_intel18.0.1.163/lib
- load
commonmodule every time when you login to the system, add following to$HOME/.profile
if [ -d "/project/k1341" ]; then
module use -a /project/k1341/.usr/local/share/modulefiles
module load common
fi
Prepare other libraries (check here)
- Install protobuf:
cd /tmp/
rm -rf protobuf
git clone https://github.com/google/protobuf.git
cd protobuf/
./autogen.sh
./configure --prefix=/project/k1341/.usr/local
make -j && make install
- Install snappy:
cd /tmp/
rm -rf snappy
git clone https://github.com/google/snappy.git
cd snappy
mkdir build && cd build
cmake -D CMAKE_INSTALL_PREFIX=/project/k1341/.usr/local ..
make -j && make install
- Install leveldb:
cd /tmp/
rm -rf leveldb
git clone https://github.com/google/leveldb.git
cd leveldb
mkdir build && cd build
CXXFLAGS="-fPIC" cmake -D CMAKE_INSTALL_PREFIX=/project/k1341/.usr/local ..
make -j && make install
- Install OpenCV:
cd /tmp/
wget 'https://github.com/Itseez/opencv/archive/2.4.8.tar.gz'
tar xzf 2.4.8.tar.gz
cd opencv-2.4.8/
mkdir build && cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D BUILD_opencv_python=OFF -D CMAKE_INSTALL_PREFIX=/project/k1341/.usr/local -D BUILD_opencv_gpu=OFF -DENABLE_PRECOMPILED_HEADERS=OFF ..
make -j && make install
- Install Boost:
cd /tmp/
rm -rf boost_1_55_0
wget "http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.gz"
tar xzf boost_1_55_0.tar.gz
cd boost_1_55_0
./bootstrap.sh --prefix=/project/k1341/.usr/local
./b2 -j 16 && ./b2 install
- Install lmdb:
cd /tmp
rm -rf lmdb
git clone https://github.com/LMDB/lmdb
cd lmdb/libraries/liblmdb
make -j && make prefix=/project/k1341/.usr/local install
- Install gflags:
cd /tmp/
rm -rf gflags
git clone https://github.com/gflags/gflags
cd gflags
mkdir build && cd build
CXXFLAGS="-fPIC" cmake -D CMAKE_INSTALL_PREFIX=/project/k1341/.usr/local ..
make -j && make install
- Install glog:
cd /tmp/
rm -rf glog
git clone https://github.com/google/glog
cd glog
./autogen.sh
./configure --prefix=/project/k1341/.usr/local
make -j && make install
git clone https://github.com/intel/caffe
cd caffe
-
change Makefile.mkldnn
8. MKLDNN_CXX := CC 9. MKLDNN_CC := cc -
change Makefile.config (run
cp Makefile.config.example Makefile.configfirst)# Whatever else you find you need goes here. INCLUDE_DIRS := $(PYTHON_INCLUDE) ${SERIAL_HDF5_INCLUDE} /project/k1341/.usr/local/include /usr/local/include LIBRARY_DIRS := $(PYTHON_LIB) /project/k1341/.usr/local/lib /project/k1341/.usr/local/lib64 /usr/local/lib /usr/lib # Allow distributed training ALLOW_LMDB_NOLOCK := 1 -
final make
export CRAYPE_LINK_TYPE=dynamic make all -j 12 ./examples/mnist/train_lenet.sh -
make on Shaheen
module use -a /project/k1341/.usr/local/share/modulefiles module load common export CRAYPE_LINK_TYPE=dynamic cd /project/k1341/softwares/caffe/ make -
run benchmark
git checkout origin/DAWN_Bench git checkout -b DAWN_Bench less models/intel_optimized_models/multinode/resnet_50_64_nodes_2k_batch/solver.prototxt