This commit is contained in:
tqchen 2015-05-28 10:44:19 -07:00
parent 9520b90c4f
commit 8bbed35736
2 changed files with 14 additions and 3 deletions

View File

@ -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=.

View File

@ -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;