[mvapich-discuss] Compilation error for mvapich2-2.0.1 with disabled C++ bindings.
Jonathan Perkins
perkinjo at cse.ohio-state.edu
Tue Jan 13 17:05:20 EST 2015
On Tue, Jan 13, 2015 at 03:36:35PM -0600, Chris Green wrote:
> Hi,
>
> We are attempting to build a non-C++ mvapich2 that can be used safely by
> people writing C++ code using multiple compilers. Using the following
> configuration line on SLF6.6 (Scientific Linux Fermi -- a close derivative
> of RHEL6.6), with the OS-provided InfiniBand support and development
> libraries:
>
> ./configure --prefix=/usr/local/mvapich2-2.0.1 --enable-fast=O3,ndebug --enable-f77 --enable-fc \
> --disable-cxx --enable-romio --enable-versioning --enable-threads=runtime \
> --enable-registration-cache --enable-rsh --enable-shared --enable-static \
> --enable-yield=sched_yield --enable-rdma-cm
>
> a subsequent compilation fails attempting to compile
> src/mpi/coll/ch3_shmem_coll.c with:
>
> <snip/>
> make[2]: Entering directory `/home/greenc/work/cet-is/sources/ssi-build/mvapich-ssi-build/mvapich2-2.0.1'
> CC src/mpi/coll/ch3_shmem_coll.lo
> src/mpi/coll/ch3_shmem_coll.c: In function 'mv2_shm_zcpy_reduce':
> src/mpi/coll/ch3_shmem_coll.c:3829:33: error: 'is_cxx_uop' undeclared (first use in this function)
> datatype, is_cxx_uop);
> ^
> src/mpi/coll/ch3_shmem_coll.c:3829:33: note: each undeclared identifier is reported only once for each function it appears in
> make[2]: *** [src/mpi/coll/ch3_shmem_coll.lo] Error 1
> <snip/>
>
> The following is the minimum patch required for successful compilation:
>
> [greenc at woof] ~/work/cet-is/sources/ssi-build/mvapich-ssi-build/mvapich2-2.0.1/src/mpi/coll $ diff -bu ch3_shmem_coll.c{~,}
> --- ch3_shmem_coll.c~ 2014-10-29 13:07:22.000000000 -0500
> +++ ch3_shmem_coll.c 2015-01-13 13:33:25.406662528 -0600
> @@ -3826,7 +3826,13 @@
> /* Now, do the intra-node shm-slot reduction */
> mv2_shm_tree_reduce(shmem, in_buf, len, count, intra_node_root, uop,
> - datatype, is_cxx_uop);
> + datatype,
> +#ifdef HAVE_CXX_BINDING
> + is_cxx_uop
> +#else
> + 0
> +#endif
> +);
>
> shmem->queue[shmem->local_rank].shm_slots[windex]->psn = shmem->write;
> shmem->queue[shmem->local_rank].shm_slots[windex]->tail_psn = (volatile uint32_t *)
> @@ -3901,7 +3907,13 @@
> }
> } else {
> mv2_shm_tree_reduce(shmem, in_buf, len, count, intra_node_root, uop,
> - datatype, is_cxx_uop);
> + datatype,
> +#ifdef HAVE_CXX_BINDING
> + is_cxx_uop
> +#else
> + 0
> +#endif
> +);
> shmem->queue[shmem->local_rank].shm_slots[windex]->psn = shmem->write;
> }
>
> We believe this is a clear-cut error and simple fix, but if we do in fact
> have something wrong with our configure line, we'd be grateful for the
> education.
Chris, thanks for pointing out this issue and providing a patch. It
appears that we pass the value of is_cxx_uop into functions regardless
of whether HAVE_CXX_BINDING is defined or not.
The fix is simple and I did not see any problems with your configure
line (some default values are explicitly set but that may have value in
your case).
--
Jonathan Perkins
More information about the mvapich-discuss
mailing list