Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
a4fbdbe
Remove while-loop and multi-threading (except for deliver) in gather_…
suku248 Mar 7, 2022
472affb
Ensure spike register is thread-local.
heplesser Mar 9, 2022
e8d52f4
Fixed formatting.
heplesser Mar 9, 2022
9d993f9
Merge pull request #2 from heplesser/suku_test_single_threading_in_ga…
suku248 Mar 10, 2022
5ee6d82
Remove reading thread dimension in spike register for testing
suku248 Mar 10, 2022
e647604
Merge branch 'test_single_threading_in_gather_spike_data' of github.c…
suku248 Mar 10, 2022
4b772b1
Change spike register to use thread-specific pointers to inner vectors
suku248 Mar 10, 2022
ece715d
Merge branch 'master' of github.com:nest/nest-simulator into test_sin…
heplesser Mar 30, 2022
f0610ea
Fixed merge error
heplesser Mar 30, 2022
eb5851f
Process spike receive buffer in a batchwise fashion
suku248 Mar 31, 2022
ce0ab45
Merge branch 'batchwise_processing_spike_receive_buffer' of github.co…
heplesser Mar 31, 2022
5e06435
Compressed spike mapping with fixed slot per spike.
heplesser Apr 1, 2022
c1883dd
Merge remote-tracking branch 'origin/single_batchwise' into hep_test_…
heplesser Apr 1, 2022
b4a1283
Fixed thread bugs.
heplesser Apr 1, 2022
2302845
More brute force serialization.
heplesser Jun 8, 2022
afb2ec7
Added SIONLIB omp barrier skip
JoseJVS Aug 4, 2022
f743f03
Rearranged deliver events and gather events.
JoseJVS Aug 24, 2022
cef6d8a
Moved deliver events conditional block.
JoseJVS Aug 24, 2022
02cee95
Shift event_delivery after updating nodes and gather_spikes
med-ayssar Sep 20, 2022
c7a1e50
Shift spikes timestemaps
med-ayssar Sep 27, 2022
79d4ebd
Merge branch 'debug_nest' of github.com:med-ayssar/nest-simulator int…
med-ayssar Sep 27, 2022
3c3caab
Put the delivery event back at the top of the main while-loop
med-ayssar Sep 27, 2022
98196e8
Substract lag from mindelay in deliver_event
med-ayssar Sep 28, 2022
09f5446
Fix static check error
med-ayssar Sep 28, 2022
d7052e0
Fix assertion error
med-ayssar Sep 28, 2022
0d20dfd
Fix static check error
med-ayssar Sep 28, 2022
daccac5
Clean implementation of time stamps on delivery.
heplesser Oct 2, 2022
d257e6c
Attempt to fix time stamps for secondary events.
heplesser Oct 2, 2022
f3b8033
Added minimal unit test for problems when using one-to-one connectivity.
heplesser Oct 3, 2022
f009e45
Converted one-to-one-multithreading test to pytest
heplesser Oct 4, 2022
9fc6d93
Update mip_corrdet test for delivery at beginning of slice
heplesser Oct 6, 2022
d077ac4
Attempt solution for multithreading problem
heplesser Oct 19, 2022
4e6d118
Revised compressed_spike_data_map_, removing load balancing over threads
heplesser Oct 19, 2022
2a67dc8
Fix formatting
heplesser Oct 19, 2022
c9114fb
Extended onetone_multithreaded test to spike_transmission test
heplesser Oct 20, 2022
17b8bf4
Fixed formatting
heplesser Oct 20, 2022
e7adff1
Added comment about fixed MPI buffer size for experimentation
heplesser Oct 21, 2022
8b4e7e3
Disabled all CI steps except MPI_ONLY for time of development
heplesser Oct 21, 2022
a25b26f
Test direct target buffer construction from compressed_spike_data; no…
heplesser Oct 23, 2022
caec3f8
Set 'more_targets' flag correctly. Some MPI problems, likely du to si…
heplesser Oct 23, 2022
2c612aa
Added blockwise communication of connectivity to new compressed schem…
heplesser Oct 24, 2022
ebffb39
Single-threaded MPI now working correctly
heplesser Oct 28, 2022
15aee17
Temporary fix to AssignedRanks to ensure correct MPI behavior
heplesser Oct 30, 2022
4a84375
Merging with main
med-ayssar Dec 14, 2022
7a36be2
Passing all pytests
med-ayssar Dec 14, 2022
5f702b7
Merge pull request #26 from med-ayssar/deliver_events_first_
heplesser Dec 15, 2022
0ff22e0
Re-added support for growing MPI spike buffers.
heplesser Dec 15, 2022
3aa6821
Remove spurious buffer resizing and unnecessary emitted flag
heplesser Dec 15, 2022
932c289
Fix end vs complete flag use in deliver_events
heplesser Dec 15, 2022
04aa3fc
Add comments on how spike gathering and delivery works.
heplesser Dec 16, 2022
1cac86b
Added shrinking of spike buffers
heplesser Dec 16, 2022
ff37082
Revised shrink/grow scheme
heplesser Dec 16, 2022
81a9025
Correctly place sw_comm_spikes.stop()
heplesser Dec 19, 2022
4625687
Merge branch 'master' into deliver_events_first
heplesser Dec 21, 2022
02965f1
Support SecondaryEvents in deliver_events_first branch
heplesser Feb 16, 2023
902d690
Fix communication of receive buffer position for 2ndry events with co…
heplesser Feb 18, 2023
c54b0a2
Update connection infrastructure correctly from GetConnections
heplesser Feb 19, 2023
622037b
Remove incorrect compressed_spike_data_map_ resizes
heplesser Feb 19, 2023
596f54e
Adapt rate-neuron input delay handling to deliver events first logic.
heplesser Feb 19, 2023
fe79f37
Introduce extra growth for spike buffers, improve comments; side effe…
heplesser Feb 20, 2023
92f467b
Revised scheme for exchanging buffer size information for resizing
heplesser Feb 20, 2023
055e577
Fix formatting
heplesser Feb 20, 2023
946b0b2
Merge branch 'master' into deliver_events_first
heplesser Feb 20, 2023
28c3a0f
Fix merge problem
heplesser Feb 20, 2023
5843e82
Remove unused return value
heplesser Feb 20, 2023
3d88c68
Add copy constructor and assignment op for OffGridSpikeData
heplesser Feb 20, 2023
58196ae
Change CSDMapEntry to bitfield
heplesser Feb 20, 2023
169bcb2
Activate off grid spikes
heplesser Feb 20, 2023
8311350
Collocate from offgrid register if needed
heplesser Feb 20, 2023
29291bc
Make test more focused and efficient
heplesser Feb 20, 2023
6ae042c
Adapt offgrid sending to three-dim register
heplesser Feb 21, 2023
896b2b1
Adjust test to deliver_events_first time logic
heplesser Feb 21, 2023
3daea1f
Fix delivery of both on-grid and off-grid spikes
heplesser Feb 21, 2023
eb2e595
Made buffer grow/shrink user configurable
heplesser Feb 21, 2023
08a0ade
Reactivate full set of github test
heplesser Feb 21, 2023
d2afe39
Fixed formatting
heplesser Feb 21, 2023
74c7341
Fix warnings arising from signedness
heplesser Feb 22, 2023
cd78045
Fix remaining compiler warnings
heplesser Feb 22, 2023
03845a5
Experimentally re-activate OpenMP for FullMacos CI testing
heplesser Feb 22, 2023
2d9fcfc
Revert "Experimentally re-activate OpenMP for FullMacos CI testing"
heplesser Feb 22, 2023
bbe5558
Fixed code formatting
heplesser Feb 23, 2023
1d6abad
Add debuggigng output
heplesser Feb 28, 2023
c7cbb3a
Add more debugging output
heplesser Mar 1, 2023
afd56bb
Adding target table dumping
heplesser Mar 1, 2023
49b6f48
Yet more debugging output
heplesser Mar 2, 2023
e5cbeee
Added debugging output for target exchange
heplesser Mar 27, 2023
d588fc4
Correct target exchange for compressed case
heplesser Mar 28, 2023
028851d
Disable debug output and tweak batch size for testing
heplesser Mar 28, 2023
9762c84
Deactivate source dumping
heplesser Mar 28, 2023
d08d903
Make full logging compile-time configurable
heplesser Mar 28, 2023
00b179f
Fixed C++ code formatting
heplesser Mar 28, 2023
84cb496
Set BATCH_SIZE back to 8
heplesser Apr 4, 2023
d5ad1c9
Fix comment; fix warning due to incorrect logging wrapping.
heplesser Apr 6, 2023
92f9b64
More careful macro-protection of full-logging-only code to avoid comp…
heplesser Apr 6, 2023
8803865
Remove variable never used and commented-out code.
heplesser Apr 6, 2023
d0a2016
Do not deliver events during first slice of simulation.
heplesser Apr 6, 2023
63a88ea
Add comment
heplesser Apr 6, 2023
f61cec3
Fix int/uint problem
heplesser Apr 7, 2023
f1e7c8e
Skip tests requiring multiple threads
heplesser Apr 10, 2023
79304fe
Skip also connect outdegree test when running without threads
heplesser Jul 3, 2023
d12e10d
Merging main into deliver_events_first.
heplesser Jul 3, 2023
50efeaf
Fixed data types
heplesser Jul 3, 2023
3cd6eaf
Ensure test_stdp_synapse reference data has not too many spikes; conv…
heplesser Jul 6, 2023
c204eec
Adjusted mip corrdet test to deliver events first scheme
heplesser Jul 6, 2023
2284546
Fix formatting issues
heplesser Jul 7, 2023
5bc829e
Restrict test_spike_transmission to single thread if NEST does not su…
heplesser Jul 7, 2023
3fe13c4
Removing AssignedRanks for spike buffers and simplifying SendBufferPo…
heplesser Aug 8, 2023
03615f9
Remove lag dimension from emitted_spikes_register
heplesser Aug 10, 2023
4a7333c
Merge branch 'master' into def_nolag_mrg
heplesser Aug 10, 2023
39c8c56
Merge branch 'master' into def_nolag_mrg
heplesser Sep 4, 2023
59dd535
Fix lcid and syn_id boundary checks; see also #2529 for suggested fol…
heplesser Sep 7, 2023
3251eee
Remove spurious thread id argument
heplesser Sep 7, 2023
b54e5c3
Remove debugging output
heplesser Sep 7, 2023
4d09fe3
Tidy up assertion
heplesser Sep 7, 2023
816e1ad
Remove sort_connections flag from tests
heplesser Sep 7, 2023
7ae78cc
Remove adaptive_spike_buffers flag and max_buffer_size_spike_data ker…
heplesser Sep 7, 2023
2a31d5c
Improve comment
heplesser Sep 7, 2023
bc4aaa1
Update PyNEST KernelAttributes wrt to removed and added kernel proper…
heplesser Sep 7, 2023
0acca52
Slight refactoring of deliver_events_() for greater clarity
heplesser Sep 7, 2023
d90d0e1
Reformatted C++ files
heplesser Sep 7, 2023
e1b9fee
Improve buffer resize logging
heplesser Sep 7, 2023
c977914
Better variable names
heplesser Sep 7, 2023
b1ccd18
Avoid technical problems in test
heplesser Sep 7, 2023
020efb5
Removed no-longer used methods and fields and improved comments
heplesser Sep 10, 2023
d518c4f
Add comments
heplesser Sep 10, 2023
85a6c51
Remove FULL_LOGGING calls
heplesser Sep 11, 2023
060ed1f
Correct placement of timers
heplesser Sep 11, 2023
59e301b
Fix buffer parameter names and stopwatch code location
heplesser Sep 11, 2023
87906ee
Set spike_buffer_shrink_limit to 0 to turn off shrinking by default
heplesser Sep 11, 2023
85c7312
Moved ResizeLog to separate file and rename BufferResizeLog
heplesser Sep 11, 2023
e909f1a
Apply suggestions from code review
heplesser Sep 11, 2023
afba22f
Merge branch 'def_nolag_mrg' of github.com:heplesser/nest-simulator i…
heplesser Sep 11, 2023
042b5b2
Update cmake/ProcessOptions.cmake
heplesser Sep 11, 2023
05ce424
Update libnestutil/config.h.in
heplesser Sep 11, 2023
44900f6
Update nestkernel/event_delivery_manager.h
heplesser Sep 11, 2023
87cfdc7
Update nestkernel/event_delivery_manager.h
heplesser Sep 11, 2023
073d3d7
Some improvements around FULL_LOGGING_ONLY
heplesser Sep 11, 2023
f92b21a
Merge branch 'def_nolag_mrg' of github.com:heplesser/nest-simulator i…
heplesser Sep 11, 2023
503b7de
Merge branch 'master' of github.com:nest/nest-simulator into def_nola…
heplesser Sep 11, 2023
f7a7af3
Fix C++ formatting
heplesser Sep 11, 2023
a92b995
Fix tests after merge
heplesser Sep 11, 2023
2a17bdd
Fix formatting
heplesser Sep 11, 2023
8b3488a
Update nestkernel/spike_data.h
heplesser Sep 11, 2023
c4c00fe
Fix formatting of kernel SLI documentation
heplesser Sep 13, 2023
bca6f28
Merge branch 'def_nolag_mrg' of github.com:heplesser/nest-simulator i…
heplesser Sep 13, 2023
e57b9a1
Fix typos
heplesser Sep 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ set( with-defines OFF CACHE STRING "Additional defines, e.g. '-DXYZ=1' [default=
set( with-userdoc OFF CACHE STRING "Build user documentation [default=OFF]")
set( with-devdoc OFF CACHE STRING "Build developer documentation [default=OFF]")

set( with-full-logging OFF CACHE STRING "Write debug output to 'dump_<num_ranks>_<rank>.log' file [default=OFF]")

################################################################################
################## Project Directory variables ##################
################################################################################
Expand Down Expand Up @@ -153,6 +155,7 @@ nest_process_with_hdf5()
nest_process_target_bits_split()
nest_process_userdoc()
nest_process_devdoc()
nest_process_full_logging()

nest_process_models()

Expand Down
8 changes: 7 additions & 1 deletion cmake/ProcessOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,6 @@ function( NEST_PROCESS_WITH_HDF5 )
set( HDF5_VERSION "${HDF5_VERSION}" PARENT_SCOPE )
set( HDF5_HL_LIBRARIES "${HDF5_HL_LIBRARIES}" PARENT_SCOPE )
set( HDF5_DEFINITIONS "${HDF5_DEFINITIONS}" PARENT_SCOPE )

include_directories( ${HDF5_INCLUDE_DIRS} )

endif ()
Expand Down Expand Up @@ -703,3 +702,10 @@ function( NEST_PROCESS_DEVDOC )
set( BUILD_DOCS ON PARENT_SCOPE )
endif ()
endfunction ()

function( NEST_PROCESS_FULL_LOGGING )
if ( with-full-logging )
message( STATUS "Configuring full logging" )
set( ENABLE_FULL_LOGGING ON PARENT_SCOPE )
endif ()
endfunction ()
5 changes: 5 additions & 0 deletions doc/htmldoc/installation/cmake_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ NEST properties
| | If running on more than 262144 MPI processes or more than 512 |
| | threads, change to 'hpc'. |
+-----------------------------------------------+----------------------------------------------------------------+
| ``-Dwith-full-logging=[OFF|ON]`` | Write debug output to file ``dump_<num_ranks>_<rank>.log`` |
| | [default=OFF]. Developers should wrap debugging output in |
| | macro ``FULL_LOGGING_ONLY()`` and call kernel().write_dump()` |
| | from inside it. The macro can contain almost any valid code. |
+-----------------------------------------------+----------------------------------------------------------------+

Generic build configuration
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
11 changes: 11 additions & 0 deletions lib/sli/unittest.sli
Original file line number Diff line number Diff line change
Expand Up @@ -1289,6 +1289,10 @@ FirstVersion: 2012-05-22

SeeAlso: unittest::distributed_assert_or_die, unittest::distributed_collect_assert_or_die, nest_indirect, unittest::mpirun_self, unittest::assert_or_die
*/

/distributed_process_invariant_events_assert_or_die << /show_results false >> Options


/distributed_process_invariant_events_assert_or_die
[/arraytype /proceduretype]
{
Expand All @@ -1312,6 +1316,13 @@ SeeAlso: unittest::distributed_assert_or_die, unittest::distributed_collect_asse
} Map

% we now have array of arrays, should be identical
/distributed_process_invariant_events_assert_or_die /show_results GetOption
{
dup
{ == } forall
}
if

dup First /reference Set
Rest true exch { reference eq and } Fold
}
Expand Down
3 changes: 3 additions & 0 deletions libnestutil/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,7 @@
/* Whether to enable detailed NEST internal timers */
#cmakedefine TIMER_DETAILED 1

/* Whether to do full logging */
#cmakedefine ENABLE_FULL_LOGGING 1

#endif // #ifndef CONFIG_H
2 changes: 1 addition & 1 deletion models/music_event_out_proxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ nest::music_event_out_proxy::handle( SpikeEvent& e )
#pragma omp critical( insertevent )
{
#endif
for ( int i = 0; i < e.get_multiplicity(); ++i )
for ( size_t i = 0; i < e.get_multiplicity(); ++i )
{
V_.MP_->insertEvent( time, MUSIC::GlobalIndex( receiver_port ) );
}
Expand Down
2 changes: 1 addition & 1 deletion models/rate_neuron_ipn_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ void
nest::rate_neuron_ipn< TNonlinearities >::handle( DelayedRateConnectionEvent& e )
{
const double weight = e.get_weight();
const long delay = e.get_delay_steps();
const long delay = e.get_delay_steps() - kernel().connection_manager.get_min_delay();

size_t i = 0;
std::vector< unsigned int >::iterator it = e.begin();
Expand Down
2 changes: 1 addition & 1 deletion models/rate_neuron_opn_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ void
nest::rate_neuron_opn< TNonlinearities >::handle( DelayedRateConnectionEvent& e )
{
const double weight = e.get_weight();
const long delay = e.get_delay_steps();
const long delay = e.get_delay_steps() - kernel().connection_manager.get_min_delay();

size_t i = 0;
std::vector< unsigned int >::iterator it = e.begin();
Expand Down
2 changes: 1 addition & 1 deletion models/rate_transformer_node_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ void
nest::rate_transformer_node< TNonlinearities >::handle( DelayedRateConnectionEvent& e )
{
const double weight = e.get_weight();
const long delay = e.get_delay_steps();
const long delay = e.get_delay_steps() - kernel().connection_manager.get_min_delay();

size_t i = 0;
std::vector< unsigned int >::iterator it = e.begin();
Expand Down
2 changes: 1 addition & 1 deletion models/spike_recorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ nest::spike_recorder::handle( SpikeEvent& e )
{
assert( e.get_multiplicity() > 0 );

for ( int i = 0; i < e.get_multiplicity(); ++i )
for ( size_t i = 0; i < e.get_multiplicity(); ++i )
{
write( e, RecordingBackend::NO_DOUBLE_VALUES, RecordingBackend::NO_LONG_VALUES );
}
Expand Down
3 changes: 2 additions & 1 deletion nestkernel/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ set ( nestkernel_sources
target_table.h target_table.cpp
target_table_devices.h target_table_devices.cpp target_table_devices_impl.h
target.h target_data.h static_assert.h
send_buffer_position.h
send_buffer_position.h send_buffer_position.cpp
source.h
source_table.h source_table.cpp
source_table_position.h
Expand All @@ -114,6 +114,7 @@ set ( nestkernel_sources
position.h
spatial.h spatial.cpp
stimulation_backend.h
buffer_resize_log.h buffer_resize_log.cpp
)


Expand Down
66 changes: 66 additions & 0 deletions nestkernel/buffer_resize_log.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/*
* buffer_resize_log.cpp
*
* This file is part of NEST.
*
* Copyright (C) 2004 The NEST Initiative
*
* NEST is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* NEST is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NEST. If not, see <http://www.gnu.org/licenses/>.
*
*/

#include "buffer_resize_log.h"

// Includes from nestkernel:
#include "kernel_manager.h"
#include "nest_names.h"

namespace nest
{

BufferResizeLog::BufferResizeLog()
: time_steps_()
, global_max_spikes_sent_()
, new_buffer_size_()
{
}

void
BufferResizeLog::clear()
{
time_steps_.clear();
global_max_spikes_sent_.clear();
new_buffer_size_.clear();
}

void
BufferResizeLog::add_entry( size_t global_max_spikes_sent, size_t new_buffer_size )
{
time_steps_.emplace_back( kernel().simulation_manager.get_clock().get_steps() );
global_max_spikes_sent_.emplace_back( global_max_spikes_sent );
new_buffer_size_.emplace_back( new_buffer_size );
}

void
BufferResizeLog::to_dict( DictionaryDatum& events ) const
{
initialize_property_intvector( events, names::times );
append_property( events, names::times, time_steps_ );
initialize_property_intvector( events, "global_max_spikes_sent" );
append_property( events, "global_max_spikes_sent", global_max_spikes_sent_ );
initialize_property_intvector( events, "new_buffer_size" );
append_property( events, "new_buffer_size", new_buffer_size_ );
}

}
54 changes: 54 additions & 0 deletions nestkernel/buffer_resize_log.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*
* buffer_resize_log.h
*
* This file is part of NEST.
*
* Copyright (C) 2004 The NEST Initiative
*
* NEST is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* NEST is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NEST. If not, see <http://www.gnu.org/licenses/>.
*
*/

#ifndef BUFFER_RESIZE_LOG_H
#define BUFFER_RESIZE_LOG_H

// C++ includes:
#include <vector>

// Includes from sli:
#include "dictdatum.h"

namespace nest
{

/**
* Collect information on spike transmission buffer resizing.
*/
class BufferResizeLog
{
public:
BufferResizeLog();
void clear();
void add_entry( size_t global_max_spikes_sent, size_t new_buffer_size );
void to_dict( DictionaryDatum& ) const;

private:
std::vector< long > time_steps_; //!< Time of resize event in steps
std::vector< long > global_max_spikes_sent_; //!< Spike number that triggered resize
std::vector< long > new_buffer_size_; //!< Buffer size after resize
};

}

#endif /* buffer_resize_log_h */
Loading