modify
This commit is contained in:
parent
9520b90c4f
commit
8bbed35736
9
Makefile
9
Makefile
@ -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=.
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user