Merge pull request #16 from lwh1990/master

compile fixes for macOS (lseek64 and open64; NCMPI build)
master
Glenn K. Lockwood 2017-11-20 12:29:34 -07:00 committed by GitHub
commit 3995f975c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View File

@ -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)
{

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();