PGI 15.10 complains 'type mismatch' but PGI 13.6 is OK

Hi,

I’m building oasis3-mct 2.8 on a Cray XC30 box. There is no problem with PGI 13.6-0, but PGI 15.10-0 complains a weird ‘type mismatch’ error, like this

pgf90 -I/opt/cray/mpt/7.3.1/gni/mpich-pgi/15.3/include -g -O0 -byteswapio -noswitcherror -fPIC -traceback -Mbounds -Ktrap=fp -Meh_frame -r8 -I/scratch/singadm/pkg_src/oasis3-mct/build/pgi/build/lib/psmile.MPI1 -I/scratch/singadm/pkg_src/oasis3-mct/build/pgi/build/lib/scrip  -I/scratch/singadm/pkg_src/oasis3-mct/build/pgi/build/lib/mct  -Duse_comm_MPI1 -Duse_netCDF -D__VERBOSE  -DTREAT_OVERLAY -DINFO -DDEBUG  -DSELECTEDREALKIND -I/opt/cray/netcdf-hdf5parallel/4.3.0/PGI/121/include -I/scratch/singadm/pkg_src/oasis3-mct/lib/psmile/include -I/scratch/singadm/pkg_src/oasis3-mct/build/pgi/build/lib/mct -I/scratch/singadm/pkg_src/oasis3-mct/build/pgi/build/lib/scrip -I/scratch/singadm/pkg_src/oasis3-mct/build/pgi/build/lib/pio  -c   /scratch/singadm/pkg_src/oasis3-mct/lib/psmile/src/mod_oasis_part.F90

PGF90-S-0188-Argument number 1 to oasis_mpi_reducelists: type mismatch (/scratch/singadm/pkg_src/oasis3-mct/lib/psmile/src/mod_oasis_part.F90: 174)
  0 inform,   0 warnings,   1 severes, 0 fatal for oasis_part_setup

Here are appropriate declarations

mod_oasis_part.F90

   4 MODULE mod_oasis_part
   5
   6    USE mod_oasis_kinds
   7    USE mod_oasis_data
   8    USE mod_oasis_parameters
   9    USE mod_oasis_sys
  10    USE mod_oasis_mpi
  11    USE mod_oasis_timer
  12    USE mct_mod


  151    character(len=ic_lvar2), pointer :: pname0(:),pname(:)

  174    call oasis_mpi_reducelists(pname0,mpi_comm_local,pcnt,pname,'part_setup',fastcheck=.true.)


mod_oasis_kinds.F90

  24   INTEGER, PARAMETER :: ic_lvar2= 120
  30   INTEGER, PARAMETER :: ip_i4_p = SELECTED_INT_KIND(9)

mod_oasis_data.F90:  

  50   INTEGER(kind=ip_i4_p) :: mpi_comm_local


mod_oasis_mpi.F90

  2525 SUBROUTINE oasis_mpi_reducelists(linp1,comm,cntout,lout1,callstr,fastcheck,fastcheckout, &
  2526    linp2,lout2,spval2,linp3,lout3,spval3)
  2527
  2528    IMPLICIT none
  2529
  2530    !----- arguments ---
  2531    character(*),pointer,intent(in)    :: linp1(:)  !< input list on each task
  2532    integer             ,intent(in)    :: comm      !< mpi communicator
  2533    integer             ,intent(out)   :: cntout    !< size of lout1 list
  2534    character(*),pointer,intent(inout) :: lout1(:)  !< reduced output list, same on all tasks
  2535    character(*)        ,intent(in)    :: callstr   !< to identify caller
  2536    logical             ,intent(in)   ,optional :: fastcheck !< run a fastcheck first
  2537    logical             ,intent(out)  ,optional :: fastcheckout !< true if fastcheck worked
  2538    character(*),pointer,intent(in)   ,optional :: linp2(:)  !< input list on each task
  2539    character(*),pointer,intent(inout),optional :: lout2(:)  !< reduced output list, same on all tasks
  2540    character(*)        ,intent(in)   ,optional :: spval2    !< unset value for linp2
  2541    integer     ,pointer,intent(in)   ,optional :: linp3(:)  !< input list on each task
  2542    integer     ,pointer,intent(inout),optional :: lout3(:)  !< reduced output list, same on all tasks
  2543    integer             ,intent(in)   ,optional :: spval3    !< unset value for linp3

The codes looked like good, other compilers are good for these codes and no complain. Have no idea what’s going wrong with PGI 15.10-0.

Any ideas about this problem ?

Thanks for your time

Regards

Jerry


[/code]

Thanks Jerry,

I was able to recreate the problem here. It looks related to a known problem, TPR#22223, which occurred after we added F2008 “Pointer Dummy argument” feature in the 15.7 compilers. We have added your issue to this problem report.

As a work around, please change linp1’s declaration at line 2531 of mod_oasis_mpi.F90 to use “intent(inout)” instead of “intent(in)”.

character(*),pointer,intent(inout)    :: linp1(:)  !< input list on each task

Best Regards,
Mat

Thanks Mat,

It works like charm :)

Regards

Jerry