Skip to content

Commit

Permalink
modify
Browse files Browse the repository at this point in the history
  • Loading branch information
tqchen committed May 28, 2015
1 parent 9520b90 commit 8bbed35
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
9 changes: 8 additions & 1 deletion Makefile
Expand Up @@ -4,7 +4,14 @@ endif
export MPICXX = mpicxx
export LDFLAGS= -Llib -lrt
export WARNFLAGS= -Wall -Wextra -Wno-unused-parameter -Wno-unknown-pragmas -pedantic
export CFLAGS = -O3 -msse2 -fPIC $(WARNFLAGS)
export CFLAGS = -O3 -msse2 $(WARNFLAGS)

ifndef WITH_FPIC
WITH_FPIC = 1
endif
ifeq ($(WITH_FPIC), 1)
CFLAGS += -fPIC
endif

# build path
BPATH=.
Expand Down
8 changes: 6 additions & 2 deletions guide/basic.cc
Expand Up @@ -5,11 +5,15 @@
*
* \author Tianqi Chen
*/
#include <vector>
#include <rabit.h>
using namespace rabit;
const int N = 3;
int main(int argc, char *argv[]) {
int a[N];
int N = 3;
if (argc > 1) {
N = atoi(argv[1]);
}
std::vector<int> a(N);
rabit::Init(argc, argv);
for (int i = 0; i < N; ++i) {
a[i] = rabit::GetRank() + i;
Expand Down

0 comments on commit 8bbed35

Please sign in to comment.