Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
136 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
AUTOMAKE_OPTIONS = foreign | ||
SUBDIRS = test_travis_lr test_travis_mf iterator | ||
SUBDIRS = test_travis_lr test_travis_mf test_travis iterator | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
AUTOMAKE_OPTIONS = foreign | ||
|
||
CXX=g++ | ||
CXXFLAGS=-Wall -ansi -O3 -std=c++17 -ggdb | ||
|
||
bin_PROGRAMS = test_register_worker test_keyvalue | ||
|
||
TOP_DIR=../../../.. | ||
THIRD_PARTY_DIR=../../third_party | ||
CIRRUS_SRC_DIR=../../src | ||
CIRRUS_SRC_FILES=$(CIRRUS_SRC_DIR)/Configuration.cpp \ | ||
$(CIRRUS_SRC_DIR)/Dataset.cpp \ | ||
$(CIRRUS_SRC_DIR)/Matrix.cpp \ | ||
$(CIRRUS_SRC_DIR)/LRModel.cpp \ | ||
$(CIRRUS_SRC_DIR)/SparseLRModel.cpp \ | ||
$(CIRRUS_SRC_DIR)/S3SparseIterator.cpp \ | ||
$(CIRRUS_SRC_DIR)/Utils.cpp \ | ||
$(CIRRUS_SRC_DIR)/MlUtils.cpp \ | ||
$(CIRRUS_SRC_DIR)/S3.cpp \ | ||
$(CIRRUS_SRC_DIR)/OptimizationMethod.cpp \ | ||
$(CIRRUS_SRC_DIR)/SGD.cpp \ | ||
$(CIRRUS_SRC_DIR)/Checksum.cpp \ | ||
$(CIRRUS_SRC_DIR)/MurmurHash3.cpp \ | ||
$(CIRRUS_SRC_DIR)/ModelGradient.cpp \ | ||
$(CIRRUS_SRC_DIR)/InputReader.cpp \ | ||
$(CIRRUS_SRC_DIR)/PSSparseServerInterface.cpp \ | ||
$(CIRRUS_SRC_DIR)/PSSparseServerTask.cpp \ | ||
$(CIRRUS_SRC_DIR)/SparseMFModel.cpp \ | ||
$(CIRRUS_SRC_DIR)/MFModel.cpp \ | ||
$(CIRRUS_SRC_DIR)/Nesterov.cpp \ | ||
$(CIRRUS_SRC_DIR)/AdaGrad.cpp \ | ||
$(CIRRUS_SRC_DIR)/Momentum.cpp \ | ||
$(CIRRUS_SRC_DIR)/S3Iterator.cpp \ | ||
$(CIRRUS_SRC_DIR)/S3IteratorLibsvm.cpp \ | ||
$(CIRRUS_SRC_DIR)/S3Client.cpp \ | ||
$(CIRRUS_SRC_DIR)/SparseDataset.cpp | ||
|
||
LINCLUDES = -L$(THIRD_PARTY_DIR)/kerberos/src/lib \ | ||
-L$(THIRD_PARTY_DIR)/keyutils/ \ | ||
-L$(THIRD_PARTY_DIR)/gflags/lib/ \ | ||
-L$(THIRD_PARTY_DIR)/curl/curl/lib/.libs/ \ | ||
-L$(THIRD_PARTY_DIR)/aws-sdk-cpp/build/aws-cpp-sdk-core/ \ | ||
-L$(THIRD_PARTY_DIR)/aws-sdk-cpp/build/aws-cpp-sdk-s3 \ | ||
-L/home/ec2-user/kerberos/krb5-1.15.2/src/lib \ | ||
-L/home/ec2-user/keyutils/keyutils-1.5.10 | ||
|
||
LIBS= -laws-cpp-sdk-s3 -laws-cpp-sdk-core \ | ||
-lcurl -lssl -lcrypto -lz -ldl -lkrb5 -lk5crypto \ | ||
-lall -lkeyutils -lresolv -lgflags | ||
|
||
LDFLAGS =-static-libgcc -static \ | ||
-Wl,--whole-archive -lpthread -Wl,--no-whole-archive | ||
|
||
LDADD = $(LINCLUDES) $(LIBS) | ||
|
||
AM_CPPFLAGS=-I$(CIRRUS_SRC_DIR) \ | ||
-I$(THIRD_PARTY_DIR)/aws-sdk-cpp/aws-cpp-sdk-s3/include/ \ | ||
-I$(THIRD_PARTY_DIR)/aws-sdk-cpp/aws-cpp-sdk-core/include/ \ | ||
-I$(THIRD_PARTY_DIR)/eigen_source/ | ||
|
||
test_register_worker_SOURCES = test_register_worker.cpp $(CIRRUS_SRC_FILES) | ||
test_keyvalue_SOURCES = test_keyvalue.cpp $(CIRRUS_SRC_FILES) | ||
|
||
clean: | ||
rm -rf a.out test_iterator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include <PSSparseServerInterface.h> | ||
|
||
using namespace cirrus; | ||
|
||
#define VALUE_SIZE (1000) | ||
|
||
int main() { | ||
std::unique_ptr<PSSparseServerInterface> psi = | ||
std::make_unique<PSSparseServerInterface>("127.0.0.1", 1337); | ||
psi->connect(); | ||
|
||
char value[VALUE_SIZE]; | ||
for (int i = 0; i < VALUE_SIZE; ++i) { | ||
value[i] = i; | ||
} | ||
|
||
psi->set_value("key", value, sizeof(value)); | ||
|
||
std::pair<std::shared_ptr<char>, uint32_t> ret = psi->get_value("key"); | ||
|
||
if (ret.second != sizeof(value)) { | ||
throw std::runtime_error("Wrong size"); | ||
} | ||
if (memcmp(&value, ret.first.get(), sizeof(value))) { | ||
throw std::runtime_error("Wrong value"); | ||
} | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
timeout 60 ./tests/test_travis_lr/test_ps& | ||
sleep 1 | ||
|
||
timeout 50 ./tests/test_travis/test_keyvalue& | ||
sleep 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
timeout 60 ./tests/test_travis_lr/test_ps& | ||
sleep 1 | ||
|
||
timeout 50 ./tests/test_travis/test_register_worker& | ||
sleep 1 |
File renamed without changes.