[mpich-discuss] issues when writing a simple makefile to build MPI programs

Pavan Balaji balaji at mcs.anl.gov
Sat Jun 25 09:28:32 CDT 2011


Can you send us the log files are described in the README? Please 
compress them as they can be huge.

  -- Pavan

On 06/25/2011 09:12 AM, clara wrote:
> Thanks, but now I get the below error:
> configure: error: Could not determine a way to link a Fortran test program!
>
>
> On Sat, Jun 25, 2011 at 9:59 AM, Pavan Balaji <balaji at mcs.anl.gov
> <mailto:balaji at mcs.anl.gov>> wrote:
>
>
>     It's "CFLAGS", not "CFLAG".
>
>       -- Pavan
>
>
>     On 06/25/2011 08:42 AM, clara wrote:
>
>         I executed the following command:
>         ./configure --prefix=/mnt/lux/git/pios/xc/__mpich2-32
>         --with-pm=gforker
>         --disable-faster CFLAG=-m32 CXXFLAGS=-m32 FFLAGS=-m32 FCFLAGS=-m32
>
>         and got the below errors:
>         configure: error: ****  Incompatible Fortran and C Object File
>         Types!  ****
>         F77 Object File Type produced by "gfortran -m32 " is : : ELF
>         32-bit LSB
>         relocatable, Intel 80386, version 1 (SYSV), not stripped.
>           C  Object File Type produced by "gcc    -O2" is : : ELF 64-bit LSB
>         relocatable, x86-64, version 1 (SYSV), not stripped.
>
>         Is there any simple way setting -m32 in order to build 32-bit
>         libraries
>         on 64-bit system?
>
>         - Clara
>
>         On Fri, Jun 24, 2011 at 11:53 AM, Anthony Chan <chan at mcs.anl.gov
>         <mailto:chan at mcs.anl.gov>
>         <mailto:chan at mcs.anl.gov <mailto:chan at mcs.anl.gov>>> wrote:
>
>
>             You need to rebuild mpich2 for 32bit.  Set
>             CFLAGS/CXXFLAGS/FFLAGS/FCFLAGS
>             to -m32 (assume your system has the 32bit support).
>
>             BTW, your install of 1.2.1p1 mpich2 is old, please upgrade
>         if possible
>             (the latest stable release is 1.4)
>
>             A.Chan
>
>             ----- Original Message -----
>          > I think the default installed mpich2 in 64-bit ubuntu is in
>         x86_64
>          > mode.
>          > When I try to compile/link an MPI program in 32-bit mode,
>         there is an
>          > error
>          > below:
>          > /usr/lib/libmpich.so: file not recognized: File format not
>         recognized
>          >
>          > How can I configure the compile/link flags? Do I need to rebuild
>          > mpich2 to
>          > get a 32-bit libraries? Or is there any 32-bit libraries
>         coexisted
>          > with
>          > 64-bit libraries? Thanks.
>          >
>          > Below is the output version information of the default installed
>          > MPICH2:
>          > MPICH2 Version: 1.2.1p1
>          > MPICH2 Release date: Unknown, built on Tue Apr 27 15:06:31
>         UTC 2010
>          > MPICH2 Device: ch3:nemesis
>          > MPICH2 configure: --build=x86_64-linux-gnu --prefix=/usr
>          > --includedir=${prefix}/include --mandir=${prefix}/share/man
>          > --infodir=${prefix}/share/info --sysconfdir=/etc
>         --localstatedir=/var
>          > --libexecdir=${prefix}/lib/__mpich2 --disable-maintainer-mode
>          > --disable-dependency-tracking --disable-silent-rules --srcdir=.
>          > --enable-sharedlibs=gcc --prefix=/usr --enable-f90
>          > --sysconfdir=/etc/mpich2
>          > --includedir=/usr/include/__mpich2 --docdir=/usr/share/doc/mpich2
>          > MPICH2 CC: gcc -g -O2 -g -Wall -O2 -O2
>          > MPICH2 CXX: c++ -g -O2 -g -Wall -O2 -O2
>          > MPICH2 F77: gfortran -g -O2 -O2
>          > MPICH2 F90: f95 -O2
>          >
>          > - Clara
>          >
>          > On Fri, Jun 24, 2011 at 12:08 AM, Pavan Balaji
>         <balaji at mcs.anl.gov <mailto:balaji at mcs.anl.gov>
>         <mailto:balaji at mcs.anl.gov <mailto:balaji at mcs.anl.gov>>>
>
>          > wrote:
>          >
>          > > Clara,
>          > >
>          > >
>          > > On 06/23/2011 10:53 PM, clara wrote:
>          > >
>          > >> If I only use shared memory communication among processes on a
>          > >> single
>          > >> node, how can I configure the mpich2.1.4 (except
>             --with-pm=gforker)
>          > >> in
>          > >> order to link libraries as little as possible?
>          > >>
>          > >
>          > > Shared memory communication support comes by default in
>         MPICH2. You
>          > > don't
>          > > need to pass any special configure options; not even
>          > > --with-pm=gforker.
>          > > Unfortunately, all libraries are still required to be
>         linked with
>          > > even when
>          > > only shared memory support is needed.
>          > >
>          > >  -- Pavan
>          > >
>          > >
>          > > --
>          > > Pavan Balaji
>          > > http://www.mcs.anl.gov/~balaji
>          > >
>          >
>          > _________________________________________________
>          > mpich-discuss mailing list
>          > mpich-discuss at mcs.anl.gov <mailto:mpich-discuss at mcs.anl.gov>
>         <mailto:mpich-discuss at mcs.anl.__gov
>         <mailto:mpich-discuss at mcs.anl.gov>>
>
>          > https://lists.mcs.anl.gov/__mailman/listinfo/mpich-discuss
>         <https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss>
>             _________________________________________________
>             mpich-discuss mailing list
>         mpich-discuss at mcs.anl.gov <mailto:mpich-discuss at mcs.anl.gov>
>         <mailto:mpich-discuss at mcs.anl.__gov
>         <mailto:mpich-discuss at mcs.anl.gov>>
>
>         https://lists.mcs.anl.gov/__mailman/listinfo/mpich-discuss
>         <https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss>
>
>
>
>
>         _________________________________________________
>         mpich-discuss mailing list
>         mpich-discuss at mcs.anl.gov <mailto:mpich-discuss at mcs.anl.gov>
>         https://lists.mcs.anl.gov/__mailman/listinfo/mpich-discuss
>         <https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss>
>
>
>     --
>     Pavan Balaji
>     http://www.mcs.anl.gov/~balaji
>
>

-- 
Pavan Balaji
http://www.mcs.anl.gov/~balaji


More information about the mpich-discuss mailing list