----- Original Message -----
From: 吴鹏 <geroge...@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@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@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-requ...@gromacs.org.
Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

Reply via email to