From 9c4bf51d8245ede4bf1411be36cfa6922b8442cd Mon Sep 17 00:00:00 2001 From: VinsonLeung Date: Sun, 19 Nov 2017 15:27:34 -0600 Subject: [PATCH 1/2] Update cbif.c fix a bug when compiling IOR in MacOS will cause error "Undefined symbols for _lseek64 and _open64" --- contrib/cbif.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/contrib/cbif.c b/contrib/cbif.c index ac0d16d..deb127c 100755 --- a/contrib/cbif.c +++ b/contrib/cbif.c @@ -36,6 +36,14 @@ #define BYTE_BOUNDARY 8 +#ifndef open64 /* necessary for TRU64 -- */ +# define open64 open /* unlikely, but may pose */ +#endif /* not open64 */ /* conflicting prototypes */ + +#ifndef lseek64 /* necessary for TRU64 -- */ +# define lseek64 lseek /* unlikely, but may pose */ +#endif /* not lseek64 */ /* conflicting prototypes */ + int main(int argc, char **argv) { From fd0e99e54492a88d90a57fa2cd4d2072306afa76 Mon Sep 17 00:00:00 2001 From: VinsonLeung Date: Sun, 19 Nov 2017 16:38:12 -0600 Subject: [PATCH 2/2] 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' --- src/mdtest.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mdtest.c b/src/mdtest.c index f33748f..2bc66bc 100644 --- a/src/mdtest.c +++ b/src/mdtest.c @@ -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();