[CMake] "find_package(MPI)" overriding "set(MPIEXEC)" in CmakeList.txt

2014-01-09 Thread Pettey . Lucas
Hello,

On a Cray XE6, I am using find_package(MPI REQUIRED) in my CMakeLists.txt. It 
correctly finds all of the MPI stuff, except that it sets the MPIEXEC to the 
login node mpiexec command. I would like to override this behavior and set the 
MPIEXEC command to the "aprun" wrapper, but it is not working. I have tried 
using set(MPIEXEC "aprun") both before and after the find_package(MPI REQUIRED) 
in my CMakeLists.txt.

Thanks
Lucas

This electronic message transmission and any attachments that accompany it 
contain information from DRCĀ® (Dynamics Research Corporation) or its 
subsidiaries, or the intended recipient, which is privileged, proprietary, 
business confidential, or otherwise protected from disclosure and is the 
exclusive property of DRC and/or the intended recipient. The information in 
this email is solely intended for the use of the individual or entity that is 
the intended recipient. If you are not the intended recipient, any use, 
dissemination, distribution, retention, or copying of this communication, 
attachments, or substance is prohibited. If you have received this electronic 
transmission in error, please immediately reply to the author via email that 
you received the message by mistake and also promptly and permanently delete 
this message and all copies of this email and any attachments. We thank you for 
your assistance and apologize for any inconvenience.
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] "find_package(MPI)" overriding "set(MPIEXEC)" in CmakeList.txt

2014-01-10 Thread Yngve Inntjore Levinsen
Hi,

Did Den 09. jan. 2014 22:49, skrev Pettey . Lucas:
> Hello,
>
> On a Cray XE6, I am using find_package(MPI REQUIRED) in my CMakeLists.txt. It 
> correctly finds all of the MPI stuff, except that it sets the MPIEXEC to the 
> login node mpiexec command. I would like to override this behavior and set 
> the MPIEXEC command to the "aprun" wrapper, but it is not working. I have 
> tried using set(MPIEXEC "aprun") both before and after the find_package(MPI 
> REQUIRED) in my CMakeLists.txt.
>
> Thanks
> Lucas

Hi,

Did you try to use find_program? I think this will "override" the
find_program inside FindMPI.cmake:

find_program(MPIEXEC aprun)
find_package(MPI REQUIRED)
message("MPI exec: ${MPIEXEC}")

Cheers,
Yngve


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] "find_package(MPI)" overriding "set(MPIEXEC)" in CmakeList.txt

2014-01-10 Thread Pettey . Lucas
That did not work. It still brings up the "mpiexec" from the operating system 
rather than the "aprun" job script submission command. Curiously, manually 
changing MPIEXEC in the CCMake Advanced screen works and is preserved 
throughout the configuration and Makefile generation process.

I would really like to set up Cmake so that users don't have to change anything 
in the Advanced menu. Any other ideas are appreciated.

Thanks
Lucas

From: cmake-boun...@cmake.org [cmake-boun...@cmake.org] on behalf of Yngve 
Inntjore Levinsen [yngve.levin...@gmail.com]
Sent: Friday, January 10, 2014 5:33 AM
To: Pettey . Lucas; cmake@cmake.org
Subject: Re: [CMake] "find_package(MPI)" overriding "set(MPIEXEC)" in   
CmakeList.txt

Hi,

Did Den 09. jan. 2014 22:49, skrev Pettey . Lucas:
> Hello,
>
> On a Cray XE6, I am using find_package(MPI REQUIRED) in my CMakeLists.txt. It 
> correctly finds all of the MPI stuff, except that it sets the MPIEXEC to the 
> login node mpiexec command. I would like to override this behavior and set 
> the MPIEXEC command to the "aprun" wrapper, but it is not working. I have 
> tried using set(MPIEXEC "aprun") both before and after the find_package(MPI 
> REQUIRED) in my CMakeLists.txt.
>
> Thanks
> Lucas

Hi,

Did you try to use find_program? I think this will "override" the
find_program inside FindMPI.cmake:

find_program(MPIEXEC aprun)
find_package(MPI REQUIRED)
message("MPI exec: ${MPIEXEC}")

Cheers,
Yngve


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


This electronic message transmission and any attachments that accompany it 
contain information from DRCĀ® (Dynamics Research Corporation) or its 
subsidiaries, or the intended recipient, which is privileged, proprietary, 
business confidential, or otherwise protected from disclosure and is the 
exclusive property of DRC and/or the intended recipient. The information in 
this email is solely intended for the use of the individual or entity that is 
the intended recipient. If you are not the intended recipient, any use, 
dissemination, distribution, retention, or copying of this communication, 
attachments, or substance is prohibited. If you have received this electronic 
transmission in error, please immediately reply to the author via email that 
you received the message by mistake and also promptly and permanently delete 
this message and all copies of this email and any attachments. We thank you for 
your assistance and apologize for any inconvenience.
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] "find_package(MPI)" overriding "set(MPIEXEC)" in CmakeList.txt

2014-01-12 Thread Yngve Inntjore Levinsen
Hi,

So, that means aprun is not in your path? In that case you could try the
same, but give the path where cmake can find aprun:

find_program(MPIEXEC aprun PATHS /path/to/aprun)

(see cmake --help-command find_program for more info)

I tried the same myself (not with aprun but another binary), and it
worked as expected here. Since MPIEXEC is already found, the next
find_program call inside FindMPI.cmake does not search again but use the
binary found (as I understand it).

Cheers,
Yngve

Den 10. jan. 2014 19:11, skrev Pettey . Lucas:
> That did not work. It still brings up the "mpiexec" from the operating system 
> rather than the "aprun" job script submission command. Curiously, manually 
> changing MPIEXEC in the CCMake Advanced screen works and is preserved 
> throughout the configuration and Makefile generation process.
>
> I would really like to set up Cmake so that users don't have to change 
> anything in the Advanced menu. Any other ideas are appreciated.
>
> Thanks
> Lucas
> 
> From: cmake-boun...@cmake.org [cmake-boun...@cmake.org] on behalf of Yngve 
> Inntjore Levinsen [yngve.levin...@gmail.com]
> Sent: Friday, January 10, 2014 5:33 AM
> To: Pettey . Lucas; cmake@cmake.org
> Subject: Re: [CMake] "find_package(MPI)" overriding "set(MPIEXEC)" in   
> CmakeList.txt
>
> Hi,
>
> Did Den 09. jan. 2014 22:49, skrev Pettey . Lucas:
>> Hello,
>>
>> On a Cray XE6, I am using find_package(MPI REQUIRED) in my CMakeLists.txt. 
>> It correctly finds all of the MPI stuff, except that it sets the MPIEXEC to 
>> the login node mpiexec command. I would like to override this behavior and 
>> set the MPIEXEC command to the "aprun" wrapper, but it is not working. I 
>> have tried using set(MPIEXEC "aprun") both before and after the 
>> find_package(MPI REQUIRED) in my CMakeLists.txt.
>>
>> Thanks
>> Lucas
> Hi,
>
> Did you try to use find_program? I think this will "override" the
> find_program inside FindMPI.cmake:
>
> find_program(MPIEXEC aprun)
> find_package(MPI REQUIRED)
> message("MPI exec: ${MPIEXEC}")
>
> Cheers,
> Yngve
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake