Merge branch 'master' of github.com:JamesEMcClure/LBPM-WIA
This commit is contained in:
@@ -496,7 +496,7 @@ void gatherSrcIDMap( map_type& src_map, MPI_Comm comm )
|
||||
const std::map<BlobIDType,int64_t>& src_ids = it->second;
|
||||
send_data.push_back(id);
|
||||
send_data.push_back(src_ids.size());
|
||||
typename std::map<BlobIDType,int64_t>::const_iterator it2;
|
||||
std::map<BlobIDType,int64_t>::const_iterator it2;
|
||||
for (it2=src_ids.begin(); it2!=src_ids.end(); ++it2) {
|
||||
send_data.push_back(it2->first);
|
||||
send_data.push_back(it2->second);
|
||||
|
||||
@@ -208,7 +208,7 @@ SET( CTEST_OPTIONS "${CTEST_OPTIONS};-DENABLE_GCOV:BOOL=${ENABLE_GCOV}" )
|
||||
IF ( USE_MPI )
|
||||
SET( CTEST_OPTIONS "${CTEST_OPTIONS};-DMPI_COMPILER:BOOL=true;-DMPIEXEC=${MPIEXEC}")
|
||||
IF ( NOT USE_VALGRIND )
|
||||
SET( CTEST_OPTIONS "${CTEST_OPTIONS};-DUSE_EXT_MPI_FOR_SERIAL_TESTS:BOOL=true")
|
||||
SET( CTEST_OPTIONS "${CTEST_OPTIONS};-DUSE_MPI_FOR_SERIAL_TESTS:BOOL=true")
|
||||
ENDIF()
|
||||
ELSE()
|
||||
SET( CTEST_OPTIONS "${CTEST_OPTIONS};-DUSE_MPI:BOOL=false")
|
||||
|
||||
@@ -372,8 +372,8 @@ MACRO( SET_WARNINGS )
|
||||
SET(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} --diag_suppress 111,128,185")
|
||||
ELSEIF ( USING_CLANG )
|
||||
# Add default compiler options
|
||||
SET(CMAKE_C_FLAGS " ${CMAKE_C_FLAGS} -Wall")
|
||||
SET(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -Wall")
|
||||
SET(CMAKE_C_FLAGS " ${CMAKE_C_FLAGS} -Wall -Wno-char-subscripts -Wno-unused-private-field -Wno-unused-variable")
|
||||
SET(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -Wall -Wno-char-subscripts -Wno-unused-private-field -Wno-unused-variable")
|
||||
ELSEIF ( USING_DEFAULT )
|
||||
# Add default compiler options
|
||||
SET(CMAKE_C_FLAGS " ${CMAKE_C_FLAGS}")
|
||||
@@ -613,7 +613,7 @@ MACRO( ADD_PROJ_EXE_DEP EXE )
|
||||
SET_TARGET_PROPERTIES( ${EXE} PROPERTIES LINK_FLAGS "${LDFLAGS}" )
|
||||
SET_TARGET_PROPERTIES( ${EXE} PROPERTIES LINK_FLAGS "${LDFLAGS_EXTRA}" )
|
||||
TARGET_LINK_LIBRARIES( ${EXE} ${LINK_LIBRARIES} )
|
||||
TARGET_LINK_LIBRARIES( ${EXE} ${CUDA_LIBS} )
|
||||
TARGET_LINK_LIBRARIES( ${EXE} ${CUDA_LIBS} ${CUDA_LIBRARIES} )
|
||||
TARGET_LINK_LIBRARIES( ${EXE} ${EXTERNAL_LIBS} )
|
||||
IF ( USE_MPI OR USE_EXT_MPI OR HAVE_MPI )
|
||||
TARGET_LINK_LIBRARIES( ${EXE} ${MPI_LINK_FLAGS} ${MPI_LIBRARIES} )
|
||||
@@ -714,7 +714,7 @@ FUNCTION( ADD_${PROJ}_TEST EXEFILE ${ARGN} )
|
||||
RETURN()
|
||||
ENDIF()
|
||||
# Add the provisional test
|
||||
ADD_PROJ_PROVISIONAL_TEST ( ${EXEFILE} )
|
||||
ADD_PROJ_PROVISIONAL_TEST( ${EXEFILE} )
|
||||
CREATE_TEST_NAME( ${EXEFILE} ${ARGN} )
|
||||
GET_TARGET_PROPERTY(EXE ${EXEFILE} LOCATION)
|
||||
STRING(REGEX REPLACE "\\$\\(Configuration\\)" "${CONFIGURATION}" EXE "${EXE}" )
|
||||
@@ -736,7 +736,7 @@ FUNCTION( ADD_${PROJ}_WEEKLY_TEST EXEFILE PROCS ${ARGN} )
|
||||
RETURN()
|
||||
ENDIF()
|
||||
# Add the provisional test
|
||||
ADD_PROJ_PROVISIONAL_TEST ( ${EXEFILE} )
|
||||
ADD_PROJ_PROVISIONAL_TEST( ${EXEFILE} )
|
||||
GET_TARGET_PROPERTY(EXE ${EXEFILE} LOCATION)
|
||||
STRING(REGEX REPLACE "\\$\\(Configuration\\)" "${CONFIGURATION}" EXE "${EXE}" )
|
||||
IF( ${PROCS} STREQUAL "1" )
|
||||
|
||||
@@ -347,3 +347,11 @@ std::vector<int> Utilities::factor(size_t number)
|
||||
std::sort( factors.begin(), factors.end() );
|
||||
return factors;
|
||||
}
|
||||
|
||||
|
||||
// Dummy function to prevent compiler from optimizing away variable
|
||||
void Utilities::nullUse( void* data )
|
||||
{
|
||||
NULL_USE(data);
|
||||
}
|
||||
|
||||
|
||||
@@ -61,6 +61,9 @@ namespace Utilities
|
||||
//! Factor a number into it's prime factors
|
||||
std::vector<int> factor(size_t number);
|
||||
|
||||
//! Print AMP Banner
|
||||
void nullUse( void* );
|
||||
|
||||
} // namespace Utilities
|
||||
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ std::vector<bubble_struct> create_bubbles( int N_bubbles, double Lx, double Ly,
|
||||
}
|
||||
}
|
||||
size_t N_bytes = N_bubbles*sizeof(bubble_struct);
|
||||
MPI_Bcast(&bubbles[0],N_bytes,MPI_CHAR,0,comm);
|
||||
MPI_Bcast((char*)&bubbles[0],N_bytes,MPI_CHAR,0,comm);
|
||||
return bubbles;
|
||||
}
|
||||
|
||||
@@ -297,7 +297,7 @@ int main(int argc, char **argv)
|
||||
velocity[i].z = bubbles[i].radius*(2*rand2()-1);
|
||||
}
|
||||
}
|
||||
MPI_Bcast(&velocity[0],bubbles.size()*sizeof(Point),MPI_CHAR,0,comm);
|
||||
MPI_Bcast((char*)&velocity[0],bubbles.size()*sizeof(Point),MPI_CHAR,0,comm);
|
||||
fillBubbleData( bubbles, Phase, SignDist, Lx, Ly, Lz, rank_info );
|
||||
fillData.fill(Phase);
|
||||
fillData.fill(SignDist);
|
||||
|
||||
@@ -247,8 +247,8 @@ int main(int argc, char **argv)
|
||||
MPI_Bcast(&Nx,1,MPI_INT,0,comm);
|
||||
MPI_Bcast(&Ny,1,MPI_INT,0,comm);
|
||||
MPI_Bcast(&Nz,1,MPI_INT,0,comm);
|
||||
MPI_Bcast(&nBlocks,1,MPI_INT,0,comm);
|
||||
MPI_Bcast(&nthreads,1,MPI_INT,0,comm);
|
||||
MPI_Bcast(&nBlocks,1,MPI_UNSIGNED,0,comm);
|
||||
MPI_Bcast(&nthreads,1,MPI_UNSIGNED,0,comm);
|
||||
MPI_Bcast(×tepMax,1,MPI_INT,0,comm);
|
||||
|
||||
MPI_Bcast(&Nx,1,MPI_INT,0,comm);
|
||||
|
||||
@@ -97,7 +97,7 @@ public:
|
||||
static int max_id = -1;
|
||||
new_id->first = new_index->first;
|
||||
new_id->second = new_index->second;
|
||||
if ( last_id!=NULL ) {
|
||||
if ( last_id.get()!=NULL ) {
|
||||
// Compute the timestep-timestep map
|
||||
const IntArray& old_ids = last_id->second;
|
||||
ID_map_struct map = computeIDMap(Nx,Ny,Nz,old_ids,ids,newcomm);
|
||||
|
||||
@@ -58,7 +58,7 @@ int main(int argc, char *argv[])
|
||||
double time1 = Utilities::time() - t0;
|
||||
uint64_t *tmp = new uint64_t[0x100000];
|
||||
memset(tmp,0xAA,0x100000*sizeof(uint64_t));
|
||||
NULL_USE(tmp);
|
||||
Utilities::nullUse( tmp );
|
||||
t0 = Utilities::time();
|
||||
size_t n_bytes2 = Utilities::getMemoryUsage();
|
||||
double time2 = Utilities::time() - t0;
|
||||
|
||||
Reference in New Issue
Block a user