[CMake] FindMPI troubles on macOS w/ small reproducer

2018-10-29 Thread Zaak Beekman
Hi All, It seems to me that there is a bug in FindMPI in the latest CMake and/or in the Travis-CI macOS (`osx`) environment. Has anyone had success testing with the latest CMake a C & Fortran application that requires MPI on Travis-CI osx nodes? (Ideally using GNU compilers all the way.) If you co

[CMake] FindMPI and version

2018-07-12 Thread Clune, Thomas L. (GSFC-6101)
It appears that MPI__VERSION is returning the version of the MPI _standard_ that is supported by the chosen MPI. While I am sure this is useful in some contexts, it’s actually not what I want/need for my project and it is quite inconsistent with analogous versions such as CMAKE__COMPILER_VERS

Re: [CMake] FindMPI & policy CMP0004

2018-03-12 Thread Andreas Naumann
Thank you for the hint, and I run in a similiar problem. Building from scratch solved the issue. Sorry for the noise. Am 11.03.2018 um 23:07 schrieb Craig Scott: This could be a case of needing to clear out an old CMake cache. That problem you mentioned was supposed to have been fixed already.

Re: [CMake] FindMPI & policy CMP0004

2018-03-11 Thread Craig Scott
This could be a case of needing to clear out an old CMake cache. That problem you mentioned was supposed to have been fixed already. You can find the updated discussion of the Mantis issue you linked to in gitlab here where someone else had a si

[CMake] FindMPI & policy CMP0004

2018-03-11 Thread Andreas Naumann
Dear all, recently, I got a problem with FindMPI on our HPC systems. With cmake 3.10.2, I get an error about policy CMP0004. And I cannot set it to OLD anymore. Is this intended? Exactly the same error, together with a patch, is described in the bugtracker https://public.kitware.com/Bug/view

Re: [CMake] FindMPI

2016-12-01 Thread Chuck Atkins
> why does it not interrogate the MPI wrapper if set as FC or CC? > CC, CXX, and FC env vars are just used to initialize the CMAKE_{C,CXX,Fortran}_COMPILER variables wihch CMake will then use as the "regular" compilers for a given language. If those regular compilers already work with MPI then th

Re: [CMake] FindMPI

2016-12-01 Thread Zaak Beekman
On Thu, Dec 1, 2016 at 2:02 PM Chuck Atkins wrote: > > I think the logic is a bit backwards on this and if you were to make a > change, I'd suggest it be there and re-order a few things such that if MPI > things haven't been already explicitly set then the *first* thing to do > (rather than last)

Re: [CMake] FindMPI

2016-12-01 Thread Chuck Atkins
> > As far as enhancements to FindMPI go, It might be worthwhile to check if > FC, CC,CXX match any obvious MPI wrappers, and then set MPI__compiler > and select the MPI version from there: If the user set the compiler > explicitly to an MPI wrapper, that's likely the MPI they intend to use > I

Re: [CMake] FindMPI

2016-11-30 Thread Zaak Beekman
OK, upon more careful reading of the documentation for FindMPI, and realizing that I am using CMake 3.6 not 3.7 I have adjusted my approach to be consistent with the documentation and your suggestions. I don't know if the documentation actually needs expanding upon... I think I just failed to full

Re: [CMake] FindMPI

2016-11-28 Thread Chuck Atkins
Hi Zaak, Sorry for the first mail being so abrupt, I didn't mean to hit "send" so soon. > I took a look at the FindMPI CMake module, and it seems as though you can > set MPI_HOME to a list of directories to search. > That's also another way of doing it, which would probably be easier than what

Re: [CMake] FindMPI

2016-11-28 Thread Zaak Beekman
Thanks for the additional pointers Chuck! I am aware that it is preferred practice to pass the actual compilers rather than the wrappers as FC etc. but per Brad's advice I think Damian had setup the OpenCoarrays CMake build system to accept FC=mpif90 etc. and I'm in the process of migrating to the

