Data Structure Example - Molecular Dynamics
Intermediate step where each loop is parallelized
- Verifies that work is fundamentally parallel
- If performance is good enough - STOP
- But high overheads
- Loop startup
- Data migration
#pragma omp parallel for private (n) shared(nAtom,nMax,cellList)
for (n = nAtom; n < nMax; n ++)
#pragma omp parallel for private (ip)
for (ip = 0; ip < nProc; ip ++) BuildNebrListCells (ip);
#pragma omp parallel for private (ip)
for (ip = 0; ip < nProc; ip ++) BuildNebrListEntries (ip, nebrTab[ip], &nebrTabLen[ip]);