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: [email protected] > To: [email protected] > 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 : [email protected] > 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 _______________________________________________ Mailing list: https://launchpad.net/~yade-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp

