[gmx-users] Can I customize Gromacs (e.g., on-fly-analysis) with multi-threading enabled?

Mark Abraham mark.abraham at anu.edu.au
Tue Oct 5 01:55:28 CEST 2010



----- Original Message -----
From: 吴鹏 <gerogewu8 at gmail.com>
Date: Tuesday, October 5, 2010 3:24
Subject: [gmx-users] Can I customize Gromacs (e.g., on-fly-analysis) with multi-threading enabled?
To: Discussion list for GROMACS users <gmx-users at gromacs.org>

> Dear All:
> 
> I am trying to do trajectory analysis on-the-fly and encountered some
> difficulty.
> 
> What did I do:
> I inserted a small piece of code into "md.c" to READ the 
> position of
> atoms and do some simple analysis. In the GMX3.2, my code works fine.
> 
> The problem:
> In GMX4.5.1, my code works only if I set mdrun -nt to 1, i.e. 
> force GMX
> to use one thread. Otherwise, mdrun reports segmentation fault.
> 
> Questions:
> 1. I speculate that the segmentation fault is caused by thread
> conflict, i.e., I somehow break parallelization in Gromacs - is this
> right?

There are many possible causes, not least that you were using a technique that relied on static variables, which do not work reliably with threads.

> 2. Is it possible to perform on-fly analysis or other types of
> customization of Gromacs when multi-threading is enabled?

Yes, but you have to do it right.

> 3. If answer to 2 is yes, where can I find the documentations for
> doing so, and how difficult is it to write multi-threading code using
> Gromacs's own library?

The requirements for code that works with threading are well known, and you should be able to Google for them. More importantly, you would have to cope with the problem that under domain or particle decomposition, each process only has a fraction of the atomic data. Unless you need the results for the ongoing simulation, it is far easier to write code to do your analysis afterwards.

Mark

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-users/attachments/20101005/6cc7a241/attachment.html>


More information about the gromacs.org_gmx-users mailing list