<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hey,<br>
    <br>
    at a rough read i think i had the same sort of issue.<br>
    For us, the FindMPI detected "MPI_Fortran_INCLUDE_PATH" correctly -
    however, what did matter in our case<br>
    was the order those paths have been used in CMake.<br>
    <br>
    as example:<br>
    target_include_directories(yourtarget ${MPI_C_INCLUDE_PATH}
    ${MPI_Fortran_INCLUDE_PATH})<br>
    instead of<br>
    target_include_directories(yourtarget ${MPI_Fortran_INCLUDE_PATH}
    ${MPI_C_INCLUDE_PATH})<br>
    makes all the difference in our case.<br>
    so check if there are maybe even dependent libraries that have the
    C/CXX include path set first etc.<br>
    <br>
    maybe this helps :-)<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 11.02.2016 09:19, Jack Stalnaker
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAOGUJ6EfegHMAM94FghKK7oVo5X+pkStryhfPKmFenVHf7W9Nw@mail.gmail.com"
      type="cite">
      <div dir="ltr">This seems to be the same issue discussed here:
        <div><a moz-do-not-send="true"
href="https://cmake.org/pipermail/cmake-developers/2014-December/023831.html">https://cmake.org/pipermail/cmake-developers/2014-December/023831.html</a><br>
        </div>
        <div><br>
        </div>
        <div>which refers to a bug marked fixed here:</div>
        <div>
          <pre style="white-space:pre-wrap;color:rgb(0,0,0)"><a moz-do-not-send="true" href="http://www.cmake.org/Bug/view.php?id=15182">http://www.cmake.org/Bug/view.php?id=15182</a></pre>
          <pre style="white-space:pre-wrap;color:rgb(0,0,0)">
</pre>
          <pre style="white-space:pre-wrap;color:rgb(0,0,0)">However, I'm still getting the issue in 3.5.0-rc1</pre>
          <pre style="white-space:pre-wrap;color:rgb(0,0,0)">
</pre>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Wed, Feb 10, 2016 at 12:24 PM, Jack
          Stalnaker <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:omnijack@gmail.com" target="_blank">omnijack@gmail.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">Hi,
              <div><br>
              </div>
              <div>If I call FindMPI, it successfully finds Intel MPI,
                including all the proper include paths etc. However,
                when I compile MPI code, I get an error message saying
                that the mod file (called by "use mpi" in the code) was
                not compiled by this compiler. The problem appears to be
                that the Intel compiler suite installed both gfortran
                and ifort versions of the mod files in different include
                directories like this:</div>
              <div><br>
              </div>
              <div>INTELROOT/</div>
              <div>    linux/mpi/intel64/include/gfortran/mpi.mod</div>
              <div>    linux/mpi/intel64/include/mpi.mod</div>
              <div><br>
              </div>
              <div>where the first mod is the gfortran mod, and the
                second is the intel mod. Following the call to
                FindMPI(), the variable MPI_Fortran_INCLUDE_PATH
                contains both, with the gfortran directory first. If I
                do this: </div>
              <div><br>
              </div>
              <div>include_directories(${MPI_Fortran_INCLUDE_PATH})</div>
              <div><br>
              </div>
              <div>I get the failure I mentioned, presumably because the
                compiler tries to use the gfortran mod first. </div>
              <div><br>
              </div>
              <div>So is there a way to tell the build system to ignore
                the gfortran mod? I cannot assume that the order or
                contents of MPI_Fortran_INCLUDE_PATH. </div>
              <div><br>
              </div>
              <div>Thanks</div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Dr. Daniel Wirtz
Dipl. Math. Dipl. Inf. 
SRC SimTech
Pfaffenwaldring 5a, D-70569 Stuttgart
+49 (711) 685-60044</pre>
  </body>
</html>