[MITgcm-devel] character array assignment, g77
Jean-Michel Campin
jmc at ocean.mit.edu
Tue May 11 10:32:40 EDT 2010
Hi Martin,
I don't know what to think of "I cannot reproduce this problem with
a simple test program"
But in ctrl_pack.F, this is not an assignment (just a "write"), right ?
Does this depend on how ncvargrd is declared ?
Jean-Michel
On Tue, May 11, 2010 at 04:12:04PM +0200, Martin Losch wrote:
> Hi there,
>
> I have this problem: with g77 on my AppleBookPro, I am getting an internal error when compiling routines like ctrl_init.F, the reason is this line
> ncvargrd(ivar)= '?'
> If I replace it with
> ncvargrd(ivar)(:)= '?'
> the compilation works. This
> ncvargrd(ivar)(1:1)= '?'
> does not work, the same is true for similar expressions in:
> ctrl_init.F, ctrl_init_ctrlvar.F, ctrl_init_wet.F, grdchk_get_position.F, grdchk_init.F, grdchk_loc.F
>
> This routine has a similar expression for ncvargrd, but it works (can be compiled by g77):
> ctrl_pack.F
> Further I cannot reproduce this problem with a simple test program. What should I do, ignore this problem, because it is only related to g77 (more recent gfortran seems to work)? Or use the fix, which is dangerous as soon as ncvargrd will be longer than (1)?
>
> Martin
>
> > g77 -v
> > Reading specs from /usr/local/lib/gcc/i686-apple-darwin8.8.1/3.4.0/specs
> > Configured with: ../gcc-3.4.0/configure --enable-languages=f77
> > Thread model: posix
> > gcc version 3.4.0
>
> > gfortran -v
> > Using built-in specs.
> > Target: i686-apple-darwin9
> > Configured with: ../gcc-4.3.1/configure --prefix=/sw --prefix=/sw/lib/gcc4.3 --mandir=/sw/share/man --infodir=/sw/share/info --enable-languages=c,c++,fortran,objc,java --with-arch=nocona --with-tune=generic --build=i686-apple-darwin9 --with-gmp=/sw --with-libiconv-prefix=/sw --with-system-zlib --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib --disable-libjava-multilib
> > Thread model: posix
> > gcc version 4.3.1 (GCC)
>
>
>
> _______________________________________________
> MITgcm-devel mailing list
> MITgcm-devel at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-devel
More information about the MITgcm-devel
mailing list