[mpich-discuss] mpich-3.0.1 compilation error when machine has valgrind-3.6.0
Christopher Daley
cdaley at flash.uchicago.edu
Fri Jan 18 11:20:50 CST 2013
Hi all,
There is the following error when compiling mpich-3.0.1 with gcc-4.4.6
on x86_64 in the presence of valgrind-3.6.0.
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./src/include
-I./src/include -I./src/mpi/datatype -I./src/mpi/spawn
-Isrc/util/logging/common -I./src/util/wrappers -I./src/util/wrappers
-I./src/binding/cxx
-I/home/cdaley/tmp_build/mpich3/mpich-3.0.1/src/binding/f77
-Isrc/binding/f90 -I./src/mpid/ch3/include -I./src/mpid/ch3/include
-I./src/mpid/ch3/channels/nemesis/include
-I./src/mpid/ch3/channels/nemesis/include
-I./src/mpid/ch3/channels/nemesis/utils/monitor
-I./src/mpid/common/datatype -I./src/mpid/common/datatype
-I./src/mpid/common/sched -I./src/mpid/common/thread -I./src/pmi/simple
-I/home/cdaley/tmp_build/mpich3/mpich-3.0.1/src/mpl/include
-I/home/cdaley/tmp_build/mpich3/mpich-3.0.1/src/mpl/include
-I/home/cdaley/tmp_build/mpich3/mpich-3.0.1/src/openpa/src
-I/home/cdaley/tmp_build/mpich3/mpich-3.0.1/src/openpa/src
-I/home/cdaley/tmp_build/mpich3/mpich-3.0.1/src/mpi/romio/include -g -O2
-MT src/mpi/comm/comm_create.lo -MD -MP -MF
src/mpi/comm/.deps/comm_create.Tpo -c src/mpi/comm/comm_create.c -fPIC
-DPIC -o src/mpi/comm/.libs/comm_create.o
src/mpi/comm/comm_create.c: In function
'MPIR_Comm_create_calculate_mapping':
src/mpi/comm/comm_create.c:163: error: expected ')' before ';' token
src/mpi/comm/comm_create.c:164: error: expected ')' before ';' token
comm_create.c:163:
MPL_VG_CHECK_MEM_IS_DEFINED(*mapping_vcr_out, vcr_size *
sizeof(**mapping_vcr_out));
expands to
((void)(__extension__({unsigned int _zzq_rlval; { volatile unsigned long
long int _zzq_args[6]; volatile unsigned long long int _zzq_result;
_zzq_args[0] = (unsigned long long
int)(VG_USERREQ__CHECK_MEM_IS_DEFINED); _zzq_args[1] = (unsigned long
long int)(((*mapping_vcr_out))); _zzq_args[2] = (unsigned long long
int)(((vcr_size * sizeof(**mapping_vcr_out)))); _zzq_args[3] = (unsigned
long long int)(0); _zzq_args[4] = (unsigned long long int)(0);
_zzq_args[5] = (unsigned long long int)(0); __asm__ volatile("rolq $3,
%%rdi ; rolq $13, %%rdi\n\t" "rolq $61, %%rdi ; rolq $51, %%rdi\n\t"
"xchgq %%rbx,%%rbx" : "=d" (_zzq_result) : "a" (&_zzq_args[0]), "0" (0)
: "cc", "memory" ); _zzq_rlval = _zzq_result; } _zzq_rlval; })););
Notice the ")););" at the end. The embedded ";" happens because
mpl_valgrind.h:126:
# define MPL_VG_CHECK_MEM_IS_DEFINED(addr_,len_)
((void)VALGRIND_CHECK_MEM_IS_DEFINED((addr_),(len_)))
memcheck.h:169: [valgrind-3.6.0]
#define VALGRIND_CHECK_MEM_IS_DEFINED(_qzz_addr,_qzz_len) \
VALGRIND_DO_CLIENT_REQUEST_EXPR(0, \
VG_USERREQ__CHECK_MEM_IS_DEFINED, \
(_qzz_addr), (_qzz_len), 0, 0, 0);
This issue does not happen with newer versions of valgrind because the
VALGRIND_CHECK_MEM_IS_DEFINED macro definition does not contain a
semi-colon.
memcheck.h:169: [valgrind-3.7.0]
#define VALGRIND_CHECK_MEM_IS_DEFINED(_qzz_addr,_qzz_len) \
VALGRIND_DO_CLIENT_REQUEST_EXPR(0, \
VG_USERREQ__CHECK_MEM_IS_DEFINED, \
(_qzz_addr), (_qzz_len), 0, 0, 0)
Reverse merging changeset 17240eb22c5455683e5544a9a4733fe4add6225c
(previously r10453)
http://trac.mpich.org/projects/mpich/changeset/17240eb22c5455683e5544a9a4733fe4add6225c/src/mpl/include/mpl_valgrind.h
allowed me to compile mpich-3.0.1 in the presence of valgrind-3.6.0.
Hopefully this is helpful.
Thanks,
Chris
More information about the discuss
mailing list