← Back to team overview

yade-dev team mailing list archive

Re: How to use a plugin

 

2010/4/9 Václav Šmilauer <eudoxos@xxxxxxxx>

>
> > I used global mutex.  Now it works.
> Hi boon, congratulations!
>
> Sorry I didn't reply earlier. Can you briefly describe your solution? I
> had similar problems, that passing pointer to function somehow made
> omp_get_thread_num() return garbage (at least it seemed to).
>
> Note that if you want to run multi-threaded (for performance), you can
> store those globals in array (initialized to size omp_get_max_threads())
> and retrieve per-thread pointer by
> yourStaticArray[omp_get_thread_num()].
>

Oh, so we should always do like you suggest when we define global variables
if we want to maintain the parallel processing? If so, I would suggest to
add this point to Yade documentation so that we all keep in mind (since
parallel processing is enabled by default).
cheers, Chiara

>
> Cheers, vaclav
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-dev<https://launchpad.net/%7Eyade-dev>
> Post to     : yade-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-dev<https://launchpad.net/%7Eyade-dev>
> More help   : https://help.launchpad.net/ListHelp
>

Follow ups

References