[ccm-users] Bug in CCSM2

Erik Kluzek erik@ucar.edu
Thu, 11 Jul 2002 13:30:49 -0600 (MDT)


On Mon, 8 Jul 2002, Dave Pierce wrote:

>
> there seems to be a bug in ccsm's file
> models/atm/cam/src/control/ccsm_msg.F90, around line 1485.  Right now the
> code looks like this:
>
> #if (defined SPMD)
>     do n=1,nrcv
>        do lat=1,plat
>           arget_buf(:,n,lat) = arget(:,lat,n)
>        end do
>     end do
>
> Problem is, arget_buf is only allocated for the master processor.  You
> might expect this would cause strange errors on some platforms, with
> rather hard to trace and non-reproducable results.  I think it should
> instead be:
>
> #if (defined SPMD)
>     if ( masterproc ) then
>         do n=1,nrcv
>            do lat=1,plat
>               arget_buf(:,n,lat) = arget(:,lat,n)
>            end do
>         end do
>     endif
>
> Perhaps one of the model coders could verify this conjecture.
>

Yes, the above is a recognized problem in ccsm_msf.F90. It will be fixed
in the CAM2.0.1 and CCSM2.0.1 release which is scheduled for later this
month.

> Also, in file models/ice/csim4/src/source/ice_itd.F, around line 163, the
> original code is like this:
>
>       if (my_task.eq.master_task) then
>         write (6,*) ''
>         write (6,*) 'hin_max(nc-1) < Cat nc < hin_max(nc)'
>
> For some reason (probably compiler bug) this causes a failure on the PGI
> compilers version 3.2-4 (haven't tried the version 4 compilers yet).  What
> happens is that the ice model halts with an I/O (permission denied) error
> to the output file.  It works if you instead have:
>
>       if (my_task.eq.master_task) then
>         write (6,*) ' '
>         write (6,*) 'hin_max(nc-1) < Cat nc < hin_max(nc)'
>
> Note that the difference is writing a single space to the output file in
> the second line, rather than a null string.
>

I'll report this the CSIM folks. Obviously it's something simple to
fix...


Erik Kluzek, (CGD at NCAR)
National Center for Atmospheric Research
Boulder CO, (off) (303)497-1326 (fax) (303)497-1324
--------- Home page and public PGP key---------------
          http://www.cgd.ucar.edu/~erik
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!