An update will be applied December 9th, between 12PM and 1:00PM EST (UTC -5:00). The site may be slow during that time.

Commit f01e53d0 authored by Kenneth Moreland's avatar Kenneth Moreland
Browse files

Merge branch 'release'

parents 66283091 e39ef09a
......@@ -32,6 +32,13 @@ SET(ICET_LIBRARY_DIR ${LIBRARY_OUTPUT_PATH})
SET(ICET_EXECUTABLE_DIR ${EXECUTABLE_OUTPUT_PATH})
SET(C_TEST_PATH ${EXECUTABLE_OUTPUT_PATH})
# CMAKE_CONFIGURATION_TYPES is set for generators that support multiple
# configurations e.g. Visual Studio. In that case we update the C_TEST_PATH to
# include the configuration type (CTEST_CONFIGURATION_TYPE)
IF (CMAKE_CONFIGURATION_TYPES)
SET (C_TEST_PATH ${C_TEST_PATH}/\${CTEST_CONFIGURATION_TYPE})
ENDIF(CMAKE_CONFIGURATION_TYPES)
SET(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH}
${CMAKE_SOURCE_DIR}/cmake
......@@ -109,16 +116,25 @@ ENDIF (ICET_USE_OPENGL)
# Configure MPI support.
IF (ICET_USE_MPI)
FIND_PACKAGE(MPI REQUIRED)
MARK_AS_ADVANCED(CLEAR MPI_INCLUDE_PATH)
MARK_AS_ADVANCED(CLEAR MPI_LIBRARY)
MARK_AS_ADVANCED(CLEAR MPI_EXTRA_LIBRARY)
INCLUDE_DIRECTORIES(${MPI_INCLUDE_PATH})
SET(ICET_MPI_LIBRARIES ${MPI_LIBRARY})
IF(MPI_EXTRA_LIBRARY)
SET(ICET_MPI_LIBRARIES ${ICET_MPI_LIBRARIES} ${MPI_EXTRA_LIBRARY})
ENDIF(MPI_EXTRA_LIBRARY)
# Mark certain variables as non-advanced.
IF (DEFINED MPI_C_COMPILER)
# Using newer MPI module.
# Older MPI module
MARK_AS_ADVANCED(CLEAR MPI_C_INCLUDE_PATH)
MARK_AS_ADVANCED(CLEAR MPI_C_LIBRARIES)
INCLUDE_DIRECTORIES(${MPI_C_INCLUDE_PATH})
SET (ICET_MPI_LIBRARIES ${MPI_C_LIBRARIES})
ELSE (DEFINED MPI_C_COMPILER)
# Older MPI module
MARK_AS_ADVANCED(CLEAR MPI_INCLUDE_PATH)
MARK_AS_ADVANCED(CLEAR MPI_LIBRARY)
MARK_AS_ADVANCED(CLEAR MPI_EXTRA_LIBRARY)
INCLUDE_DIRECTORIES(${MPI_INCLUDE_PATH})
SET(ICET_MPI_LIBRARIES ${MPI_LIBRARY} ${MPI_EXTRA_LIBRARY})
ENDIF(DEFINED MPI_C_COMPILER)
# Set up variables used to run MPI programs. In CMake 2.8 or later, they are
# defined by the FindMPI module.
......
......@@ -27,6 +27,9 @@ Revision 2.1:
compositing algorithms to try shuffling the pixels in images to
better load balance the active pixels during compositing.
Patch 1: Fixed compatibility issue with compiling against MPI
version 1. Fixed build issues for Windows.
Revision 2.0: A major restructuring of the IceT code comprising the
following changes:
......
......@@ -11,6 +11,8 @@
#include <IceTDevCommunication.h>
#include <IceTDevDiagnostics.h>
#include <IceTDevPorting.h>
#include <IceTDevState.h>
#include <stdlib.h>
#include <string.h>
......@@ -19,8 +21,14 @@
#define BREAK_ON_MPI_ERROR
#endif
#if MPI_VERSION >= 2
#define ICET_USE_MPI_IN_PLACE
#endif
#define ICET_MPI_REQUEST_MAGIC_NUMBER ((IceTEnum)0xD7168B00)
#define ICET_MPI_TEMP_BUFFER_0 (ICET_COMMUNICATION_LAYER_START | (IceTEnum)0x00)
static IceTCommunicator Duplicate(IceTCommunicator self);
static void Destroy(IceTCommunicator self);
static void Barrier(IceTCommunicator self);
......@@ -324,7 +332,17 @@ static void Gather(IceTCommunicator self,
CONVERT_DATATYPE(datatype, mpitype);
if (sendbuf == ICET_IN_PLACE_COLLECT) {
#ifdef ICET_USE_MPI_IN_PLACE
sendbuf = MPI_IN_PLACE;
#else
int rank;
MPI_Comm_rank(MPI_COMM, &rank);
sendbuf = icetGetStateBuffer(ICET_MPI_TEMP_BUFFER_0,
sendcount*icetTypeWidth(datatype));
memcpy((void *)sendbuf,
((const IceTByte *)recvbuf) + rank*sendcount,
sendcount);
#endif
}
MPI_Gather((void *)sendbuf, sendcount, mpitype,
......@@ -345,7 +363,18 @@ static void Gatherv(IceTCommunicator self,
CONVERT_DATATYPE(datatype, mpitype);
if (sendbuf == ICET_IN_PLACE_COLLECT) {
#ifdef ICET_USE_MPI_IN_PLACE
sendbuf = MPI_IN_PLACE;
#else
int rank;
MPI_Comm_rank(MPI_COMM, &rank);
sendcount = recvcounts[rank];
sendbuf = icetGetStateBuffer(ICET_MPI_TEMP_BUFFER_0,
sendcount*icetTypeWidth(datatype));
memcpy((void *)sendbuf,
((const IceTByte *)recvbuf) + recvoffsets[rank],
sendcount);
#endif
}
MPI_Gatherv((void *)sendbuf, sendcount, mpitype,
......@@ -363,7 +392,17 @@ static void Allgather(IceTCommunicator self,
CONVERT_DATATYPE(datatype, mpitype);
if (sendbuf == ICET_IN_PLACE_COLLECT) {
#ifdef ICET_USE_MPI_IN_PLACE
sendbuf = MPI_IN_PLACE;
#else
int rank;
MPI_Comm_rank(MPI_COMM, &rank);
sendbuf = icetGetStateBuffer(ICET_MPI_TEMP_BUFFER_0,
sendcount*icetTypeWidth(datatype));
memcpy((void *)sendbuf,
((const IceTByte *)recvbuf) + rank*sendcount,
sendcount);
#endif
}
MPI_Allgather((void *)sendbuf, sendcount, mpitype,
......
......@@ -85,7 +85,7 @@ struct IceTCommunicatorStruct {
const void *sendbuf,
int sendcount,
IceTEnum datatype,
void *recvbuf,
void *recvbuf,
const int *recvcounts,
const int *recvoffsets,
int root);
......@@ -415,6 +415,9 @@ ICET_EXPORT void icetDiagnostics(IceTBitField mask);
#define ICET_SI_STRATEGY_BUFFER_14 (ICET_SI_STRATEGY_BUFFER_START | (IceTEnum)0x000E)
#define ICET_SI_STRATEGY_BUFFER_15 (ICET_SI_STRATEGY_BUFFER_START | (IceTEnum)0x000F)
#define ICET_COMMUNICATION_LAYER_START (ICET_STATE_BUFFER_START | (IceTEnum)0x0040)
#define ICET_COMMUNICATION_LAYER_END (ICET_STATE_BUFFER_START | (IceTEnum)0x0050)
#define ICET_STATE_SIZE (IceTEnum)0x00000200
#define ICET_STATE_ENGINE_END (ICET_STATE_ENGINE_START + ICET_STATE_SIZE)
......
......@@ -247,13 +247,18 @@ static int MaxImageSplitTryMax()
for (max_image_split = 1;
max_image_split/2 < num_proc;
max_image_split *= 2) {
char image_split_string[32];
char image_split_string[64];
IceTInt reported_image_split;
printstat("Trying max image split of %d\n", max_image_split);
#ifdef _WIN32
sprintf(image_split_string, "ICET_MAX_IMAGE_SPLIT=%d", max_image_split);
putenv(image_split_string);
#else
sprintf(image_split_string, "%d", max_image_split);
setenv("ICET_MAX_IMAGE_SPLIT", image_split_string, ICET_TRUE);
#endif
/* This is a bit hackish. The max image split value is set when the
IceT context is initialized. Thus, for the environment to take
......
......@@ -163,7 +163,7 @@ static int compare_color_buffers(IceTSizeType local_width,
free(cb);
return 1;
}
static int compare_depth_buffers(IceTSizeType local_width,
......@@ -378,7 +378,7 @@ static void RandomTransformTryStrategy()
if (viewport_width < SCREEN_HEIGHT) {
viewport_offset_y = rand()%(SCREEN_HEIGHT-viewport_height);
}
glViewport((GLint)viewport_offset_x, (GLint)viewport_offset_y,
(GLsizei)viewport_width, (GLsizei)viewport_height);
/* glViewport(0, 0, local_width, local_height); */
......@@ -515,7 +515,7 @@ static int RandomTransformRun()
glLoadIdentity();
glTranslatef(2.0f*rand()/RAND_MAX - 1.0f,
2.0f*rand()/RAND_MAX - 1.0f,
2.0f*rand()/RAND_MAX - 1.0f);
((rand()%19998) - 9999) * 0.0001f);
glRotatef(360.0f*rand()/RAND_MAX, 0.0f, 0.0f,
(float)rand()/RAND_MAX);
glScalef((float)(1.0/sqrt(num_proc) - 1.0)*(float)rand()/RAND_MAX + 1.0f,
......
......@@ -946,10 +946,16 @@ int SimpleTimingRun()
IceTContext original_context = icetGetContext();
IceTInt magic_k;
for (magic_k = 2; magic_k <= g_max_magic_k; magic_k *= 2) {
char k_string[32];
char k_string[64];
int retval;
#ifdef _WIN32
sprintf(k_string, "ICET_MAGIC_K=%d", magic_k);
putenv(k_string);
#else
sprintf(k_string, "%d", magic_k);
setenv("ICET_MAGIC_K", k_string, ICET_TRUE);
#endif
/* This is a bit hackish. The magic k value is set when the IceT
context is initialized. Thus, for the environment to take
......@@ -982,10 +988,16 @@ int SimpleTimingRun()
for (image_split = g_min_image_split;
image_split/magic_k < num_proc;
image_split *= magic_k) {
char image_split_string[32];
char image_split_string[64];
int retval;
#ifdef _WIN32
sprintf(image_split_string, "ICET_MAX_IMAGE_SPLIT=%d", image_split);
putenv(image_split_string);
#else
sprintf(image_split_string, "%d", image_split);
setenv("ICET_MAX_IMAGE_SPLIT", image_split_string, ICET_TRUE);
#endif
/* This is a bit hackish. The max image split value is set when the
IceT context is initialized. Thus, for the environment to take
......
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