yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #03915
Re: How to use a plugin
Weird:
Yade [3]: O.numThreads
-> [3]: 2
But when I display the output from C using omp_get_max_threads, it shows 1 !
But somehow disabling parallel execution using globalMutex solved the problem of my global variable get messed up, althugh parallelism is still on. Do you know why?
Boon
----------------------------------------
> From: eudoxos@xxxxxxxx
> To: yade-dev@xxxxxxxxxxxxxxxxxxx
> Date: Fri, 9 Apr 2010 17:39:52 +0200
> Subject: Re: [Yade-dev] How to use a plugin
>
>> Thanks, Vaclav. What I did was I put this in the hpp file:
>> boost::mutex globalMutex;
>>
>> And this inside the function, which uses my variable idA:
>> boost::mutex::scoped_lock lock(globalMutex);
>
> Ok, but this will only prevent parallel execution of your function; but
> you said you had parallelism disabled... Could you check by inspecting
>
> O.numThreads==1
>
> ?
>
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-dev
> Post to : yade-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-dev
> More help : https://help.launchpad.net/ListHelp
_________________________________________________________________
Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.
https://signup.live.com/signup.aspx?id=60969
Follow ups
References
-
How to use a plugin
From: boon chiaweng, 2010-04-01
-
Re: How to use a plugin
From: boon chiaweng, 2010-04-05
-
Re: How to use a plugin
From: Václav Šmilauer, 2010-04-05
-
Re: How to use a plugin
From: boon chiaweng, 2010-04-05
-
Re: How to use a plugin
From: boon chiaweng, 2010-04-07
-
Re: How to use a plugin
From: Václav Šmilauer, 2010-04-08
-
Re: How to use a plugin
From: boon chiaweng, 2010-04-08
-
Re: How to use a plugin
From: Václav Šmilauer, 2010-04-08
-
Re: How to use a plugin
From: boon chiaweng, 2010-04-08
-
Re: How to use a plugin
From: Václav Šmilauer, 2010-04-08
-
Re: How to use a plugin
From: Anton Gladky, 2010-04-08
-
Re: How to use a plugin
From: boon chiaweng, 2010-04-08
-
Re: How to use a plugin
From: boon chiaweng, 2010-04-08
-
Re: How to use a plugin
From: boon chiaweng, 2010-04-09
-
Re: How to use a plugin
From: boon chiaweng, 2010-04-09
-
Re: How to use a plugin
From: Václav Šmilauer, 2010-04-09
-
Re: How to use a plugin
From: boon chiaweng, 2010-04-09
-
Re: How to use a plugin
From: Václav Šmilauer, 2010-04-09