|Re: [eigen] a branch for SMP (openmp) experimentations|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] a branch for SMP (openmp) experimentations
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Fri, 26 Feb 2010 11:58:56 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type; bh=eSv0Wy+8lX3VgmJSoc4lnfLHKEFrsw5PTEma9bVUl1g=; b=SxrOTq9yaza51QZRt0s6gnH0FZGCsYE75L8c4ptFmZ7clZOUhqIN1/lbUQhaJ6OwB6 K7JldaIcrRd353WoNHHVigLJei5cQjr9YPJ2udrFxMswwE4wAo0PufmnzY0ApQx+BOUg ejkeIabZhozJ0ZyvvLa/NxqwwZVW5GlaDbFOU=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=JqGHpDmxVT4n6SUVtfV6fs+pyPNkZdW1rypDN7Z7rJMIxfiLncZvjhZGRR0JpOY42I oQXuXkyyVffCJM++fCFN2CBsMoZzitxb5J4WAXKBAY2QtLoVqU763Q8Q6fkVx05q8d9h FyWXFtRNkxMMp883MV0h2ySuZmyDcfekK9AR4=
On Fri, Feb 26, 2010 at 10:44 AM, Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
There is also something very strange: if I change the code so that all threads pack the exactly same B_k to the same shared B' and keep the barrier, then I still don't get a correct result... (if each thread have there own B', then it's fine)
arf, I'm too much used to GPU computing where all threads of a wrap follows the same execution path. Here I realized that even though all threads have to do exactly the same amount of work they can be totally de-synchronized: the barrier occurs with different horizontal panel Bk of B ! To be more precise, the outermost loop looks like this:
#pragma omp barrier
// here some threads have k=0 while others have k=1....
I guess that means that packing b is faster than creating a thread, and so the first barrier occurs before all threads have been launched ! So we really have to take care at how we synchronize the threads.