Skip to content

Commit be83ee0

Browse files
committed
Add parallel init for dgemm
1 parent ce40fdc commit be83ee0

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

cscs-checks/microbenchmarks/cpu/dgemm/dgemm.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,10 @@ def __init__(self):
3636
self.build_system.cflags = ['-O3']
3737
self.sys_reference = {
3838
'daint:gpu': (300.0, -0.15, None, 'Gflop/s'),
39-
'daint:mc': (860.0, -0.15, None, 'Gflop/s'),
39+
'daint:mc': (1040.0, -0.15, None, 'Gflop/s'),
4040
'dom:gpu': (300.0, -0.15, None, 'Gflop/s'),
41-
'dom:mc': (860.0, -0.15, None, 'Gflop/s'),
42-
43-
# FIXME: This needs further investigation (see SD-51352)
44-
'eiger:mc': (650.0, -0.15, None, 'Gflop/s'),
41+
'dom:mc': (1040.0, -0.15, None, 'Gflop/s'),
42+
'eiger:mc': (3200.0, -0.15, None, 'Gflop/s'),
4543
}
4644
self.maintainers = ['AJ', 'VH']
4745
self.tags = {'benchmark', 'diagnostic', 'craype'}
@@ -80,7 +78,10 @@ def set_tasks(self):
8078

8179
if self.num_cpus_per_task:
8280
self.variables = {
83-
'OMP_NUM_THREADS': str(self.num_cpus_per_task)
81+
'OMP_NUM_THREADS': str(self.num_cpus_per_task),
82+
'OMP_BIND': 'cores',
83+
'OMP_PROC_BIND': 'spread',
84+
'OMP_SCHEDULE': 'static'
8485
}
8586

8687
@sn.sanity_function

cscs-checks/microbenchmarks/cpu/dgemm/src/dgemm.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,11 @@ int main(int argc, char* argv[])
4949
printf("%s: LOOP COUNT\t\t\t:\t%d \n", hostname, LOOP_COUNT);
5050
printf("\n");
5151

52+
#pragma omp parallel for
5253
for (i=0; i<m*k ; ++i) A[i] = i%3+1;
54+
#pragma omp parallel for
5355
for (i=0; i<k*n ; ++i) B[i] = i%3+1;
56+
#pragma omp parallel for
5457
for (i=0; i<m*n ; ++i) C[i] = i%3+1;
5558

5659
gflop = (2.0 * m * n * k + 3.0 * m * n) * 1E-9;

0 commit comments

Comments
 (0)