Commit e121e238 authored by whitlocb's avatar whitlocb
Browse files

Some small changes geared towards getting parallel source files building on...

Some small changes geared towards getting parallel source files building on Windows. I built on Mac to see if they had negative impacts and they didn't. Hopefully the same is true on Linux.




git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@14297 18c085ea-50e0-402c-830e-de6fd14e8384
parent a3ced84d
......@@ -147,7 +147,7 @@ avtWholeImageCompositerNoZ::InitializeMPIStuff(void)
{
MPI_Type_contiguous(3, MPI_UNSIGNED_CHAR, &avtWholeImageCompositerNoZ::mpiTypeZFPixel);
MPI_Type_commit(&avtWholeImageCompositerNoZ::mpiTypeZFPixel);
MPI_Op_create(MergeZFPixelBuffers, 1,
MPI_Op_create((MPI_User_function*)MergeZFPixelBuffers, 1,
&avtWholeImageCompositerNoZ::mpiOpMergeZFPixelBuffers);
}
......
......@@ -184,7 +184,7 @@ avtWholeImageCompositerWithZ::InitializeMPIStuff(void)
MPI_Type_struct(n, lengths, displacements, types,
&avtWholeImageCompositerWithZ::mpiTypeZFPixel);
MPI_Type_commit(&avtWholeImageCompositerWithZ::mpiTypeZFPixel);
MPI_Op_create(MergeZFPixelBuffers, 1,
MPI_Op_create((MPI_User_function *)MergeZFPixelBuffers, 1,
&avtWholeImageCompositerWithZ::mpiOpMergeZFPixelBuffers);
}
......
......@@ -363,7 +363,7 @@ UnifyMinMax(double *buff, int size, int altsize)
// if it hasn't been created yet, create the min/max MPI reduction operator
if (AVT_MPI_MINMAX == MPI_OP_NULL)
MPI_Op_create(MinMaxOp, true, &AVT_MPI_MINMAX);
MPI_Op_create((MPI_User_function *)MinMaxOp, true, &AVT_MPI_MINMAX);
// we do this 'extra' communication if we can't be sure all processors
// have an agreed upon size to work with. This will have effect of
......
......@@ -48,6 +48,10 @@
#include <visitstream.h>
#include <visit-config.h>
#if defined(_WIN32)
#include <windows.h> // needed for Win32 SleepEx()
#endif
#if defined(HAVE_SELECT) && defined(VISIT_USE_NOSPIN_BCAST)
int MPIXfer::nanoSecsOfSleeps = 50000000; // 1/20th of a second
#else
......@@ -539,8 +543,12 @@ MPIXfer::VisIt_MPI_Bcast(void *buf, int count, MPI_Datatype datatype, int root,
debug5 << "VisIt_MPI_Bcast started using " << nanoSecsOfSleeps / 1.0e9
<< " seconds of nanosleep" << endl;
first = false;
#if defined(_WIN32)
SleepEx((DWORD)(nanoSecsOfSleeps/1e6), false);
#else
struct timespec ts = {0, nanoSecsOfSleeps};
nanosleep(&ts, 0);
#endif
}
}
}
......
......@@ -42,7 +42,9 @@
#include <string>
#include <sys/types.h>
#include <sys/wait.h>
#if !defined(_WIN32)
#include <unistd.h>
#endif
#include <vector>
#include <XDisplay.h>
......
......@@ -25,7 +25,12 @@
#include <assert.h>
#include <stdlib.h>
#include <limits.h>
#if defined(_WIN32)
#include <win32-hostid.h>
#else
#include <unistd.h>
#endif
#include <mpi.h>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment