This repository was archived by the owner on Nov 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
MPI Tutorial
Ehsan Totoni edited this page Feb 17, 2016
·
8 revisions
This example walks through using Latte in MPI mode by training a vgg-like model on the cifar10 dataset and the tiny imagenet dataset (from Stanford's cs231 project).
This tutorial expects the environment variable LATTE_ROOT
to be set (i.e. export LATTE_ROOT=~/.julia/v0.4/Latte
).
- MPI (>= 3)
- HDF5 (compiled with
--enable-parallel
) - OpenCV (Optional for converting the tiny-imagenet dataset, unecessary for cifar10 example)
# Build the IO library
cd $LATTE_ROOT/deps
cd IO
cmake -DLATTE_MPI=ON . && make
cp libLatteIO.so ../
# Build the communication library
cd ../communication
cmake . && make
cp libLatteComm.so ../
- For HDF5 related Cmake errors, try setting
HDF5_ROOT=/path/to/HDF5/installation
cd $LATTE_ROOT/examples/cifar10/data
./get-data.sh
cd $LATTE_ROOT/examples/cifar10
LATTE_MPI=1 mpirun -np 2 julia vgg-mini.jl
cd $LATTE_ROOT/utils/converter
cmake . && make
cp convert_imagenet $LATTE_ROOT/bin
- For HDF5 related Cmake errors, try setting
HDF5_ROOT=/path/to/HDF5/installation
- If Cmake is having trouble finding OpenCV use the flag:
-DOpenCV_DIR=/path/to/installation/share/OpenCV
cd $LATTE_ROOT/examples/tiny-imagenet/data
./get-data.sh # Optional argument: path to download/convert dataset (i.e. a scratch directory)
cd $LATTE_ROOT/examples/tiny-imagenet
LATTE_MPI=1 mpirun -np 2 julia vgg-mini.jl