Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit 89653bd

Browse files
authored
Remove unused code (#376)
* Remove spi/include/kernel/memory.h from BG-Q time * Remove old HPM profiler code
1 parent f38082f commit 89653bd

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

coreneuron/mpi/nrnmpi.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,6 @@ static MPI_Group grp_net;
5353

5454
extern void nrnmpi_spike_initialize();
5555

56-
#define nrnmpidebugleak 0
57-
#if nrnmpidebugleak
58-
extern void nrnmpi_checkbufleak();
59-
#endif
60-
6156
static int nrnmpi_under_nrncontrol_;
6257

6358
void nrnmpi_init(int nrnmpi_under_nrncontrol, int* pargc, char*** pargv) {
@@ -117,10 +112,6 @@ void nrnmpi_init(int nrnmpi_under_nrncontrol, int* pargc, char*** pargv) {
117112
nrnmpi_numprocs = nrnmpi_numprocs_bbs = nrnmpi_numprocs_world;
118113
nrnmpi_myid = nrnmpi_myid_bbs = nrnmpi_myid_world;
119114
nrnmpi_spike_initialize();
120-
/*begin instrumentation*/
121-
#if USE_HPM
122-
hpmInit(nrnmpi_myid_world, "mpineuron");
123-
#endif
124115

125116
if (nrnmpi_myid == 0) {
126117
#if defined(_OPENMP)
@@ -147,16 +138,10 @@ void nrnmpi_finalize(void) {
147138

148139
void nrnmpi_terminate() {
149140
if (nrnmpi_use) {
150-
#if USE_HPM
151-
hpmTerminate(nrnmpi_myid_world);
152-
#endif
153141
if (nrnmpi_under_nrncontrol_) {
154142
MPI_Finalize();
155143
}
156144
nrnmpi_use = false;
157-
#if nrnmpidebugleak
158-
nrnmpi_checkbufleak();
159-
#endif
160145
}
161146
}
162147

coreneuron/utils/memory_utils.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
4747
#include "coreneuron/utils/memory_utils.h"
4848
#include "coreneuron/mpi/nrnmpi.h"
4949

50-
#ifdef HAVE_MEMORY_H
51-
#include <spi/include/kernel/memory.h>
52-
#elif defined(__APPLE__) && defined(__MACH__)
50+
#if defined(__APPLE__) && defined(__MACH__)
5351
#include <mach/mach.h>
5452
#elif defined HAVE_MALLOC_H
5553
#include <malloc.h>
@@ -61,13 +59,8 @@ double nrn_mallinfo(void) {
6159
// -ve mem usage for non-supported platforms
6260
double mbs = -1.0;
6361

64-
// on bg-q use kernel/memory.h to get heap statistics
65-
#ifdef HAVE_MEMORY_H
66-
uint64_t heap = 0;
67-
Kernel_GetMemorySize(KERNEL_MEMSIZE_HEAP, &heap);
68-
mbs = heap / (1024.0 * 1024.0);
6962
// on os x returns the current resident set size (physical memory in use)
70-
#elif defined(__APPLE__) && defined(__MACH__)
63+
#if defined(__APPLE__) && defined(__MACH__)
7164
struct mach_task_basic_info info;
7265
mach_msg_type_number_t infoCount = MACH_TASK_BASIC_INFO_COUNT;
7366
if (task_info(mach_task_self(), MACH_TASK_BASIC_INFO, (task_info_t)&info, &infoCount) !=

0 commit comments

Comments
 (0)