Skip to content

Commit

Permalink
memory leak bug fix...EJB
Browse files Browse the repository at this point in the history
  • Loading branch information
ebylaska committed May 20, 2024
1 parent beb74fd commit 3ece142
Show file tree
Hide file tree
Showing 8 changed files with 1,348 additions and 906 deletions.
23 changes: 11 additions & 12 deletions Nwpw/nwpwlib/C3dB/CBalance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ CBalance::~CBalance()

/***********************************
* *
* CBalance::c_unbalance_start *
* CBalance::c_unbalance_start *
* *
***********************************/
/**
Expand All @@ -311,24 +311,23 @@ CBalance::~CBalance()
*/
void CBalance::c_unbalance_start(const int nffts, const int nb, double *a, const int request_indx, const int msgtype)
{
int j, pto, pfrom, msglen, indx;

//int j, pto, pfrom, msglen, indx;
if (sender_list[nb])
for (j = 0; j < npacket_list[nb]; ++j)
for (auto j=0; j<npacket_list[nb]; ++j)
{
pfrom = proc_to_list[nb][j];
msglen = 2*packet_size_list[nb][j];
indx = 2*indx_start_list[nb][j];
int pfrom = proc_to_list[nb][j];
int msglen = 2*packet_size_list[nb][j];
int indx = 2*indx_start_list[nb][j];
if (msglen > 0)
parall->adreceive(request_indx, msgtype, pfrom, msglen, a + indx);
}

if (receiver_list[nb])
for (j = 0; j < npacket_list[nb]; ++j)
for (auto j=0; j<npacket_list[nb]; ++j)
{
pto = proc_from_list[nb][j];
msglen = 2*packet_size_list[nb][j];
indx = 2*indx_start_list[nb][j];
int pto = proc_from_list[nb][j];
int msglen = 2*packet_size_list[nb][j];
int indx = 2*indx_start_list[nb][j];
if (msglen > 0)
parall->adsend(request_indx, msgtype, pto, msglen, a + indx);
}
Expand Down Expand Up @@ -357,7 +356,7 @@ void CBalance::c_unbalance_end(const int nffts, const int nb, double *a, const i

/********************************
* *
* CBalance::c_unbalance *
* CBalance::c_unbalance *
* *
********************************/
/**
Expand Down
Loading

0 comments on commit 3ece142

Please sign in to comment.