Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
mli committed Apr 11, 2015
2 parents cdd763f + db48392 commit 3cdde7d
Show file tree
Hide file tree
Showing 188 changed files with 8,736 additions and 18,240 deletions.
25 changes: 14 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
/data
/build
/lib
/bin
/third_party
/output
/cache
/log
*.d
*.o
example/**/data
example/**/model
build
third_party
**/log/**
**/cache/**
**/output/**
*.pb.cc
*.pb.h
.*
/script/van*
*core*
config.mk
**/bak/**
doc/html
doc/latex
test/
54 changes: 25 additions & 29 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,61 +1,57 @@
CC = g++

# OPT = -O0 -ggdb
OPT = -O3 -ggdb
ifneq ("$(wildcard ./config.mk)","")
include ./config.mk
else
include make/config.mk
endif

THIRD_PATH=$(shell pwd)/third_party
STATIC_THIRD_LIB=0
USE_S3=0
ifeq ($(STATIC_THIRD_LIB), 1)
THIRD_LIB=$(addprefix $(THIRD_PATH)/lib/, libgflags.a libzmq.a libprotobuf.a libglog.a libz.a libsnappy.a)
ifeq ($(USE_S3), 1)
ifeq ($(USE_S3),1)
THIRD_LIB+=$(addprefix $(THIRD_PATH)/lib/, libxml2.a)
endif
else
THIRD_LIB=-L$(THIRD_PATH)/lib -lgflags -lzmq -lprotobuf -lglog -lz -lsnappy
ifeq ($(USE_S3), 1)
THIRD_LIB+=-lxml2
endif
ifeq ($(USE_S3),1)
THIRD_LIB+=-lxml2
endif
endif
# THIRD_LIB+=-ltcmalloc_and_profiler

WARN = -Wall -Wno-unused-function -finline-functions -Wno-sign-compare #-Wconversion
INCPATH = -I./src -I$(THIRD_PATH)/include
CFLAGS = -std=c++0x $(WARN) $(OPT) $(INCPATH)
CFLAGS = -std=c++0x $(WARN) $(OPT) $(INCPATH) $(EXTRA_CFLAGS)
ifeq ($(USE_S3), 1)
CFLAGS += -DUSE_S3=1
endif
LDFLAGS += $(THIRD_LIB) -lpthread -lrt
LDFLAGS = $(EXTRA_LDFLAGS) $(THIRD_LIB) -lpthread # -lrt

PS_LIB = build/libps.a
PS_MAIN = build/libpsmain.a
TEST_MAIN = build/test_main.o

all: ps app
clean:
rm -rf build
find . -name "*.pb.[ch]*" -delete

ps: $(PS_LIB) $(PS_MAIN)
app: build/ps
ps: $(PS_LIB) $(PS_MAIN) $(TEST_MAIN)

build/hello: build/app/hello_world/main.o $(PS_LIB) $(PS_MAIN)
$(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@

sys_srcs = $(wildcard src/util/*.cc) $(wildcard src/data/*.cc) \
$(wildcard src/system/*.cc) $(wildcard src/filter/*.cc)
sys_protos = $(wildcard src/*/proto/*.proto)
# PS system
sys_dir = $(addprefix src/, util data system filter learner parameter)
sys_srcs = $(wildcard $(patsubst %, %/*.cc, $(sys_dir)))
sys_protos = $(wildcard $(patsubst %, %/proto/*.proto, $(sys_dir)))
sys_objs = $(patsubst src/%.proto, build/%.pb.o, $(sys_protos)) \
$(patsubst src/%.cc, build/%.o, $(sys_srcs))
build/libps.a: $(sys_objs)
ar crv $@ $?
$(patsubst src/%.cc, build/%.o, $(sys_srcs))

build/libps.a: $(patsubst %.proto, %.pb.h, $(sys_protos)) $(sys_objs)
ar crv $@ $(filter %.o, $?)

build/libpsmain.a: build/ps_main.o
ar crv $@ $?

app_objs = $(addprefix build/app/, main/proto/app.pb.o linear_method/linear.o linear_method/proto/linear.pb.o)

build/ps: build/app/main/main.o $(app_objs) $(PS_LIB)
# applications
build/linear: $(addprefix build/app/linear_method/, proto/linear.pb.o main.o) $(PS_LIB)
$(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@

# general rules
build/%.o: src/%.cc
@mkdir -p $(@D)
$(CC) $(INCPATH) -std=c++0x -MM -MT build/$*.o $< >build/$*.d
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Parameter Server

The parameter server is a distributed system scaling to industry size machine
learning problems. It is a joint project by [CMU SML-Lab](http://sml-lab.com),
[Baidu IDL](http://idl.baidu.com/en/), and [Google](http://research.google.com).


- [Document](doc/)
- [Wiki](https://github.com/dmlc/parameter_server/wiki/)
- How to [build](make/)
- Examples
- [Linear method](example/linear)
- Deep neural network, see [CXXNET](https://github.com/dmlc/cxxnet) and [Minverva](https://github.com/minerva-developers/minerva)
24 changes: 0 additions & 24 deletions README.org

This file was deleted.

Loading

0 comments on commit 3cdde7d

Please sign in to comment.