Re: [CMake] FindMPI

2016-11-28 Thread Chuck Atkins
Hi Zaak, When using CMake, it's generally best to use the actual compiler rather than any compiler wrappers (with Cray being the exception). Given that, set the CC, CXX, and FC environment variables to the actual compilers you want to use and then the MPI_{C,CXX,Fortan}_COMPILER CMake variables t

Re: [CMake] FindMPI

2016-11-28 Thread Chuck Atkins
Pass the following CMake options at configure time: -DMPI_C_COMPILER=/path/to/mpicc -DMPI_CXX_COMPILER=/path/to/mpiCC -DMPI_Fortran_COMPILER=/path/to/mpif90 -- Chuck Atkins Staff R&D Engineer, Scientific Computing Kitware, Inc. On Wed, Nov 23, 2016 at 6:05 PM, Zaak Beekman wrote: > Hi

Re: [CMake] FindMPI

2016-11-28 Thread Zaak Beekman
Chuck, thanks for the response! The issue with your technique is that I don't want to put the burden on the users... I took a look at the FindMPI CMake module, and it seems as though you can set MPI_HOME to a list of directories to search. Would KitWare accept a pull request or a patch that expa

[CMake] FindMPI

2016-11-23 Thread Zaak Beekman
Hi, I want to be able to pass FC=mpif90 (or FC=$(which mpif90)) and CC=mpicc etc. OR also be able to pass a compiler and use FindMPI to add link, compile and include flags. I'm encountering an issue when my MPI implementation is not on my PATH, I want CMake to be able to look in an additional loca

[CMake] FindMPI prefer mpirun over mpiexec

2016-02-12 Thread Jack Stalnaker
Hi, Is there a way to make FindMPI prefer the name 'mpirun' over 'mpiexec'? They have different meanings to Intel's MPI. By default, FindMPI locates mpiexec, which runs the MPD based MPI. I'd rather use mpirun. FindMPI knows mpirun, but in FindMPI.cmake, it looks like mpirun is searched after mpie

Re: [CMake] FindMPI uses wrong fortran include path

