Hi,
I have a very simple Hello world program that compiles with mpic++. I
also have the following CMakeLists.txt file:
cmake_minimum_required(VERSION 2.8)
project(Hello_world)
add_executable(hello.e main.cpp)
# Require MPI for this project:
find_package(MPI REQUIRED)
include_directories(MPI_INCLUDE_PATH)set(CMAKE_CXX_COMPILE_FLAGS
${CMAKE_CXX_COMPILE_FLAGS}
${MPI_COMPILE_FLAGS})set(CMAKE_CXX_LINK_FLAGS ${CMAKE_CXX_LINK_FLAGS}
${MPI_LINK_FLAGS})
target_link_libraries(hello.e ${MPI_LIBRARIES}
This cmake file works perfectly on Linux, but not on Mac OS X Mavericks. On
Mavericks I get: mpi.h not found error.
Here is the output of cmake . showing that it found the openmpi:
-- The C compiler identification is AppleClang 5.1.0.5030040-- The CXX
compiler identification is AppleClang 5.1.0.5030040-- Check for
working C compiler: /usr/bin/cc-- Check for working C compiler:
/usr/bin/cc -- works-- Detecting C compiler ABI info-- Detecting C
compiler ABI info - done-- Check for working CXX compiler:
/usr/bin/c++-- Check for working CXX compiler: /usr/bin/c++ -- works--
Detecting CXX compiler ABI info-- Detecting CXX compiler ABI info -
done-- Found MPI_C: /opt/local/lib/openmpi-devel-mp/libmpi.dylib --
Found MPI_CXX: /opt/local/lib/openmpi-devel-mp/libmpi.dylib --
Configuring done-- Generating done-- Build files have been written to:
/Users/sleepyhead/work/MPI_TEST
What am I doing wrong?
Cheers,
Sergey
--
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://public.kitware.com/mailman/listinfo/cmake