[Omp] First Touch initialization
Federico Massaioli
federico.massaioli at caspur.it
Wed Mar 8 04:59:50 PST 2006
Francisco,
> We have tried it and it works indeed (Intel Fortran compiler v9 on 4-way
> Opteron),
> but I don't understand why.
Array elements are mapped in contiguous addresses in the process address
space, which is virtual, and has nothing to do with the physical address
space layout of your process. This is contiguous inside a memory page (4KB
tipically), but memory pages can be scattered around in whatever order.
The CPU hardware will take care of translating contiguous virtual
addresses to non contiguous physical ones, transparently to the program.
On NUMA machines, first-touch allocation performed in parallel has the
effect of allocating each physical memory page on the physical memory bank
connected to the CPU running the thread that (hopefully, depending on the
program) will prevalently access the corresponding virtual addresses.
Federico
-----------------------------------------------------------------------
"Even if you don't always actually 'need' the highest precision, you
can still delight in the joy of fully understanding what's going on."
Paul Horowitz & Winfield Hill - The Art of Electronics
-----------------------------------------------------------------------
Federico Massaioli CASPUR
email: federico.massaioli at caspur.it V. dei Tizii 6/b
Ph.: +39-06-44486710 I-00185 Roma Italy
Fax: +39-06-4957083 www.caspur.it
More information about the Omp
mailing list