Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

the dir is wrong #161

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Applications/LogisticRegression/src/reader.cpp
Expand Up @@ -44,7 +44,7 @@ SampleReader<EleType>::SampleReader(
}
files_.push_back(files.substr(prev));

buffer_ = CeateSamples<EleType>(buffer_size_, row_size, sparse);
buffer_ = CreateSamples<EleType>(buffer_size_, row_size, sparse);


if (init) {
Expand Down
2 changes: 1 addition & 1 deletion Applications/LogisticRegression/src/util/common.h
Expand Up @@ -46,7 +46,7 @@ inline EleType* MatrixRow(EleType*matrix, int row_id, size_t num_col) {
}

template <typename EleType>
Sample<EleType>** CeateSamples(int num, size_t size, bool sparse) {
Sample<EleType>** CreateSamples(int num, size_t size, bool sparse) {
Sample<EleType>**samples = new Sample<EleType>*[num];
for (int i = 0; i < num; ++i) {
samples[i] = new Sample<EleType>(sparse, size);
Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Expand Up @@ -13,12 +13,16 @@ find_package(MPI REQUIRED)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")

# add for sake of errors like 'undefined reference to `hdfsWrite`'
if(USE_HDFS)
ADD_DEFINITIONS(-DMULTIVERSO_USE_HDFS)
SET(JVM_LIB /usr/local/java/default/jre/lib/amd64/server)
SET(HDFS_LIB /usr/local/hadoop/lib/native)
SET(HDFS_INCLUDE /usr/local/hadoop/include)
LINK_DIRECTORIES(${HDFS_LIB})
LINK_DIRECTORIES(${JVM_LIB})
include_directories(${HDFS_INCLUDE})
link_libraries(hdfs)
endif(USE_HDFS)

if(ENABLE_DCASGD)
Expand Down
2 changes: 1 addition & 1 deletion include/multiverso/io/hdfs_stream.h
Expand Up @@ -8,7 +8,7 @@
* \brief The implement of hdfs io interface.
*/

#include "multiverso/util/io.h"
#include "multiverso/io/io.h"
#include "hdfs.h"

#include <cstring>
Expand Down
7 changes: 6 additions & 1 deletion src/io/hdfs_stream.cpp
@@ -1,9 +1,14 @@
#ifdef MULTIVERSO_USE_HDFS

#include "multiverso/util/hdfs_stream.h"
#include "multiverso/io/hdfs_stream.h"

namespace multiverso {

// add O_BINARY define, for no difference for text/binary in unix*
#ifndef O_BINARY
#define O_BINARY 0
#endif

HDFSStream::HDFSStream(hdfsFS fs, const URI &uri, FileOpenMode mode) {
using namespace std;
is_good_ = true;
Expand Down