Permalink
Browse files

added new makefiles in driver directory, updates root Makefile accord…

…ingly
  • Loading branch information...
Ubuntu
Ubuntu committed Nov 20, 2017
1 parent 3b10ff4 commit 6b4beadd01e62a981ec8b8813c31d2f2a34857ba
View
@@ -4,14 +4,17 @@
include config.mk
COMMON_INCLUDES=$(SOURCE_DIR)/common
PROTONN_INCLUDES=$(SOURCE_DIR)/ProtoNN
BONSAI_INCLUDES=$(SOURCE_DIR)/Bonsai
SOURCE_DIR=src
DRIVER_DIR=drivers
IFLAGS=-I eigen/ -I$(MKL_ROOT)/include \
-I$(COMMON_INCLUDES) -I$(PROTONN_INCLUDES) -I$(BONSAI_INCLUDES)
COMMON_DIR=$(SOURCE_DIR)/common
PROTONN_DIR=$(SOURCE_DIR)/ProtoNN
BONSAI_DIR=$(SOURCE_DIR)/Bonsai
all: ProtoNN ProtoNNPredict Bonsai BonsaiPredict #ProtoNNIngestTest BonsaiIngestTest
IFLAGS = -I eigen/ -I$(MKL_ROOT)/include \
-I$(COMMON_DIR) -I$(PROTONN_DIR) -I$(BONSAI_DIR)
all: ProtoNNTrain ProtoNNPredict BonsaiTrain BonsaiPredict #ProtoNNIngestTest BonsaiIngestTest
libcommon.so: $(COMMON_INCLUDES)
$(MAKE) -C $(SOURCE_DIR)/common
@@ -22,47 +25,40 @@ libProtoNN.so: $(PROTONN_INCLUDES)
libBonsai.so: $(BONSAI_INCLUDES)
$(MAKE) -C $(SOURCE_DIR)/Bonsai
ProtoNNTrainDriver.o: ProtoNNTrainDriver.cpp $(PROTONN_INCLUDES)
$(CC) -c -o $@ $(IFLAGS) $(CFLAGS) $<
ProtoNNPredictDriver.o: ProtoNNPredictDriver.cpp $(PROTONN_INCLUDES)
$(CC) -c -o $@ $(IFLAGS) $(CFLAGS) $<
ProtoNNIngestTest.o: ProtoNNIngestTest.cpp $(PROTONN_INCLUDES)
$(CC) -c -o $@ $(IFLAGS) $(CFLAGS) $<
ProtoNNTrainDriver.o:
$(MAKE) -C $(DRIVER_DIR)/ProtoNN/trainer
BonsaiLocalDriver.o:BonsaiLocalDriver.cpp $(BONSAI_INCLUDES)
$(CC) -c -o $@ $(IFLAGS) $(CFLAGS) $<
ProtoNNPredictDriver.o:
$(MAKE) -C $(DRIVER_DIR)/ProtoNN/predictor
BonsaiPredictDriver.o:BonsaiPredictDriver.cpp $(BONSAI_INCLUDES)
$(CC) -c -o $@ $(IFLAGS) $(CFLAGS) $<
BonsaiTrainDriver.o:
$(MAKE) -C $(DRIVER_DIR)/Bonsai/trainer
BonsaiTrainDriver.o:BonsaiTrainDriver.cpp $(BONSAI_INCLUDES)
$(CC) -c -o $@ $(IFLAGS) $(CFLAGS) $<
BostinPredictDriver.o:
$(MAKE) -C $(DRIVER_DIR)/Bonsai/predictor
BonsaiIngestTest.o:BonsaiIngestTest.cpp $(BONSAI_INCLUDES)
$(CC) -c -o $@ $(IFLAGS) $(CFLAGS) $<
#ProtoNNIngestTest.o BonsaiIngestTest.o:
ProtoNN: ProtoNNTrainDriver.o libcommon.so libProtoNN.so
ProtoNNTrain: ProtoNNTrainDriver.o libcommon.so libProtoNN.so
$(CC) -o $@ $^ $(CFLAGS) $(MKL_PAR_LDFLAGS) $(CILK_LDFLAGS)
ProtoNNPredict: ProtoNNPredictDriver.o libcommon.so libProtoNN.so
$(CC) -o $@ $^ $(CFLAGS) $(MKL_PAR_LDFLAGS) $(CILK_LDFLAGS)
ProtoNNIngestTest: ProtoNNIngestTest.o libcommon.so libProtoNN.so
$(CC) -o $@ $^ $(CFLAGS) $(MKL_PAR_LDFLAGS) $(CILK_LDFLAGS)
#ProtoNNIngestTest: ProtoNNIngestTest.o libcommon.so libProtoNN.so
# $(CC) -o $@ $^ $(CFLAGS) $(MKL_PAR_LDFLAGS) $(CILK_LDFLAGS)
Bonsai: BonsaiLocalDriver.o libcommon.so libBonsai.so
$(CC) -o $@ $^ $(CFLAGS) $(MKL_SEQ_LDFLAGS) $(CILK_LDFLAGS)
#Bonsai: BonsaiLocalDriver.o libcommon.so libBonsai.so
# $(CC) -o $@ $^ $(CFLAGS) $(MKL_SEQ_LDFLAGS) $(CILK_LDFLAGS)
BonsaiPredict: BonsaiPredictDriver.o libcommon.so libBonsai.so
BonsaiTrain: BonsaiTrainDriver.o libcommon.so libBonsai.so
$(CC) -o $@ $^ $(CFLAGS) $(MKL_SEQ_LDFLAGS) $(CILK_LDFLAGS)
BonsaiTrain: BonsaiTrainDriver.o libcommon.so libBonsai.so
BonsaiPredict: BonsaiPredictDriver.o libcommon.so libBonsai.so
$(CC) -o $@ $^ $(CFLAGS) $(MKL_SEQ_LDFLAGS) $(CILK_LDFLAGS)
BonsaiIngestTest: BonsaiIngestTest.o libcommon.so libBonsai.so
$(CC) -o $@ $^ $(CFLAGS) $(MKL_PAR_LDFLAGS) $(CILK_LDFLAGS)
#BonsaiIngestTest: BonsaiIngestTest.o libcommon.so libBonsai.so
# $(CC) -o $@ $^ $(CFLAGS) $(MKL_PAR_LDFLAGS) $(CILK_LDFLAGS)
.PHONY: clean cleanest
@@ -72,9 +68,17 @@ clean:
$(MAKE) -C $(SOURCE_DIR)/common clean
$(MAKE) -C $(SOURCE_DIR)/ProtoNN clean
$(MAKE) -C $(SOURCE_DIR)/Bonsai clean
$(MAKE) -C $(DRIVER_DIR)/ProtoNN/trainer clean
$(MAKE) -C $(DRIVER_DIR)/ProtoNN/predictor clean
$(MAKE) -C $(DRIVER_DIR)/Bonsai/trainer clean
$(MAKE) -C $(DRIVER_DIR)/Bonsai/predictor clean
cleanest: clean
rm -f ProtoNN ProtoNNPredict ProtoNNIngestTest BonsaiIngestTest Bonsai
$(MAKE) -C $(SOURCE_DIR)/common cleanest
$(MAKE) -C $(SOURCE_DIR)/ProtoNN cleanest
$(MAKE) -C $(SOURCE_DIR)/Bonsai cleanest
$(MAKE) -C $(DRIVER_DIR)/ProtoNN/trainer cleanest
$(MAKE) -C $(DRIVER_DIR)/ProtoNN/predictor cleanest
$(MAKE) -C $(DRIVER_DIR)/Bonsai/trainer cleanest
$(MAKE) -C $(DRIVER_DIR)/Bonsai/predictor cleanest
View
@@ -21,5 +21,3 @@ CILK_FLAGS = -fcilkplus -DCILK
CC=g++-5
CFLAGS= -p -g -fPIC -O3 -std=c++11 -DLINUX $(DEBUGGING_FLAGS) $(CONFIG_FLAGS) $(MKL_EIGEN_FLAGS) $(CILK_FLAGS)
SOURCE_DIR=src
@@ -0,0 +1,24 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
include ../../../config.mk
SOURCE_DIR=../../../src
COMMON_DIR=$(SOURCE_DIR)/common
PROTONN_DIR=$(SOURCE_DIR)/Bonsai
IFLAGS = -I ../../../eigen -I$(MKL_ROOT)/include \
-I$(COMMON_DIR) -I$(PROTONN_DIR)
all: ../../../BonsaiPredictDriver.o
../../../BonsaiPredictDriver.o: BonsaiPredictDriver.cpp
$(CC) -c -o $@ $(IFLAGS) $(CFLAGS) $<
.PHONY: clean cleanest
clean:
rm -f ../../../BonsaiPredictDriver.o
cleanest: clean
rm *~
@@ -0,0 +1,24 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
include ../../../config.mk
SOURCE_DIR=../../../src
COMMON_DIR=$(SOURCE_DIR)/common
PROTONN_DIR=$(SOURCE_DIR)/Bonsai
IFLAGS = -I ../../../eigen -I$(MKL_ROOT)/include \
-I$(COMMON_DIR) -I$(PROTONN_DIR)
all: ../../../BonsaiTrainDriver.o
../../../BonsaiTrainDriver.o: BonsaiTrainDriver.cpp
$(CC) -c -o $@ $(IFLAGS) $(CFLAGS) $<
.PHONY: clean cleanest
clean:
rm -f ../../../BonsaiTrainDriver.o
cleanest: clean
rm *~
@@ -0,0 +1,24 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
include ../../../config.mk
SOURCE_DIR=../../../src
COMMON_DIR=$(SOURCE_DIR)/common
PROTONN_DIR=$(SOURCE_DIR)/ProtoNN
IFLAGS = -I ../../../eigen -I$(MKL_ROOT)/include \
-I$(COMMON_DIR) -I$(PROTONN_DIR)
all: ../../../ProtoNNPredictDriver.o
../../../ProtoNNPredictDriver.o: ProtoNNPredictDriver.cpp
$(CC) -c -o $@ $(IFLAGS) $(CFLAGS) $<
.PHONY: clean cleanest
clean:
rm -f ../../../ProtoNNPredictDriver.o
cleanest: clean
rm *~
@@ -0,0 +1,24 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
include ../../../config.mk
SOURCE_DIR=../../../src
COMMON_DIR=$(SOURCE_DIR)/common
PROTONN_DIR=$(SOURCE_DIR)/ProtoNN
IFLAGS = -I ../../../eigen -I$(MKL_ROOT)/include \
-I$(COMMON_DIR) -I$(PROTONN_DIR)
all: ../../../ProtoNNTrainDriver.o
../../../ProtoNNTrainDriver.o: ProtoNNTrainDriver.cpp
$(CC) -c -o $@ $(IFLAGS) $(CFLAGS) $<
.PHONY: clean cleanest
clean:
rm -f ../../../ProtoNNTrainDriver.o
cleanest: clean
rm *~
@@ -10,7 +10,7 @@
input_dir="-D ./usps10"
input_format="-f 0"
model_dir="-M ./usps10/BonsaiResults/23_44_23_15_11" # Note: The model_dir has to be changed as Model naming is based on timestamp so required to be changed by the user
model_dir="-M ./usps10/BonsaiResults/10_21_41_20_11" # Note: The model_dir has to be changed as Model naming is based on timestamp so required to be changed by the user
########################################################
# Data-dependent parameters
@@ -6,8 +6,8 @@
test_file="-I usps10/test.txt"
model_file="-M usps10/ProtoNNResults/ProtoNNTrainer_pd_15_protPerClass_0_prot_200_spW_1.000000_spZ_1.000000_spB_1.000000_gammaNumer_1.000000_normal_3_seed_42_bs_1024_it_20_ep_20/model"
normalization_file="-n usps10/ProtoNNResults/ProtoNNTrainer_pd_15_protPerClass_0_prot_200_spW_1.000000_spZ_1.000000_spB_1.000000_gammaNumer_1.000000_normal_3_seed_42_bs_1024_it_20_ep_20/minMaxParams"
model_file="-M usps10/ProtoNNResults/ProtoNNTrainer_pd_15_protPerClass_0_prot_200_spW_1.000000_spZ_1.000000_spB_1.000000_gammaNumer_1.000000_normal_3_seed_42_bs_1024_it_2_ep_20/model"
normalization_file="-n usps10/ProtoNNResults/ProtoNNTrainer_pd_15_protPerClass_0_prot_200_spW_1.000000_spZ_1.000000_spB_1.000000_gammaNumer_1.000000_normal_3_seed_42_bs_1024_it_2_ep_20/minMaxParams"
output_dir="-O usps10/ProtoNNResults"
input_format="-F 0"
ntest="-e 2007"

0 comments on commit 6b4bead

Please sign in to comment.