Re: [AMBER] velocity modification in PMEMD, CUDA version

From: Ross Walker <ross.rosswalker.co.uk>
Date: Tue, 6 Sep 2011 20:10:29 -0700

Hi Changjun,

This 'should' work although I'd need to look carefully at the code to make
sure it being done in the correct location. The best place to look is
probably around the location where the ntt=1 / 2 thermostats are triggered.
I assume you are referring to just the serial pmemd.cuda code here and not
the MPI version.

I would suggest downloading the velocities and then writing them to disk
immediately after the download and then comparing what you get with the cpu
version or from a write somewhere else in the GPU code. This will give you
an idea of what is contained.

Note, this approach as written will be 'very' slow on the GPU. Probably
slower than just running on the CPU since you are resynching on every single
step. Until you write a cuda kernel for your subroutine to avoid the sync
you will likely not see any performance benefits.

All the best
Ross


> -----Original Message-----
> From: Chen, Changjun [mailto:cjchen.math.msu.edu]
> Sent: Monday, September 05, 2011 7:29 PM
> To: amber.ambermd.org
> Subject: [AMBER] velocity modification in PMEMD, CUDA version
>
> Dear all,
> Hi, I am Changjun, recently, I am trying to add some code in
> runmd.fpp, which is part of PMEMD. It is used to modify the velocity of
> atoms to restrict them in one cylinder. The framework of the code is as
> following:
>
> #ifdef CUDA
> call gpu_download_vel(vel)
> #endif
>
> call velocity_modify(vel)
>
> #ifdef CUDA
> call gpu_upload_vel(vel)
> #endif
>
> All the work that modify the atom velocities are done in my
> subroutine " velocity_modify(vel) ". here vel(3,atm_cnt) saves the
> velocities. I insert the code just after the line " end if !
> (reset_velocities)" . The compiling process is successful.
> In the actual simulation, this code work perfectly in pmemd.MPI,
> but not work in pmemd.cuda. Could you please give me some instructions
> on it? Is there something I missing during the communication of
> velocities between CPU and GPU?
>
> Thanks you!
>
> Sincerely,
> Changjun
>
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber


_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Tue Sep 06 2011 - 20:30:02 PDT
Custom Search