Getting HIP compiling on Summit

This commit is contained in:
Mark Berrill
2020-10-07 13:36:42 -04:00
parent 5109c08bc3
commit 34b75e2ccf
14 changed files with 45 additions and 35 deletions

View File

@@ -37,7 +37,7 @@ static std::mutex Utilities_mutex;
/****************************************************************************
* Function to perform the default startup/shutdown sequences *
****************************************************************************/
void Utilities::startup( int argc, char **argv )
void Utilities::startup( int argc, char **argv, bool multiple )
{
NULL_USE( argc );
NULL_USE( argv );
@@ -46,15 +46,19 @@ void Utilities::startup( int argc, char **argv )
Utilities::setenv( "MKL_NUM_THREADS", "1" );
// Start MPI
#ifdef USE_MPI
int provided;
MPI_Init_thread( &argc, &argv, MPI_THREAD_MULTIPLE, &provided );
if ( provided < MPI_THREAD_MULTIPLE ) {
int rank;
MPI_Comm_rank( MPI_COMM_WORLD, &rank );
if ( rank == 0 )
std::cerr << "Warning: Failed to start MPI with necessary thread support, thread support will be disabled" << std::endl;
if ( multiple ) {
int provided;
MPI_Init_thread( &argc, &argv, MPI_THREAD_MULTIPLE, &provided );
if ( provided < MPI_THREAD_MULTIPLE ) {
int rank;
MPI_Comm_rank( MPI_COMM_WORLD, &rank );
if ( rank == 0 )
std::cerr << "Warning: Failed to start MPI with necessary thread support, thread support will be disabled" << std::endl;
}
StackTrace::globalCallStackInitialize( MPI_COMM_WORLD );
} else {
MPI_Init( &argc, &argv );
}
StackTrace::globalCallStackInitialize( MPI_COMM_WORLD );
#endif
// Set the error handlers
Utilities::setAbortBehavior( true, 3 );

View File

@@ -31,7 +31,7 @@ using StackTrace::Utilities::sleep_s;
* \param argc argc from main
* \param argv argv from main
*/
void startup( int argc, char **argv );
void startup( int argc, char **argv, bool multiple=true );
/*!
* \brief Stop MPI, error handlers