Skip to content

Commit e61f34f

Browse files
authored
Merge pull request #3308 from jessica-mitchell/rm-dryrun
Remove code for `dry_run` mode
2 parents b32a3a3 + 47e3e4a commit e61f34f

File tree

6 files changed

+0
-131
lines changed

6 files changed

+0
-131
lines changed

nestkernel/mpi_manager.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,6 @@ class MPIManager : public ManagerInterface
9191
*/
9292
size_t get_num_processes() const;
9393

94-
/**
95-
* Set the number of processes state variable.
96-
* This is used by dryrun_mode.
97-
*/
98-
void set_num_processes( size_t n_procs );
99-
10094
/**
10195
* Get rank of MPI process
10296
*/
@@ -502,12 +496,6 @@ MPIManager::get_num_processes() const
502496
return num_processes_;
503497
}
504498

505-
inline void
506-
MPIManager::set_num_processes( size_t n_procs )
507-
{
508-
num_processes_ = n_procs;
509-
}
510-
511499
inline size_t
512500
MPIManager::get_rank() const
513501
{

nestkernel/nest.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,6 @@ reset_kernel()
6262
kernel().reset();
6363
}
6464

65-
void
66-
enable_dryrun_mode( const size_t n_procs )
67-
{
68-
kernel().mpi_manager.set_num_processes( n_procs );
69-
}
70-
7165
void
7266
register_logger_client( const deliver_logging_event_ptr client_callback )
7367
{

nestkernel/nest.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ void install_module( const std::string& module_name );
4949

5050
void reset_kernel();
5151

52-
void enable_dryrun_mode( const size_t n_procs );
53-
5452
void register_logger_client( const deliver_logging_event_ptr client_callback );
5553

5654
/**

nestkernel/nestmodule.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -878,18 +878,6 @@ NestModule::NumProcessesFunction::execute( SLIInterpreter* i ) const
878878
i->EStack.pop();
879879
}
880880

881-
void
882-
NestModule::SetFakeNumProcesses_iFunction::execute( SLIInterpreter* i ) const
883-
{
884-
i->assert_stack_load( 1 );
885-
long n_procs = getValue< long >( i->OStack.pick( 0 ) );
886-
887-
enable_dryrun_mode( n_procs );
888-
889-
i->OStack.pop( 1 );
890-
i->EStack.pop();
891-
}
892-
893881
void
894882
NestModule::SyncProcessesFunction::execute( SLIInterpreter* i ) const
895883
{
@@ -2139,7 +2127,6 @@ NestModule::init( SLIInterpreter* i )
21392127

21402128
i->createcommand( "Rank", &rankfunction );
21412129
i->createcommand( "NumProcesses", &numprocessesfunction );
2142-
i->createcommand( "SetFakeNumProcesses", &setfakenumprocesses_ifunction );
21432130
i->createcommand( "SyncProcesses", &syncprocessesfunction );
21442131
i->createcommand( "TimeCommunication_i_i_b", &timecommunication_i_i_bfunction );
21452132
i->createcommand( "TimeCommunicationv_i_i", &timecommunicationv_i_ifunction );

nestkernel/nestmodule.h

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -647,52 +647,6 @@ class NestModule : public SLIModule
647647
void execute( SLIInterpreter* ) const override;
648648
} numprocessesfunction;
649649

650-
/** @BeginDocumentation
651-
* Name: SetFakeNumProcesses - Set a fake number of MPI processes.
652-
* Synopsis: n_procs SetFakeNumProcesses -> -
653-
* Description:
654-
* Sets the number of MPI processes to n_procs. Used for benchmarking purposes
655-
* of memory consumption only.
656-
* Please note:
657-
* - Simulation of the network will not be possible after setting fake
658-
* processes.
659-
* - It is not possible to use this function when running a script on multiple
660-
* actual MPI processes.
661-
* - The setting of the fake number of processes has to happen before the kernel
662-
* reset and before the setting of the local number of threads.
663-
* After calling SetFakeNumProcesses, it is obligatory to call either
664-
* ResetKernel or SetStatus on the Kernel for the setting of the fake
665-
* number of processes to come into effect.
666-
*
667-
* A typical use case would be to test if a neuronal network fits on a machine
668-
* of given size without using the actual resources.
669-
*
670-
* Example:
671-
* %%% Set fake number of processes
672-
* 100 SetFakeNumProcesses
673-
*
674-
* %%% Build network
675-
* /iaf_psc_alpha 100 Create
676-
* [1 100] Range /n Set
677-
*
678-
* << /source n /target n >> Connect
679-
*
680-
* %%% Measure memory consumption
681-
* memory_thisjob ==
682-
*
683-
* Execute this script with
684-
* mpirun -np 1 nest example.sli
685-
*
686-
* Availability: NEST 2.2
687-
* Author: Susanne Kunkel
688-
* FirstVersion: July 2011
689-
* SeeAlso: NumProcesses
690-
*/
691-
class SetFakeNumProcesses_iFunction : public SLIFunction
692-
{
693-
void execute( SLIInterpreter* ) const override;
694-
} setfakenumprocesses_ifunction;
695-
696650
/** @BeginDocumentation
697651
* Name: SyncProcesses - Synchronize all MPI processes.
698652
* Synopsis: SyncProcesses -> -

testsuite/regressiontests/ticket-566.sli

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)