Re: [AMBER-Developers] pmemd external force

From: Ghoreishi, Delaram <>
Date: Mon, 2 Oct 2017 16:03:55 +0000


I have to add that David Cerutti has implemented the kernel to partially upload/download coordinates from a given mask. Feel free to check the on the master branch. These set of routines have been added recently and we are working on having the same features for the forces. All this should be out in amber 18. So far we could gain a speed up of about 2x in the data transfer (which very well depends on lots of factors, including the size of the mask you want to shuttle the coordinates). A complete gpu implementation is still what we should aim for to get the maximum efficiency.


Delaram Ghoreishi
Ph.D. Candidate
Department of Physics
University of Florida

From: Sergio Decherchi at IIT <>
Sent: Monday, October 2, 2017 10:21 AM
To: AMBER Developers Mailing List
Subject: Re: [AMBER-Developers] pmemd external force

Dear Ross,
thank you.
What you wrote is exactly what is in my plan. Exactly in order to do
that, I need in a first stage to know which
is the right entry point (Josh already answered but he was not sure
about GPUs) in Amber code to perform a force/crd download
and then frc upload when the GPU is used (and be sure to be consistent).
If I have this information I can start prototyping. Then, in a following
stage, I need to know which are the variables and which
is their memory layout/units used in the GPU for the forces and the
coordinates to develop/call proper CUDA kernels.
Is there any developer guide I can read for such information?
Thanks a lot,

Il 02/10/2017 13:32, Ross Walker ha scritto:
> Hi Sergio,
> I see Josh already responded but in addition to what he said note that the use of gpu_download and gpu_upload are really intended just to be used for simplifying development / debugging. They are not designed to be used in production code since it adds a huge amount of overhead and puts computation load on the CPU - which is, by design, only serial. Plus we encourage people when building machines for AMBER GPU to spec them with low end CPUs to save on cost so you cannot assume that a machine running AMBER on GPUs will have fast CPUs.
> The correct approach is to get the basic elements working and check an algorithmic approach is valid using the download / upload routines and then to write a CUDA kernel for the method, call that instead of the upload and download and then remove the upload and download routines.
> All the best
> Ross
>> On Oct 2, 2017, at 04:35, Sergio Decherchi at IIT <> wrote:
>> Dear Amber Developers,
>> I would like to add an external force to the pmemd program.
>> I am looking at the pme_force.F90 source file and it seems a suitable
>> location where
>> to add an external force because I see that there, for instance, scaled
>> md is applied.
>> Is this correct?
>> Also I am calling gpu_download_crd and gpu_download_frc to download
>> coordinates and forces
>> and I update them upon computation via gpu_upload_frc. Is this the right
>> approach? Which
>> are the units of the forces and coordinates used by thoose functions and
>> which is the memory layout of those arrays?
>> Is there a more lightweight way to retrieve forces/coordinates from GPU,
>> because I observed a significant slow down
>> when using those functions at each time step.
>> Last, in case one may envision to add the force directly on the GPU (to
>> make it faster) which is the memory layout of the forces on the GPU and
>> which are the variables that should be updated/read (e.g. coordinates,
>> forces)?
>> Many thanks,
>> Sergio Decherchi
>> _______________________________________________
>> AMBER-Developers mailing list
> _______________________________________________
> AMBER-Developers mailing list

AMBER-Developers mailing list

AMBER-Developers mailing list
Received on Mon Oct 02 2017 - 09:30:02 PDT
Custom Search