Skip to content

Commit 3fea3f5

Browse files
Handle mpi+omp case in macro generation (#33)
Added a special case for the 'mpi+omp' parallelism model to generate the macro '-DUSE_MPI_OMP' instead of the default uppercase substitution.
1 parent 4c9877f commit 3fea3f5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/cpp/cpp_driver_wrapper.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ def compile(
9090
compile_process = build_kokkos(driver_src, os.path.dirname(output_path), problem_size=problem_size)
9191
else:
9292
binaries_str = ' '.join(binaries)
93-
macro = f"-DUSE_{self.parallelism_model.upper()}"
93+
if self.parallelism_model == "mpi+omp":
94+
macro = "-DUSE_MPI_OMP"
95+
else:
96+
macro = f"-DUSE_{self.parallelism_model.upper()}"
9497
cmd = f"{CXX} {CXXFLAGS} -Icpp -Icpp/models {macro} {binaries_str} -o {output_path}"
9598
try:
9699
compile_process = run_command(cmd, timeout=self.build_timeout, dry=self.dry)

0 commit comments

Comments
 (0)