Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse C++ warnings more specifically #1852

Merged
merged 11 commits into from
Nov 18, 2020
16 changes: 10 additions & 6 deletions extras/parse_travis_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,19 +361,20 @@ def makebuild_summary(log_filename, msg_make_section_start,
number_of_warning_msgs = 0
in_make_section = False
if NEST_BUILD_TYPE == 'MINIMAL':
expected_warnings = 8
expected_warnings = 4
elif NEST_BUILD_TYPE == 'MPI_ONLY':
expected_warnings = 265
expected_warnings = 4
elif NEST_BUILD_TYPE == 'OPENMP_ONLY':
expected_warnings = 8
expected_warnings = 4
elif NEST_BUILD_TYPE == 'FULL':
expected_warnings = 4035
expected_warnings = 6
elif NEST_BUILD_TYPE == 'FULL_NO_EXTERNAL_FEATURES':
expected_warnings = 8
expected_warnings = 4
else:
expected_warnings = 0 # Set to 0 if none of the above build-types, to not crash the script

with open(log_filename) as fh:
nest_warning_re = re.compile('/home/travis/build/nest/nest-simulator.*: warning:')
for line in fh:
if is_message(line, msg_make_section_start):
in_make_section = True
Expand All @@ -388,7 +389,9 @@ def makebuild_summary(log_filename, msg_make_section_start,
error_summary[file_name] += 1
number_of_error_msgs += 1

if ': warning:' in line:
# Only count warnings originating in NEST source files
warning_match = nest_warning_re.match(line)
if warning_match is not None:
file_name = line.split(':')[0]
if file_name not in warning_summary:
warning_summary[file_name] = 0
Expand Down Expand Up @@ -970,6 +973,7 @@ def build_return_code(status_cmake_configure,


if __name__ == '__main__':
import re
from sys import argv, exit
from terminaltables import AsciiTable
from textwrap import wrap
Expand Down
15 changes: 10 additions & 5 deletions nestkernel/mpi_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,11 @@ nest::MPIManager::get_status( DictionaryDatum& dict )
def< double >( dict, names::growth_factor_buffer_target_data, growth_factor_buffer_target_data_ );
}

/**
* Finish off MPI routines
*/
#ifdef HAVE_MPI

void
nest::MPIManager::mpi_finalize( int exitcode )
{
#ifdef HAVE_MPI
MPI_Type_free( &MPI_OFFGRID_SPIKE );

int finalized;
Expand All @@ -251,9 +249,16 @@ nest::MPIManager::mpi_finalize( int exitcode )
mpi_abort( exitcode );
}
}
#endif /* #ifdef HAVE_MPI */
}

#else /* #ifdef HAVE_MPI */

void
nest::MPIManager::mpi_finalize( int )
{
}

#endif /* #ifdef HAVE_MPI */

#ifdef HAVE_MPI

Expand Down
21 changes: 17 additions & 4 deletions nestkernel/music_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,18 @@ MUSICManager::get_status( DictionaryDatum& )
{
}

#ifdef HAVE_MUSIC

void
MUSICManager::init_music( int* argc, char** argv[] )
{
#ifdef HAVE_MUSIC
int provided_thread_level;
music_setup = new MUSIC::Setup( *argc, *argv, MPI_THREAD_FUNNELED, &provided_thread_level );
#endif
}

void
MUSICManager::enter_runtime( double h_min_delay )
{
#ifdef HAVE_MUSIC
publish_music_in_ports_();
std::string msg = String::compose( "Entering MUSIC runtime with tick = %1 ms", h_min_delay );
LOG( M_INFO, "MUSICManager::enter_runtime", msg );
Expand All @@ -106,9 +105,23 @@ MUSICManager::enter_runtime( double h_min_delay )
{
music_runtime = new MUSIC::Runtime( music_setup, h_min_delay * 1e-3 );
}
#endif
}

#else /* #ifdef HAVE_MUSIC */

void
MUSICManager::init_music( int*, char*** )
{
}

void
MUSICManager::enter_runtime( double )
{
}

#endif /* #ifdef HAVE_MUSIC */


void
MUSICManager::music_finalize()
{
Expand Down