[mpich-discuss] compiling 32-bit and 64-bit mpich2 applications

Rajeev Thakur thakur at mcs.anl.gov
Thu Jan 1 23:16:01 CST 2009

You need to build the MPICH2 library separately for 32-bit and 64-bit and
install it in separate locations (via the --prefix option to configure) so
that you can invoke the right mpicxx. Before running configure, set the
environment variables CFLAGS, CXXFLAGS, FFLAGS, and F90FLAGS to pass the
requisite compiler options.


From: mpich-discuss-bounces at mcs.anl.gov
[mailto:mpich-discuss-bounces at mcs.anl.gov] On Behalf Of Kevin Van Workum
Sent: Wednesday, December 31, 2008 11:01 AM
To: mpich-discuss at mcs.anl.gov
Subject: [mpich-discuss] compiling 32-bit and 64-bit mpich2 applications

Dear All,

How can I pass the -m32 (gcc) option to mpicxx to build 32-bit applications
on my 64-bit machine? I suppose I could have to separate installations of
mpich2, but I'd like to be able to use the same installation. This is the
error I get now if I try to use -m32:

$ mpicxx -m32 hello.cpp
/usr/bin/ld: skipping incompatible
/usr/local/mpich2-1.0.5p4-ssm/lib/libmpichcxx.a when searching for
/usr/bin/ld: cannot find -lmpichcxx
collect2: ld returned 1 exit status



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20090101/b0b54203/attachment.htm>

More information about the mpich-discuss mailing list