Skip to content

Commit

Permalink
use full path to pick the right mpi compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
rizsotto committed Jul 24, 2018
1 parent 7486bc2 commit 2a25141
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libscanbuild/compilation.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ def is_cxx_compiler(cmd):
return ('c', parameters) if result is None else result
# MPI compiler wrappers add extra parameters
elif is_mpi_wrapper(executable):
mpi_call = get_mpi_call(executable) # type: List[str]
# Pass the executable with full path to avoid pick different
# executable from PATH.
mpi_call = get_mpi_call(command[0]) # type: List[str]
return cls._split_compiler(mpi_call + parameters, cc, cxx)
# and 'compiler' 'parameters' is valid.
elif is_c_compiler(executable):
Expand Down

0 comments on commit 2a25141

Please sign in to comment.