[vtkusers] Advice on how to configure vtk 5.4.0 with mpich2 on OSX (with MacPorts)
Darren Weber
darren.weber.lists at gmail.com
Wed May 13 15:54:02 EDT 2009
In part answer to my own question, I found the module for FindMPI.cmake in
/opt/local/share/cmake-2.6/Modules/FindMPI.cmake
On Wed, May 13, 2009 at 12:46 PM, Darren Weber <darren.weber.lists at gmail.com
> wrote:
>
> Hi,
>
> I need help from anyone with experience and an understanding of the MPI
> build for vtk. I would really appreciate advice on how to configure vtk
> 5.4.0 with mpich2 on OSX. There appears to be an mpi installation already
> on OSX (10.5.6) that cmake picks up automatically. I also have an alternate
> installation of mpich2 provided by MacPorts (see the postscript below for
> all the details of that install). I really need advice on how to change the
> config parameters so the build will use this alternative mpich2
> installation. I can guess most of it, but a few things are not clear to me.
>
> What I can guess to change are the following, so that it will use the
> mpich2 install provided by MacPorts:
>
> -DVTK_USE_MPI:BOOL=ON
> -DMPIEXEC:FILEPATH=/opt/local/bin/mpiexec \
> -DMPIEXEC_NUMPROC_FLAG:STRING=-np \
> -DMPIEXEC_MAX_NUMPROCS:STRING=${nCPU} \
> -DMPIEXEC_PREFLAGS:STRING= \
> -DMPIEXEC_POSTFLAGS:STRING= \
> -DMPI_COMPILER:FILEPATH=/opt/local/bin/mpicxx \
> -DMPI_INCLUDE_PATH:STRING=/opt/local/include/mpich2 \
> -DMPI_LIBRARY:FILEPATH=/opt/local/lib/libmpichcxx.dylib
>
> How are following variables set?
>
> #// MPI compilation flags (automatically determined from MPI_COMPILER)
> #MPI_COMPILE_FLAGS:STRING=-D_REENTRANT
>
> #// Extra MPI libraries to link against
>
> #MPI_EXTRA_LIBRARY:STRING=/usr/lib/libmpi.dylib;/usr/lib/libopen-rte.dylib;/usr/lib/libopen-pal.dylib;/usr/lib/libutil.dylib
>
> #// MPI linking flags
> #MPI_LINK_FLAGS:STRING=-Wl,-u,_munmap -Wl,-multiply_defined,suppress
>
>
> What follows is a list of all the config variable settings that are
> automatically determined by cmake 2.6.4, with VTK_USE_MPI turned on in the
> command line call to cmake (the result is a mixture of the Apple OSX mpi
> install and the mpich2 install from MacPorts, which is all under the
> /opt/local prefix -- see postscript below for details). What I don't
> understand is how cmake sets these variables (is there a macro for this?).
> In particular, I need to understand how it sets the MPI_EXTRA_LIBRARY and
> other compiler and link flags. I also need to understand the
> relationship(s) between the MPI* and the VTK_MPI* configuration variables.
>
> ##### BEGIN cmake auto config variables for MPI
>
> // Executable for running MPI programs.
> MPIEXEC:FILEPATH=/opt/local/bin/mpiexec
>
> // Maximum number of processors available to run MPI applications.
> MPIEXEC_MAX_NUMPROCS:STRING=2
>
> // Flag used by MPI to specify the number of processes for MPIEXEC; the
> next option will be the number of processes.
> MPIEXEC_NUMPROC_FLAG:STRING=-np
>
> // These flags will come after all flags given to MPIEXEC.
> MPIEXEC_POSTFLAGS:STRING=
>
> // These flags will be directly before the executable that is being run by
> MPIEXEC.
> MPIEXEC_PREFLAGS:STRING=
>
> // MPI compiler. Used only to detect MPI compilation flags.
> MPI_COMPILER:FILEPATH=/usr/bin/mpic++
>
> // MPI compilation flags
> MPI_COMPILE_FLAGS:STRING=-D_REENTRANT
>
> // Extra MPI libraries to link against
>
> MPI_EXTRA_LIBRARY:STRING=/usr/lib/libmpi.dylib;/usr/lib/libopen-rte.dylib;/usr/lib/libopen-pal.dylib;/usr/lib/libutil.dylib
>
> // MPI include path
> MPI_INCLUDE_PATH:STRING=/usr/include
>
> // MPI library to link against
> MPI_LIBRARY:FILEPATH=/usr/lib/libmpi_cxx.dylib
>
> // MPI linking flags
> MPI_LINK_FLAGS:STRING=-Wl,-u,_munmap -Wl,-multiply_defined,suppress
>
> ##### END cmake auto config variables for MPI*
>
> ##### BEGIN cmake auto config variables for VTK_MPI*
>
> // Path to a program.
> VTK_MPIRUN_EXE:FILEPATH=/opt/local/bin/mpirun
>
> // Maximum number of processors available to run parallel applications.
> (see
> /opt/local/var/macports/build/_Users_dweber_ports_graphics_vtk-devel/work/vtk-5.4/CMakeLists.txt
> for more info.)
> VTK_MPI_MAX_NUMPROCS:STRING=2
>
> // Flag used by mpi to specify the number of processes, the next option
> will be the number of processes. (see
> /opt/local/var/macports/build/_Users_dweber_ports_graphics_vtk-devel/work/vtk-5.4/CMakeLists.txt
> for more info.)
> VTK_MPI_NUMPROC_FLAG:STRING=-np
>
> // These flags will come after all flags given to MPIRun.(see
> /opt/local/var/macports/build/_Users_dweber_ports_graphics_vtk-devel/work/vtk-5.4/CMakeLists.txt
> for more info.)
> VTK_MPI_POSTFLAGS:STRING=
>
> // These flags will be directly before the executable that is being run by
> VTK_MPIRUN_EXE. (see
> /opt/local/var/macports/build/_Users_dweber_ports_graphics_vtk-devel/work/vtk-5.4/CMakeLists.txt
> for more info.)
> VTK_MPI_PREFLAGS:STRING=
>
> // These flags will be directly before the number of processess flag (see
> /opt/local/var/macports/build/_Users_dweber_ports_graphics_vtk-devel/work/vtk-5.4/CMakeLists.txt
> for more info.)
> VTK_MPI_PRENUMPROC_FLAGS:STRING=
>
> ##### END cmake auto config variables for VTK_MPI*
>
>
>
>
> Thanks in advance,
> Darren
>
>
> PS, this is a content listing for the mpich2 install from MacPorts
> (currently mpich2 @1.0.8):
>
> Port mpich2 contains:
> /opt/local/bin/check_callstack
> /opt/local/bin/clog2_join
> /opt/local/bin/clog2_print
> /opt/local/bin/clog2_repair
> /opt/local/bin/clog2print
> /opt/local/bin/clog2TOslog2
> /opt/local/bin/clogprint
> /opt/local/bin/clogTOslog2
> /opt/local/bin/jumpshot
> /opt/local/bin/logconvertor
> /opt/local/bin/mpd
> /opt/local/bin/mpd.py
> /opt/local/bin/mpdallexit
> /opt/local/bin/mpdallexit.py
> /opt/local/bin/mpdboot
> /opt/local/bin/mpdboot.py
> /opt/local/bin/mpdcheck
> /opt/local/bin/mpdcheck.py
> /opt/local/bin/mpdchkpyver.py
> /opt/local/bin/mpdcleanup
> /opt/local/bin/mpdcleanup.py
> /opt/local/bin/mpdexit
> /opt/local/bin/mpdexit.py
> /opt/local/bin/mpdgdbdrv.py
> /opt/local/bin/mpdhelp
> /opt/local/bin/mpdhelp.py
> /opt/local/bin/mpdkilljob
> /opt/local/bin/mpdkilljob.py
> /opt/local/bin/mpdlib.py
> /opt/local/bin/mpdlistjobs
> /opt/local/bin/mpdlistjobs.py
> /opt/local/bin/mpdman.py
> /opt/local/bin/mpdringtest
> /opt/local/bin/mpdringtest.py
> /opt/local/bin/mpdroot
> /opt/local/bin/mpdrun
> /opt/local/bin/mpdrun.py
> /opt/local/bin/mpdsigjob
> /opt/local/bin/mpdsigjob.py
> /opt/local/bin/mpdtrace
> /opt/local/bin/mpdtrace.py
> /opt/local/bin/mpecc.in
> /opt/local/bin/mpefc.in
> /opt/local/bin/mpicc
> /opt/local/bin/mpich2version
> /opt/local/bin/mpicxx
> /opt/local/bin/mpiexec
> /opt/local/bin/mpiexec.py
> /opt/local/bin/mpirun
> /opt/local/bin/mpirun.py
> /opt/local/bin/parkill
> /opt/local/bin/rlog_check_timeorder
> /opt/local/bin/rlog_print
> /opt/local/bin/rlogprint
> /opt/local/bin/rlogTOslog2
> /opt/local/bin/slog2filter
> /opt/local/bin/slog2navigator
> /opt/local/bin/slog2print
> /opt/local/bin/slog2updater
> /opt/local/bin/traceprint.in
> /opt/local/bin/traceTOslog2.in
> /opt/local/etc/mpe_callstack_ldflags.conf
> /opt/local/etc/mpe_f77env.conf
> /opt/local/etc/mpe_f77env.conf.in
> /opt/local/etc/mpe_graphics.conf
> /opt/local/etc/mpe_help.conf
> /opt/local/etc/mpe_help.conf.in
> /opt/local/etc/mpe_log.conf
> /opt/local/etc/mpe_log_postlib.conf
> /opt/local/etc/mpe_mpianim.conf
> /opt/local/etc/mpe_mpicheck.conf
> /opt/local/etc/mpe_mpilog.conf
> /opt/local/etc/mpe_mpitrace.conf
> /opt/local/etc/mpe_nolog.conf
> /opt/local/etc/mpicc.conf
> /opt/local/etc/mpicxx.conf
> /opt/local/etc/mpixxx_opts.conf
> /opt/local/include/mpich2/clog_commset.h
> /opt/local/include/mpich2/clog_const.h
> /opt/local/include/mpich2/clog_inttypes.h
> /opt/local/include/mpich2/clog_uuid.h
> /opt/local/include/mpich2/mpe.h
> /opt/local/include/mpich2/mpe_callstack.h
> /opt/local/include/mpich2/mpe_graphics.h
> /opt/local/include/mpich2/mpe_graphicsf.h
> /opt/local/include/mpich2/mpe_log.h
> /opt/local/include/mpich2/mpe_log_thread.h
> /opt/local/include/mpich2/mpe_logf.h
> /opt/local/include/mpich2/mpe_misc.h
> /opt/local/include/mpich2/mpe_thread.h
> /opt/local/include/mpich2/mpi.h
> /opt/local/include/mpich2/mpicxx.h
> /opt/local/include/mpich2/mpio.h
> /opt/local/include/mpich2/mpiof.h
> /opt/local/lib/clog2print.jar
> /opt/local/lib/clog2TOdrawable.jar
> /opt/local/lib/clog2TOslog2.jar
> /opt/local/lib/clogprint.jar
> /opt/local/lib/clogTOdrawable.jar
> /opt/local/lib/clogTOslog2.jar
> /opt/local/lib/jumpshot.jar
> /opt/local/lib/jumpshot_launcher.jar
> /opt/local/lib/libampe.a
> /opt/local/lib/liblmpe.a
> /opt/local/lib/libmpe.a
> /opt/local/lib/libmpe_collchk.a
> /opt/local/lib/libmpe_nompi.a
> /opt/local/lib/libmpe_nompi_null.a
> /opt/local/lib/libmpe_null.a
> /opt/local/lib/libmpich.1.1.dylib
> /opt/local/lib/libmpich.1.dylib
> /opt/local/lib/libmpich.a
> /opt/local/lib/libmpich.dylib
> /opt/local/lib/libmpichcxx.1.1.dylib
> /opt/local/lib/libmpichcxx.1.dylib
> /opt/local/lib/libmpichcxx.a
> /opt/local/lib/libmpichcxx.dylib
> /opt/local/lib/libpmpich.1.1.dylib
> /opt/local/lib/libpmpich.1.dylib
> /opt/local/lib/libpmpich.a
> /opt/local/lib/libpmpich.dylib
> /opt/local/lib/libtmpe.a
> /opt/local/lib/logconvertor.jar
> /opt/local/lib/mpe_prof.o
> /opt/local/lib/pkgconfig/mpich2-ch3.pc
> /opt/local/lib/slog2filter.jar
> /opt/local/lib/slog2navigator.jar
> /opt/local/lib/slog2printrecur.jar
> /opt/local/lib/slog2printserial.jar
> /opt/local/lib/slog2update205to206.jar
> /opt/local/lib/trace_rlog/libTraceInput.jnilib
> /opt/local/lib/trace_rlog/libTraceInput.la
> /opt/local/lib/traceprint.jar
> /opt/local/lib/traceTOslog2.jar
> /opt/local/sbin/mpecheckinstall
> /opt/local/sbin/mpetestexec
> /opt/local/sbin/mpetestexeclog
> /opt/local/sbin/mpetestlink
> /opt/local/sbin/mpeuninstall
> ... (snipped out documentation)
>
>
>
>
> PPS, in case it makes any difference, these are all the configure options
> set for vtk 5.4.0 with cmake 2.6.4:
>
> -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.5.sdk
> -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
> -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
> -DCMAKE_INSTALL_PREFIX:PATH=/opt/local
> -DCMAKE_INCLUDE_PATH:PATH=/opt/local/include
> -DCMAKE_LIBRARY_PATH:PATH=/opt/local/lib
> -DCMAKE_INSTALL_NAME_DIR:STRING=/opt/local/lib/vtk-5.4
> -DBUILD_DOCUMENTATION:BOOL=OFF
> -DVTK_DEBUG_LEAKS:BOOL=ON
> -DVTK_USE_CARBON:BOOL=OFF
> -DVTK_USE_X:BOOL=OFF
> -DVTK_USE_HYBRID:BOOL=ON
> -DVTK_USE_GUISUPPORT:BOOL=ON
> -DVTK_USE_INFOVIS:BOOL=ON
> -DVTK_USE_PARALLEL:BOOL=ON
> -DVTK_USE_RENDERING:BOOL=ON
> -DVTK_USE_VIEWS:BOOL=ON
> -DVTK_USE_GL2PS:BOOL=ON
> -DVTK_USE_N_WAY_ARRAYS:BOOL=ON
> -DVTK_REQUIRED_OBJCXX_FLAGS="-fobjc-gc"
> -DVTK_USE_COCOA:BOOL=ON
> -DVTK_DATA_ROOT:PATH=/opt/local/share/vtk-5.4/data
> -DBUILD_EXAMPLES:BOOL=ON
> -DBUILD_SHARED_LIBS:BOOL=ON
> -DCMAKE_SKIP_BUILD_RPATH:BOOL=OFF
> -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF
> -DCMAKE_INSTALL_RPATH:STRING=/opt/local/lib/vtk-5.4
> -DVTK_USE_RPATH:BOOL=ON
> -DBUILD_TESTING:BOOL=ON
> -DVTK_WRAP_JAVA:BOOL=ON
> -DVTK_WRAP_PYTHON:BOOL=ON
> -DVTK_NO_PYTHON_THREADS:BOOL=OFF
>
> -DPYTHON_INCLUDE_PATH:FILEPATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.6/Headers
> -DPYTHON_LIBRARY:FILEPATH=/opt/local/lib/libpython2.6.dylib
> -DPYTHON_DEBUG_LIBRARY:FILEPATH=/opt/local/lib/libpython2.6.dylib
> -DPYTHON_EXECUTABLE:FILEPATH=/opt/local/bin/python2.6
> -DVTK_PYTHON_SETUP_ARGS:STRING=--prefix=/opt/local/Library/Frameworks/Python.framework/Versions/2.6
> --root=/opt/local/var/macports/build/_Users_dweber_ports_graphics_vtk-devel/work/destroot
> -DVTK_WRAP_TCL:BOOL=ON -DTCL_TCLSH:FILEPATH=/opt/local/bin/tclsh
> -DTCL_INCLUDE_PATH:PATH=/opt/local/include
> -DTCL_LIBRARY:FILEPATH=/opt/local/lib/libtcl.dylib
> -DTK_INCLUDE_PATH:PATH=/opt/local/include
> -DTK_LIBRARY:FILEPATH=/opt/local/lib/libtk.dylib
> -DVTK_USE_ODBC:BOOL=ON
> -DODBC_INCLUDE_DIRECTORIES:PATH=/opt/local/include
> -DODBC_LIBRARY:FILEPATH=/opt/local/lib/libodbc.dylib
> -DVTK_USE_MPI:BOOL=ON
> -DVTK_USE_BOOST:BOOL=ON
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090513/22673212/attachment.htm>
More information about the vtkusers
mailing list