2016-02-10 Thread Daniel Wirtz
Hey, at a rough read i think i had the same sort of issue. For us, the FindMPI detected "MPI_Fortran_INCLUDE_PATH" correctly - however, what did matter in our case was the order those paths have been used in CMake. as example: target_include_directories(yourtarget ${MPI_C_INCLUDE_PATH} ${MPI_

Re: [CMake] FindMPI uses wrong fortran include path

2016-02-10 Thread Jack Stalnaker
This seems to be the same issue discussed here: https://cmake.org/pipermail/cmake-developers/2014-December/023831.html which refers to a bug marked fixed here: http://www.cmake.org/Bug/view.php?id=15182 However, I'm still getting the issue in 3.5.0-rc1 On Wed, Feb 10, 2016 at 12:24 PM, Jack

[CMake] FindMPI uses wrong fortran include path

2016-02-10 Thread Jack Stalnaker
Hi, 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 compil

Re: [CMake] FindMPI

2015-09-11 Thread Alain Miniussi
On 11/09/2015 10:53, Nico Schlömer wrote: Hi everyone, I see from the CMake docs [1] that the recommended way for using MPI is to call `find_package(MPI)` and set the linker and include flags appropriately. On the other hand, I see from the OpenMPI specs [2] that > The Open MPI team *strong

Re: [CMake] FindMPI

2015-09-11 Thread Raymond Wan
Hi Nico, On Fri, Sep 11, 2015 at 4:53 PM, Nico Schlömer wrote: > I see from the CMake docs [1] that the recommended way for using MPI is to > call `find_package(MPI)` and set the linker and include flags appropriately. > On the other hand, I see from the OpenMPI specs [2] that > >> > > The Open

[CMake] FindMPI

2015-09-11 Thread Nico Schlömer
Hi everyone, I see from the CMake docs [1] that the recommended way for using MPI is to call `find_package(MPI)` and set the linker and include flags appropriately. On the other hand, I see from the OpenMPI specs [2] that > The Open MPI team *strongly* recommends that you simply use Open MPI's

[CMake] FindMPI not looking in /usr?

2014-01-03 Thread Pettey . Lucas
Hello, I am running CMake 2.8.12 on a Mac OSX 10.8. The FindMPI.cmake module doesn't appear to accept that the mli libraries are in the /usr/lib directory. I get the error message pasted below. It would seem that mlicc --showme yields "gcc -lmpi -lm". The module then tries to find the libraries

[CMake] FindMPI - Intel MPI on Windows

2012-04-18 Thread Michel Lestrade
The FindMPI module does not seem to work on Windows with the Intel MPI libraries. I am trying (unsuccessfully) to compile parmetis and since I am new to CMake, I tried to reduce the problem I am experiencing to the simplest possible example (attached). I have the latest (12.1) Intel Compiler i

Re: [CMake] FindMPI doesn't differentiate between languages

2010-12-26 Thread Todd Gamblin
Thanks for the suggestions, everyone. I'm finally taking a look at fixing FindMPI. So far, I've added a couple extra interrogations to look for -compile-info and -link-info on newer versions of mvapich, and I'm finally getting around to figuring out what variables need to be set. I intend to

Re: [CMake] FindMPI doesn't differentiate between languages

2010-12-20 Thread Marcel Loose
>>> On 19-12-2010 at 0:04, in message , Todd Gamblin wrote: > Hey all, > > This has been brought up before (sort of) here: > > http://thread.gmane.org/gmane.comp.programming.tools.cmake.user/26533 > > FindMPI doesn't currently give you the libraries, includes, etc. for > different lan

Re: [CMake] FindMPI doesn't differentiate between languages

2010-12-19 Thread Dave Partyka
Hi Todd, I have had similar thoughts about this module as well, especially for providing variables with each of MPI_{C/CXX/FORTRAN}_LIBRARIES but often the easy way around this is to set CC/CXX/FC environment variables to their respective mpi compilers before ever running cmake and generally got m

[CMake] FindMPI doesn't differentiate between languages

2010-12-18 Thread Todd Gamblin
Hey all, This has been brought up before (sort of) here: http://thread.gmane.org/gmane.comp.programming.tools.cmake.user/26533 FindMPI doesn't currently give you the libraries, includes, etc. for different languages. MPI compilers can (and typically do) have different includes/librarie

Re: [CMake] FindMPI: finding openmpi libs and includes

2010-12-01 Thread Hicham Mouline
ir}/${MpiPackageDir}") endif() endforeach(MpiPackageDir) endforeach(SystemPrefixDir) From: Dave Partyka [mailto:dave.part...@kitware.com] Sent: 30 November 2010 22:42 To: Hicham Mouline Cc: CMake mailing list Subject: Re: [CMake] FindMPI: finding openmpi libs and includes It will sea

Re: [CMake] FindMPI: finding openmpi libs and includes

2010-12-01 Thread Hicham Mouline
same time as the index of the iteration? From: Dave Partyka [mailto:dave.part...@kitware.com] Sent: 30 November 2010 22:42 To: Hicham Mouline Cc: CMake mailing list Subject: Re: [CMake] FindMPI: finding openmpi libs and includes It will search standard locations (/usr/include & /

Re: [CMake] FindMPI: finding openmpi libs and includes

2010-11-30 Thread Dave Partyka
It will search standard locations (/usr/include & /usr/lib) for the headers and libs. Set MPI_LIBRARY and MPI_INCLUDE_PATH if it doesn't locate them for you automatically. The FindMPI module does interrogate the mpicc compiler for some of this information but I am not sure if that is the case on Wi

[CMake] FindMPI: finding openmpi libs and includes

2010-11-30 Thread Hicham Mouline
Hi, I have built debug and release win32 and x64 openmpi libs for windows, and I have them installed on linux x64. How does FindMPI work for auto detecting If I don't set any MPI_ variable at all? Does it search for mpic++ in the %PATH% or $PATH? What MPI_ variables is the user required to defi

Re: [CMake] FindMPI for BlueGene/P

2010-06-25 Thread James Amundson
On 06/25/2010 01:40 PM, Brad King wrote: James Amundson wrote: This bug is a favorite of mine. It has been reported on the mailing list before. It is also in the bug tracker: http://public.kitware.com/Bug/view.php?id=10312&nbn=1#bugnotes In each case a patch has been given to solve the pro

Re: [CMake] FindMPI for BlueGene/P (was: Better BlueGene/P and cross-compile support for CMake)

2010-06-25 Thread Brad King
James Amundson wrote: > This bug is a favorite of mine. It has been reported on the mailing list > before. It is also in the bug tracker: > > http://public.kitware.com/Bug/view.php?id=10312&nbn=1#bugnotes > > In each case a patch has been given to solve the problem. Nothing has > happened, howeve

Re: [CMake] FindMPI and setting C/C++ compiler

2010-05-27 Thread Marcel Loose
OK, thanks. I noted one issue with the current FindMPI, though. I'm using MPICH, and upon inspection of the mpicc and mpicxx scripts, I noticed that these scripts also set a lot of -f options for GCC. These settings are not picked up by FindMPI, as it does not search for compile flags that start w

Re: [CMake] FindMPI and setting C/C++ compiler

2010-05-26 Thread Michael Wild
Well, the MPI_COMPILER variable is certainly used internally by FindMPI to detect all the stuff. And to use MPI_LINK_FLAGS, just set them as the target property LINK_FLAGS. Michael On 26. May, 2010, at 18:15 , Marcel Loose wrote: > True, but that raises (at least) two questions: > > 1) What

Re: [CMake] FindMPI and setting C/C++ compiler

2010-05-26 Thread Marcel Loose
True, but that raises (at least) two questions: 1) What's the use of the variable MPI_COMPILER if it cannot be used to set the C/C++ compiler. 2) I know how to handle MPI_COMPILE_FLAGS - use add_definitions(); MPI_INCLUDE_PATH - use include_directories(); MPI_LIBRARIES - use target_link_libraries

