Skip to content

Commit

Permalink
Add CUDA-aware MPI flags to QE build
Browse files Browse the repository at this point in the history
  • Loading branch information
vitduck committed Dec 21, 2021
1 parent e7dbba6 commit 3afa969
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions src/qe.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ def build(self):
runtime, cuda_cc = device_query(self.host[0])

self.check_prerequisite('hpc_sdk', '21.5')


# test
self.buildcmd += [
f'wget https://gitlab.com/QEF/q-e/-/archive/develop/q-e-develop.tar.gz -O {self.builddir}/q-e-develop.tar.gz',
f'cd {self.builddir}; tar xf q-e-develop.tar.gz',
Expand All @@ -48,9 +49,10 @@ def build(self):
'--enable-openmp '
f'--with-cuda={os.environ["NVHPC_ROOT"]}/cuda/{runtime} '
f'--with-cuda-cc={cuda_cc} '
f'--with-cuda-runtime={runtime} '
'make -j 8 pw;'
'make -j 8 neb;'
f'--with-cuda-runtime={runtime}; '
'perl -pi -e "s/^(DFLAGS.*)/\$1 -D__GPU_MPI/" make.inc; '
'make -j 8 pw; '
'make -j 8 neb; '
'make install')]

super().build()
Expand Down
2 changes: 1 addition & 1 deletion test/test_stream_omp.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# scan affinity/thread
for affinity in ['close', 'spread']:
for thread in [1, 2, 4, 8, 16, 24, 32]:
for thread in [1, 2, 4, 8, 16, 24, 32, 40]:
stream.affinity = affinity
stream.thread = thread

Expand Down

0 comments on commit 3afa969

Please sign in to comment.