From 983b681d46d8f279955ed4a5cbbb3bc04c34313d Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Fri, 7 Apr 2023 14:12:02 +0100 Subject: [PATCH 1/2] unused statement cleaning --- Grid/allocator/MemoryManagerCache.cc | 1 - Grid/communicator/SharedMemoryMPI.cc | 5 +---- Grid/stencil/Stencil.h | 4 ++-- Grid/tensors/Tensor_extract_merge.h | 5 ----- 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/Grid/allocator/MemoryManagerCache.cc b/Grid/allocator/MemoryManagerCache.cc index 6c81e5b0..e758ac2f 100644 --- a/Grid/allocator/MemoryManagerCache.cc +++ b/Grid/allocator/MemoryManagerCache.cc @@ -519,7 +519,6 @@ void MemoryManager::Audit(std::string s) uint64_t LruBytes1=0; uint64_t LruBytes2=0; uint64_t LruCnt=0; - uint64_t LockedBytes=0; std::cout << " Memory Manager::Audit() from "<ShiftedRanks(dimension,nbr_proc,xmit_to_rank,recv_from_rank); #ifdef SHM_FAST_PATH #warning STENCIL SHM FAST PATH SELECTED + int shm_recv=0; // shm == receive pointer if offnode // shm == Translate[send pointer] if on node -- my view of his send pointer cobj *shm = (cobj *) _grid->ShmBufferTranslate(recv_from_rank,sp); @@ -1405,7 +1406,6 @@ public: acceleratorMemSet(rp,0,bytes); // Zero prefill comms buffer to zero } int do_send = (comms_send|comms_partial_send) && (!shm_send ); - int do_recv = (comms_send|comms_partial_send) && (!shm_recv ); AddPacket((void *)sp,(void *)rp, xmit_to_rank,do_send, recv_from_rank,do_send, diff --git a/Grid/tensors/Tensor_extract_merge.h b/Grid/tensors/Tensor_extract_merge.h index f1407d1f..7c820f26 100644 --- a/Grid/tensors/Tensor_extract_merge.h +++ b/Grid/tensors/Tensor_extract_merge.h @@ -133,7 +133,6 @@ typename vobj::scalar_object extractLane(int lane, const vobj & __restrict__ vec typedef scalar_type * pointer; constexpr int words=sizeof(vobj)/sizeof(vector_type); - constexpr int Nsimd=vector_type::Nsimd(); scalar_object extracted; pointer __restrict__ sp = (pointer)&extracted; // Type pun @@ -153,7 +152,6 @@ void insertLane(int lane, vobj & __restrict__ vec,const typename vobj::scalar_ob typedef scalar_type * pointer; constexpr int words=sizeof(vobj)/sizeof(vector_type); - constexpr int Nsimd=vector_type::Nsimd(); pointer __restrict__ sp = (pointer)&extracted; vector_type *vp = (vector_type *)&vec; @@ -178,8 +176,6 @@ void extract(const vobj &vec,const ExtractPointerArray &extracted, int off const int s = Nsimd/Nextr; vector_type * vp = (vector_type *)&vec; - scalar_type vtmp; - sobj_scalar_type stmp; for(int w=0;w &extracted, int offset) vector_type * vp = (vector_type *)&vec; scalar_type vtmp; - sobj_scalar_type stmp; for(int w=0;w Date: Fri, 7 Apr 2023 14:27:18 +0100 Subject: [PATCH 2/2] mores unused statements removed --- Grid/tensors/Tensor_extract_merge.h | 3 --- HMC/Mobius2p1f_DD_RHMC_96I.cc | 1 - 2 files changed, 4 deletions(-) diff --git a/Grid/tensors/Tensor_extract_merge.h b/Grid/tensors/Tensor_extract_merge.h index 7c820f26..a92a02e3 100644 --- a/Grid/tensors/Tensor_extract_merge.h +++ b/Grid/tensors/Tensor_extract_merge.h @@ -237,9 +237,6 @@ void copyLane(vobjOut & __restrict__ vecOut, int lane_out, const vobjIn & __rest typedef oextract_type * opointer; typedef iextract_type * ipointer; - constexpr int oNsimd=ovector_type::Nsimd(); - constexpr int iNsimd=ivector_type::Nsimd(); - iscalar_type itmp; oscalar_type otmp; diff --git a/HMC/Mobius2p1f_DD_RHMC_96I.cc b/HMC/Mobius2p1f_DD_RHMC_96I.cc index 967a3fc9..c28296a3 100644 --- a/HMC/Mobius2p1f_DD_RHMC_96I.cc +++ b/HMC/Mobius2p1f_DD_RHMC_96I.cc @@ -329,7 +329,6 @@ int main(int argc, char **argv) { auto grid4= GridPtr; - auto rbgrid4= GridRBPtr; auto rbgrid = StrangeOp.FermionRedBlackGrid(); auto grid = StrangeOp.FermionGrid(); if(1){