Skip to content

Commit

Permalink
remove dry run related code
Browse files Browse the repository at this point in the history
  • Loading branch information
jessica-mitchell committed Sep 9, 2024
1 parent ef0074a commit 47e3e4a
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 131 deletions.
12 changes: 0 additions & 12 deletions nestkernel/mpi_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,6 @@ class MPIManager : public ManagerInterface
*/
size_t get_num_processes() const;

/**
* Set the number of processes state variable.
* This is used by dryrun_mode.
*/
void set_num_processes( size_t n_procs );

/**
* Get rank of MPI process
*/
Expand Down Expand Up @@ -502,12 +496,6 @@ MPIManager::get_num_processes() const
return num_processes_;
}

inline void
MPIManager::set_num_processes( size_t n_procs )
{
num_processes_ = n_procs;
}

inline size_t
MPIManager::get_rank() const
{
Expand Down
6 changes: 0 additions & 6 deletions nestkernel/nest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,6 @@ reset_kernel()
kernel().reset();
}

void
enable_dryrun_mode( const size_t n_procs )
{
kernel().mpi_manager.set_num_processes( n_procs );
}

void
register_logger_client( const deliver_logging_event_ptr client_callback )
{
Expand Down
2 changes: 0 additions & 2 deletions nestkernel/nest.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ void install_module( const std::string& module_name );

void reset_kernel();

void enable_dryrun_mode( const size_t n_procs );

void register_logger_client( const deliver_logging_event_ptr client_callback );

/**
Expand Down
13 changes: 0 additions & 13 deletions nestkernel/nestmodule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -878,18 +878,6 @@ NestModule::NumProcessesFunction::execute( SLIInterpreter* i ) const
i->EStack.pop();
}

void
NestModule::SetFakeNumProcesses_iFunction::execute( SLIInterpreter* i ) const
{
i->assert_stack_load( 1 );
long n_procs = getValue< long >( i->OStack.pick( 0 ) );

enable_dryrun_mode( n_procs );

i->OStack.pop( 1 );
i->EStack.pop();
}

void
NestModule::SyncProcessesFunction::execute( SLIInterpreter* i ) const
{
Expand Down Expand Up @@ -2139,7 +2127,6 @@ NestModule::init( SLIInterpreter* i )

i->createcommand( "Rank", &rankfunction );
i->createcommand( "NumProcesses", &numprocessesfunction );
i->createcommand( "SetFakeNumProcesses", &setfakenumprocesses_ifunction );
i->createcommand( "SyncProcesses", &syncprocessesfunction );
i->createcommand( "TimeCommunication_i_i_b", &timecommunication_i_i_bfunction );
i->createcommand( "TimeCommunicationv_i_i", &timecommunicationv_i_ifunction );
Expand Down
46 changes: 0 additions & 46 deletions nestkernel/nestmodule.h
Original file line number Diff line number Diff line change
Expand Up @@ -647,52 +647,6 @@ class NestModule : public SLIModule
void execute( SLIInterpreter* ) const override;
} numprocessesfunction;

/** @BeginDocumentation
* Name: SetFakeNumProcesses - Set a fake number of MPI processes.
* Synopsis: n_procs SetFakeNumProcesses -> -
* Description:
* Sets the number of MPI processes to n_procs. Used for benchmarking purposes
* of memory consumption only.
* Please note:
* - Simulation of the network will not be possible after setting fake
* processes.
* - It is not possible to use this function when running a script on multiple
* actual MPI processes.
* - The setting of the fake number of processes has to happen before the kernel
* reset and before the setting of the local number of threads.
* After calling SetFakeNumProcesses, it is obligatory to call either
* ResetKernel or SetStatus on the Kernel for the setting of the fake
* number of processes to come into effect.
*
* A typical use case would be to test if a neuronal network fits on a machine
* of given size without using the actual resources.
*
* Example:
* %%% Set fake number of processes
* 100 SetFakeNumProcesses
*
* %%% Build network
* /iaf_psc_alpha 100 Create
* [1 100] Range /n Set
*
* << /source n /target n >> Connect
*
* %%% Measure memory consumption
* memory_thisjob ==
*
* Execute this script with
* mpirun -np 1 nest example.sli
*
* Availability: NEST 2.2
* Author: Susanne Kunkel
* FirstVersion: July 2011
* SeeAlso: NumProcesses
*/
class SetFakeNumProcesses_iFunction : public SLIFunction
{
void execute( SLIInterpreter* ) const override;
} setfakenumprocesses_ifunction;

/** @BeginDocumentation
* Name: SyncProcesses - Synchronize all MPI processes.
* Synopsis: SyncProcesses -> -
Expand Down
52 changes: 0 additions & 52 deletions testsuite/regressiontests/ticket-566.sli

This file was deleted.

0 comments on commit 47e3e4a

Please sign in to comment.