Re: [CMake] FindMPI and setting C/C++ compiler

2010-05-26 Thread Marcel Loose
Yeah, I know that works. But if that's the "proper" solution, then what's the use of FindMPI anyways? Regards, Marcel Loose. On Wed, 2010-05-26 at 11:53 -0400, Dave Partyka wrote: > The way I have accomplished this is to: > > > export CC=mpicc > export CXX=mpicxx > > > blow away your build t

Re: [CMake] FindMPI and setting C/C++ compiler

2010-05-26 Thread Dave Partyka
The way I have accomplished this is to: export CC=mpicc export CXX=mpicxx blow away your build tree and then re-configure re-generate On Wed, May 26, 2010 at 11:38 AM, Michael Wild wrote: > > On 26. May, 2010, at 17:20 , Marcel Loose wrote: > > > Hi all, > > > > I was wondering how one should

Re: [CMake] FindMPI and setting C/C++ compiler

2010-05-26 Thread Michael Wild
On 26. May, 2010, at 17:20 , Marcel Loose wrote: > Hi all, > > I was wondering how one should use find_package(MPI) to properly set the > C/C++ compiler(s). Normally, you call find_package() after the project() > command. However, by that time the CMAKE__COMPILER cache variables > have already b

[CMake] FindMPI and setting C/C++ compiler

2010-05-26 Thread Marcel Loose
Hi all, I was wondering how one should use find_package(MPI) to properly set the C/C++ compiler(s). Normally, you call find_package() after the project() command. However, by that time the CMAKE__COMPILER cache variables have already been set. Should one FORCE these cache variables to the value of