fix a bug when compile with ncmpi enabled

The file "src/aiori-NCMPI.c" uses numTasksWorld as the process which is declared in "src/ior.h".   In "src/mdtest.c", NCMPI backend will be called if IOR configured with ncmpi enabled but numTasksWorld was not defined in "src/mdtest.c". So it will cause a compiler error like below:
mdtest-aiori-NCMPI.o: In function `NCMPI_Xfer':
/home/parallels/Documents/ior/src/aiori-NCMPI.c:272: undefined reference to `numTasksWorld'
master
VinsonLeung 2017-11-19 16:38:12 -06:00 committed by GitHub
parent 9c4bf51d82
commit fd0e99e544
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -119,6 +119,9 @@ static int depth;
/* needed for MPI/IO backend to link correctly */
int rankOffset = 0;
/* needed for NCMPI backend to link correctly */
int numTasksWorld = 0;
/*
* This is likely a small value, but it's sometimes computed by
* branch_factor^(depth+1), so we'll make it a larger variable,
@ -1819,6 +1822,9 @@ int main(int argc, char **argv) {
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Comm_size(MPI_COMM_WORLD, &size);
/* NCMPI backend uses numTaskWorld as size */
numTasksWorld = size;
pid = getpid();
uid = getuid();