# Bug report - CMake 3.18 findMPI can't find MS-MPI

**URL:** https://discourse.cmake.org/t/bug-report-cmake-3-18-findmpi-cant-find-ms-mpi/1948
**Category:** Development
**Created:** [September 30, 2020, 12:45pm UTC](https://discourse.cmake.org/t/bug-report-cmake-3-18-findmpi-cant-find-ms-mpi/1948 "2020-09-30T12:45:33Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![tmishima](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/t/da6949/32.png) [@tmishima](https://discourse.cmake.org/u/tmishima)
#### Post date: [September 30, 2020, 12:45pm UTC](https://discourse.cmake.org/t/bug-report-cmake-3-18-findmpi-cant-find-ms-mpi/1948/1 "2020-09-30T12:45:33Z")

</div>

Hi folks,

I’m not sure if this is the right place to submit a bug report (if not, please tell me where it is).

The CMake 3.18 findMPI on Windows 10 can’t find MS-MPI for Fortran. After some investigations, I found that this patch fixed the problem:

```auto
FindMPI.cmake	Thu Aug 20 08:20:32 2020
FindMPI.cmake-p1	Wed Sep 30 11:10:26 2020
***************
 ***1091,1096****
--- 1091,1101 ----
    if(MPI_${LANG}_INCLUDE_DIRS)
      list(REMOVE_DUPLICATES MPI_${LANG}_INCLUDE_DIRS)
    endif()
+ if(MPI_${LANG}_ADDITIONAL_INCLUDE_VARS)
+ foreach(MPI_ADDITIONAL_INC_DIR IN LISTS MPI_${LANG}_ADDITIONAL_INCLUDE_VARS)
+ list(APPEND MPI_${LANG}_INCLUDE_DIRS "${MPI_${MPI_ADDITIONAL_INC_DIR}_INCLUDE_DIR}")
+ endforeach()
+ endif()
  endmacro()
  
  macro(_MPI_split_include_dirs LANG)

```

regards,  
Tetsuya Mishima

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [September 30, 2020, 1:39pm UTC](https://discourse.cmake.org/t/bug-report-cmake-3-18-findmpi-cant-find-ms-mpi/1948/2 "2020-09-30T13:39:44Z")

</div>

Thanks. We do have a dedicated issue tracker [here](https://gitlab.kitware.com/cmake/cmake/-/issues), but it’s always fine to ask about problems here on the discourse forum first. In this case, please go ahead and open an issue titled “FindMPI: Cannot find MS-MPI for Fortran”.

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [October 1, 2020, 12:21pm UTC](https://discourse.cmake.org/t/bug-report-cmake-3-18-findmpi-cant-find-ms-mpi/1948/3 "2020-10-01T12:21:52Z")

</div>

I see [CMake Issue 21257](https://gitlab.kitware.com/cmake/cmake/-/issues/21257), thanks.
