MPI simulations

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
POST REPLY
User avatar
Ommair Ishaque
Posts: 11
Joined: Sun Feb 18, 2018 10:22 am

MPI simulations

Post by Ommair Ishaque » Sun Mar 04, 2018 10:21 pm

Hi,

I just to know if I want to run my simulations on single node with multiple cores, do i have compile or install openmm in different way? If not is there a way run simulations on multiple nodes?

User avatar
Peter Eastman
Posts: 2593
Joined: Thu Aug 09, 2007 1:25 pm

Re: MPI simulations

Post by Peter Eastman » Mon Mar 05, 2018 10:01 am

No need. If you use the CPU platform, it will automatically create enough threads to use all available cores.

User avatar
Thomas Evangelidis
Posts: 19
Joined: Fri Mar 20, 2009 8:07 am

Re: MPI simulations

Post by Thomas Evangelidis » Fri Dec 07, 2018 8:34 am

Greetings,

I am writing in this thread rather than creating a new one because I encounter a problem with multithreading. I just did a fresh compilation on my PC using the defaults parameters (attached) but when I try to minimize a system on the CPUs I see that only one core is working. The same happens even when I "export OPENMM_CPU_THREADS=12". This is in contrast to what was happening before when I also used the defaults during compilation. I have attached my CMakeCache.txt file. Is there any parameter I should change to get the multi-threading mode running properly?

Thanks in advance.
Thomas
Attachments
CMakeCache.UOCHB.txt
(32.82 KiB) Downloaded 29 times

User avatar
Peter Eastman
Posts: 2593
Joined: Thu Aug 09, 2007 1:25 pm

Re: MPI simulations

Post by Peter Eastman » Fri Dec 07, 2018 10:53 am

What platform are you using?

User avatar
Thomas Evangelidis
Posts: 19
Joined: Fri Mar 20, 2009 8:07 am

Re: MPI simulations

Post by Thomas Evangelidis » Fri Dec 07, 2018 4:00 pm

I am on Ubuntu 18.04 64-bit, CUDA-10. For energy minimization I ALWAYS use the CPU.

User avatar
Peter Eastman
Posts: 2593
Joined: Thu Aug 09, 2007 1:25 pm

Re: MPI simulations

Post by Peter Eastman » Fri Dec 07, 2018 6:23 pm

I mean which OpenMM platform, not which OS. What does context.getPlatform().getName() return?

User avatar
Thomas Evangelidis
Posts: 19
Joined: Fri Mar 20, 2009 8:07 am

Re: MPI simulations

Post by Thomas Evangelidis » Sat Dec 08, 2018 3:12 am

As I state above, I do the minimization on CPU platform, this is also returned by the command line you wrote. I have compiled from source the dev version on both my PC and my laptop. On my laptop the CPU minimization runs on multiple threads but on my PC on just one. The only difference I can notice is that on my laptop I also have OpenCL libraries installed (and the respective variables 'ON' inside my makefile) but on my PC not. Do you think this is the reason why?

User avatar
Peter Eastman
Posts: 2593
Joined: Thu Aug 09, 2007 1:25 pm

Re: MPI simulations

Post by Peter Eastman » Sun Dec 09, 2018 5:34 pm

If you're using the CPU platform, it makes no difference whether the OpenCL platform also happens to be present. It's not getting used.

If 1) you're using the CPU platform, and 2) your processor has multiple cores, and 3) you haven't set OPENMM_CPU_THREADS=1 to force it to only use one thread, then it should be using multiple threads. If it really isn't, that suggests one of the above assumption is wrong. Also make sure nothing else is limiting how many cores it can use (such as OS level process quotas).

User avatar
Thomas Evangelidis
Posts: 19
Joined: Fri Mar 20, 2009 8:07 am

Re: MPI simulations

Post by Thomas Evangelidis » Mon Dec 10, 2018 5:37 am

OK, this doesn't help really. I do both use the CPU platform and OPENMM_CPU_THREADS=12.

Anyway, the reason I do the minimization on the CPU is becasue with CUDA mixed precission I get structures with clashes and when I launch MD I get NaN. Now I changed that and do the minimization on CUDA with double precision. So far I didn't have a problem and it's remarkably faster than on 12 CPu cores. Do you think that CPU and GPU double precision are equally credible?

User avatar
Peter Eastman
Posts: 2593
Joined: Thu Aug 09, 2007 1:25 pm

Re: MPI simulations

Post by Peter Eastman » Tue Dec 11, 2018 12:42 pm

Do you think that CPU and GPU double precision are equally credible?
It isn't really a question of being credible, since there's no single right answer. The minimizer just searches for any nearby conformation where all the forces are sufficiently close to zero. The two platforms won't necessarily end with the same conformation (and for that matter, running it twice with the same platform may yield two different conformations), but that's ok. As long as it finds something that satisfies your convergence criterion, that's "correct".

POST REPLY