[mpich-discuss] Error when compiling with mpif90

Anthony Chan chan at mcs.anl.gov
Mon Feb 14 11:58:19 CST 2011


just looked at your c.txt again and notice something may be worthy of looking into:

....
checking for Fortran 77 libraries of gfortran...  -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin10.3.0/4.5.1 -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin10.3.0/4.5.1/../../.. -lgfortran
....
checking for ld used by gcc... /usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld

These test results **suggest** (based the path name) that your gfortran is 64bit,
but the linker used by gcc seems to be 32bit.  If that is the case, would that be a
problem for you to use mcmodel=large which I assume you use it to run large model 
that requires a lot of stack space.  (I assume everything here should be 64bit)
I don't own a Mac, so not sure if it is a real problem..... 

----- Original Message -----
> I personally never heard anyone complaining mpif90+gfortran on Mac,
> but it does not mean much. This seems to be a compiler/mac issue,
> you may want to post your question on gnu's or mac's relevant emailing
> lists.
> 
> A.Chan
> 
> ----- Original Message -----
> > Hi,
> > Thanks, the offending compile option was -mcmodel=large. When I
> > remove
> > it or
> > replace large with medium, my code compiles, links, and runs. I do
> > need this
> > option though for larger simulations. Has anyone had problems with
> > this
> > option creating errors before with mpif90 and gfortran?
> > Brandt
> >
> >
> >
> > > ------------------------------
> > >
> > > Message: 2
> > > Date: Mon, 14 Feb 2011 00:25:30 -0600 (CST)
> > > From: Anthony Chan <chan at mcs.anl.gov>
> > > Subject: Re: [mpich-discuss] Error when compiling with mpif90
> > > To: mpich-discuss at mcs.anl.gov
> > > Message-ID:
> > >        <1740950378.50947.1297664730569.JavaMail.root at zimbra.anl.gov>
> > > Content-Type: text/plain; charset=utf-8
> > >
> > >
> > > Everything makes sense now.
> > >
> > > ----- Original Message -----
> > >
> > > > $ mpif90 -fdefault-real-8 -O3 -fdollar-ok -fmax-errors=6
> > > > -fconvert=big-endian -frecord-marker=4 -cpp -mcmodel=large -DMPI
> > > > -I/usr/local/mpich2/include -L/usr/local/mpich2/lib -c bla.f
> > >
> > > With mpif90, you don't need
> > > "-I/usr/local/mpich2/include -L/usr/local/mpich2/lib"
> > > which will be taken care of by mpif90.
> > >
> > > > I hope everything's clear now, and thank you for your help,
> > >
> > > Have you tried to compile your code on linux with mpich2 built by
> > > gcc+gfortran ? I would try to eliminate flags in "-fdefault-real-8
> > > -O3 -fdollar-ok -fmax-errors=6 -fconvert=big-endian
> > > -frecord-marker=4
> > > -cpp -mcmodel=large" one by one to see which causes the error...
> > >
> > > A.Chan
> > >
> > >
> > > ------------------------------
> > >
> > >
> >
> > _______________________________________________
> > mpich-discuss mailing list
> > mpich-discuss at mcs.anl.gov
> > https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss


More information about the mpich-discuss mailing list