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

吴鹏 gerogewu8 at gmail.com
Wed Oct 6 16:16:40 CEST 2010


Hi Mark,

Thank you for your help. Your reply gave me some hints. Firstly, I
will check again whether thread caused the problem. Then check the
requirements for code to work with threading.

The thing worries me on thread is that, Gromacs uses its own library
not the common OpenMP to manipulate thread. And there is no documents
on how to use Gromacs library. So I am a little bit worry on whether
the library is easy to use for common users. Is there any documents on
the library?
What's idea it is based on?

I will dig out what's going wrong on my code. Thank you for your help.

Best regards,

Peng
On Mon, Oct 4, 2010 at 7:55 PM, Mark Abraham <mark.abraham at anu.edu.au> wrote:
>
>
> ----- 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
> --
> gmx-users mailing list    gmx-users at gromacs.org
> http://lists.gromacs.org/mailman/listinfo/gmx-users
> Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
> Please don't post (un)subscribe requests to the list. Use the
> www interface or send it to gmx-users-request at gromacs.org.
> Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>



More information about the gromacs.org_gmx-users mailing list