From: Mark Abraham Date: Mon, 2 Aug 2021 08:59:07 +0000 (+0000) Subject: Fix style violations X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=66f98bb624163d67ddddaf2eb671cdba664be1b3;p=alexxy%2Fgromacs.git Fix style violations --- diff --git a/src/gromacs/ewald/pme_force_sender_gpu_impl.cu b/src/gromacs/ewald/pme_force_sender_gpu_impl.cu index 64b3440d2e..105437e7f8 100644 --- a/src/gromacs/ewald/pme_force_sender_gpu_impl.cu +++ b/src/gromacs/ewald/pme_force_sender_gpu_impl.cu @@ -62,11 +62,11 @@ PmeForceSenderGpu::Impl::Impl(GpuEventSynchronizer* pmeForcesReady, pmeForcesReady_(pmeForcesReady), comm_(comm), ppRanks_(ppRanks), - deviceContext_(deviceContext), ppCommStream_(ppRanks.size()), ppCommEvent_(ppRanks.size()), - pmeRemoteGpuForcePtr_(ppRanks.size()), - pmeRemoteCpuForcePtr_(ppRanks.size()) + deviceContext_(deviceContext), + pmeRemoteCpuForcePtr_(ppRanks.size()), + pmeRemoteGpuForcePtr_(ppRanks.size()) { // Create streams and events to manage pushing of force buffers to remote PP ranks std::unique_ptr stream; diff --git a/src/gromacs/ewald/pme_pp_comm_gpu.h b/src/gromacs/ewald/pme_pp_comm_gpu.h index a11f185a12..ca7cdceef9 100644 --- a/src/gromacs/ewald/pme_pp_comm_gpu.h +++ b/src/gromacs/ewald/pme_pp_comm_gpu.h @@ -75,7 +75,7 @@ public: */ PmePpCommGpu(MPI_Comm comm, int pmeRank, - std::vector& pmeCpuForceBuffer, + std::vector* pmeCpuForceBuffer, const DeviceContext& deviceContext, const DeviceStream& deviceStream); ~PmePpCommGpu(); diff --git a/src/gromacs/ewald/pme_pp_comm_gpu_impl.cpp b/src/gromacs/ewald/pme_pp_comm_gpu_impl.cpp index 0a5c60a4dd..3b8377fbb8 100644 --- a/src/gromacs/ewald/pme_pp_comm_gpu_impl.cpp +++ b/src/gromacs/ewald/pme_pp_comm_gpu_impl.cpp @@ -64,7 +64,7 @@ class PmePpCommGpu::Impl /*!\brief Constructor stub. */ PmePpCommGpu::PmePpCommGpu(MPI_Comm /* comm */, int /* pmeRank */, - std::vector& /* pmeCpuForceBuffer */, + std::vector* /* pmeCpuForceBuffer */, const DeviceContext& /* deviceContext */, const DeviceStream& /* deviceStream */) : impl_(nullptr) diff --git a/src/gromacs/ewald/pme_pp_comm_gpu_impl.cu b/src/gromacs/ewald/pme_pp_comm_gpu_impl.cu index 50e9a4189f..e7d05b01f5 100644 --- a/src/gromacs/ewald/pme_pp_comm_gpu_impl.cu +++ b/src/gromacs/ewald/pme_pp_comm_gpu_impl.cu @@ -61,7 +61,7 @@ namespace gmx PmePpCommGpu::Impl::Impl(MPI_Comm comm, int pmeRank, - std::vector& pmeCpuForceBuffer, + std::vector* pmeCpuForceBuffer, const DeviceContext& deviceContext, const DeviceStream& deviceStream) : deviceContext_(deviceContext), @@ -89,7 +89,7 @@ void PmePpCommGpu::Impl::reinit(int size) MPI_Recv(&remotePmeXBuffer_, sizeof(float3*), MPI_BYTE, pmeRank_, 0, comm_, MPI_STATUS_IGNORE); // send host and device force buffer addresses to PME rank MPI_Send(&d_pmeForces_, sizeof(float3*), MPI_BYTE, pmeRank_, 0, comm_); - RVec* pmeCpuForceBufferData = pmeCpuForceBuffer_.data(); + RVec* pmeCpuForceBufferData = pmeCpuForceBuffer_->data(); MPI_Send(&pmeCpuForceBufferData, sizeof(RVec*), MPI_BYTE, pmeRank_, 0, comm_); } @@ -221,7 +221,7 @@ GpuEventSynchronizer* PmePpCommGpu::Impl::getForcesReadySynchronizer() PmePpCommGpu::PmePpCommGpu(MPI_Comm comm, int pmeRank, - std::vector& pmeCpuForceBuffer, + std::vector* pmeCpuForceBuffer, const DeviceContext& deviceContext, const DeviceStream& deviceStream) : impl_(new Impl(comm, pmeRank, pmeCpuForceBuffer, deviceContext, deviceStream)) diff --git a/src/gromacs/ewald/pme_pp_comm_gpu_impl.h b/src/gromacs/ewald/pme_pp_comm_gpu_impl.h index f62faea933..c9ac0d6dd2 100644 --- a/src/gromacs/ewald/pme_pp_comm_gpu_impl.h +++ b/src/gromacs/ewald/pme_pp_comm_gpu_impl.h @@ -66,7 +66,7 @@ public: */ Impl(MPI_Comm comm, int pmeRank, - std::vector& pmeCpuForceBuffer, + std::vector* pmeCpuForceBuffer, const DeviceContext& deviceContext, const DeviceStream& deviceStream); ~Impl(); @@ -165,7 +165,7 @@ private: //! Rank of PME task int pmeRank_ = -1; //! Buffer for PME force on CPU - std::vector& pmeCpuForceBuffer_; + std::vector* pmeCpuForceBuffer_; //! Buffer for staging PME force on GPU DeviceBuffer d_pmeForces_; //! number of atoms in PME force staging array diff --git a/src/gromacs/mdrun/runner.cpp b/src/gromacs/mdrun/runner.cpp index 42bab51cb8..f7d2bc24f1 100644 --- a/src/gromacs/mdrun/runner.cpp +++ b/src/gromacs/mdrun/runner.cpp @@ -1649,7 +1649,7 @@ int Mdrunner::mdrunner() fr->pmePpCommGpu = std::make_unique( cr->mpi_comm_mysim, cr->dd->pme_nodeid, - cr->dd->pmeForceReceiveBuffer, + &cr->dd->pmeForceReceiveBuffer, deviceStreamManager->context(), deviceStreamManager->stream(DeviceStreamType::PmePpTransfer)); }