diff --git a/.travis.yml b/.travis.yml index feffc879b2..3bc1a756a6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -203,7 +203,7 @@ script: - ./extras/travis_build.sh 2>&1 | tee travis_build.sh.log - | if [ "$xNEST_BUILD_TYPE" != "STATIC_CODE_ANALYSIS" ]; then - python extras/parse_travis_log.py travis_build.sh.log "$xNEST_BUILD_TYPE" ; + python extras/parse_travis_log.py travis_build.sh.log "$xNEST_BUILD_TYPE" "$TRAVIS_BUILD_DIR" fi before_deploy: diff --git a/extras/parse_travis_log.py b/extras/parse_travis_log.py index 01347f2d16..01bcf4f533 100755 --- a/extras/parse_travis_log.py +++ b/extras/parse_travis_log.py @@ -360,18 +360,18 @@ def makebuild_summary(log_filename, msg_make_section_start, number_of_error_msgs = 0 number_of_warning_msgs = 0 in_make_section = False - if NEST_BUILD_TYPE == 'MINIMAL': - expected_warnings = 8 - elif NEST_BUILD_TYPE == 'MPI_ONLY': - expected_warnings = 265 - elif NEST_BUILD_TYPE == 'OPENMP_ONLY': - expected_warnings = 8 - elif NEST_BUILD_TYPE == 'FULL': - expected_warnings = 4035 - elif NEST_BUILD_TYPE == 'FULL_NO_EXTERNAL_FEATURES': - expected_warnings = 8 - else: - expected_warnings = 0 # Set to 0 if none of the above build-types, to not crash the script + + expected_warnings = 0 + if build_type == 'FULL': + expected_warnings = 2 # libneurosim and NEST both define PACKAGE in their config.h files + + nest_warning_re = re.compile(f'{build_dir}.*: warning:') + known_warnings = [ + f'{build_dir}/sli/scanner.cc:642:13: warning: this statement may fall through [-Wimplicit-fallthrough=]', + f'{build_dir}/sli/scanner.cc:673:19: warning: this statement may fall through [-Wimplicit-fallthrough=]', + f'{build_dir}/sli/scanner.cc:714:13: warning: this statement may fall through [-Wimplicit-fallthrough=]', + f'{build_dir}/sli/scanner.cc:741:24: warning: this statement may fall through [-Wimplicit-fallthrough=]', + ] with open(log_filename) as fh: for line in fh: @@ -388,7 +388,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 and line.strip() not in known_warnings: file_name = line.split(':')[0] if file_name not in warning_summary: warning_summary[file_name] = 0 @@ -970,11 +972,12 @@ 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 - this_script_filename, log_filename, NEST_BUILD_TYPE = argv + this_script_filename, log_filename, build_type, build_dir = argv changed_files = \ list_of_changed_files(log_filename, "MSGBLD0070", diff --git a/extras/travis_build.sh b/extras/travis_build.sh index 794bc5f5d1..62f9aba305 100755 --- a/extras/travis_build.sh +++ b/extras/travis_build.sh @@ -23,8 +23,7 @@ # This shell script is part of the NEST Travis CI build and test environment. # It is invoked by the top-level Travis script '.travis.yml'. # -# NOTE: This shell script is tightly coupled to Python script -# 'extras/parse_travis_log.py'. +# NOTE: This shell script is tightly coupled to 'extras/parse_travis_log.py'. # Any changes to message numbers (MSGBLDnnnn) or the variable name # 'file_names' have effects on the build/test-log parsing process. diff --git a/nestkernel/mpi_manager.cpp b/nestkernel/mpi_manager.cpp index e63061c2e9..4be2979d61 100644 --- a/nestkernel/mpi_manager.cpp +++ b/nestkernel/mpi_manager.cpp @@ -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; @@ -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 diff --git a/nestkernel/music_manager.cpp b/nestkernel/music_manager.cpp index 77d32f0285..58787985e7 100644 --- a/nestkernel/music_manager.cpp +++ b/nestkernel/music_manager.cpp @@ -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 ); @@ -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() { diff --git a/nestkernel/spatial.cpp b/nestkernel/spatial.cpp index e3c7d6be61..1775ed56c8 100644 --- a/nestkernel/spatial.cpp +++ b/nestkernel/spatial.cpp @@ -41,7 +41,7 @@ // Includes from spatial: #include "grid_layer.h" -#include "layer.h" +#include "layer_impl.h" namespace nest