diff --git a/pio/box_rearrange.F90.in b/pio/box_rearrange.F90.in index b7e045a43457..b16b1de1e78b 100644 --- a/pio/box_rearrange.F90.in +++ b/pio/box_rearrange.F90.in @@ -786,11 +786,11 @@ end subroutine box_rearrange_io2comp_{TYPE} do j=1,ndim if ( gcoord(j) < lb(j,i) ) then i = max(1,i-decompstep(j)) - if(k>5000) print *,__FILE__,__LINE__,i,gcoord(:),lb(:,i),ub(:,i) + if(k>5000) print *,__PIO_FILE__,__LINE__,i,gcoord(:),lb(:,i),ub(:,i) cycle loop_ioproc else if(gcoord(j) >= ub(j,i) ) then i = min(nioproc,i+decompstep(j)) - if(k>5000) print *,__FILE__,__LINE__,i,gcoord(:),lb(:,i),ub(:,i) + if(k>5000) print *,__PIO_FILE__,__LINE__,i,gcoord(:),lb(:,i),ub(:,i) cycle loop_ioproc endif end do diff --git a/pio/calcdecomp.F90 b/pio/calcdecomp.F90 index 9ee77f4ad358..740becdb7a48 100644 --- a/pio/calcdecomp.F90 +++ b/pio/calcdecomp.F90 @@ -168,7 +168,7 @@ subroutine CalcStartandCount(basetype, ndims, gdims, num_io_procs,myiorank,start kount=mykount ! if(myiorank>=0 .and. myiorank0) then ierr = nf90_sync(File%fh) - if(Debug) print *,__FILE__,__LINE__,ierr + if(Debug) print *,__PIO_FILE__,__LINE__,ierr ierr= nf90_close(File%fh) - if(Debug) print *,__FILE__,__LINE__,ierr + if(Debug) print *,__PIO_FILE__,__LINE__,ierr endif #endif case default diff --git a/pio/pio_msg_callbacks.F90 b/pio/pio_msg_callbacks.F90 index c22e024b1788..b5482e243e62 100644 --- a/pio/pio_msg_callbacks.F90 +++ b/pio/pio_msg_callbacks.F90 @@ -242,7 +242,7 @@ subroutine writedarray_handler(iosystem) call mpi_bcast(fillv, 1, mpi_integer , iosystem%compmaster, iosystem%intercomm, ierr) file=> lookupfile(fh) - if(debugasync) print *,__FILE__,__LINE__,v%varid,iod_id + if(debugasync) print *,__PIO_FILE__,__LINE__,v%varid,iod_id iodesc => lookupiodesc(iod_id) #ifndef _MPISERIAL select case(type) @@ -296,7 +296,7 @@ subroutine readdarray_handler(iosystem) real(r4) :: areal(1) real(r8) :: adouble(1) - if(debugasync) print *,__FILE__,__LINE__ + if(debugasync) print *,__PIO_FILE__,__LINE__ call mpi_bcast(fh, 1, mpi_integer, iosystem%compmaster, iosystem%intercomm, ierr) call mpi_bcast(v%varid, 1, mpi_integer, iosystem%compmaster, iosystem%intercomm, ierr) @@ -306,7 +306,7 @@ subroutine readdarray_handler(iosystem) file=> lookupfile(fh) - if(debugasync) print *,__FILE__,__LINE__,iod_id, type + if(debugasync) print *,__PIO_FILE__,__LINE__,iod_id, type iodesc => lookupiodesc(iod_id) #ifndef _MPISERIAL diff --git a/pio/pio_msg_mod.F90 b/pio/pio_msg_mod.F90 index 3fe44c1a010f..19df5a98bdef 100644 --- a/pio/pio_msg_mod.F90 +++ b/pio/pio_msg_mod.F90 @@ -299,14 +299,14 @@ subroutine add_to_iodesc_list(iodesc) - if(debugasync) print *,__FILE__,__LINE__,index + if(debugasync) print *,__PIO_FILE__,__LINE__,index end if iodesc%async_id=index list_item%index=index list_item%iodesc => iodesc - if(debugasync) print *,__FILE__,__LINE__,index,list_item%iodesc%async_id + if(debugasync) print *,__PIO_FILE__,__LINE__,index,list_item%iodesc%async_id end subroutine add_to_iodesc_list @@ -353,7 +353,7 @@ function delete_from_iodesc_list(id) result(iodesc) if(debugasync) then list_item=> top_iodesc do while(associated(list_item)) - print *,__FILE__,__LINE__,id,list_item%index,list_item%iodesc%async_id + print *,__PIO_FILE__,__LINE__,id,list_item%index,list_item%iodesc%async_id list_item=>list_item%next enddo endif @@ -430,10 +430,10 @@ function lookupiodesc(async_id) result(iodesc) nullify(iodesc) do while(associated(list_item%iodesc) ) - if(debugasync) print *,__FILE__,__LINE__,list_item%index,async_id,list_item%iodesc%async_id + if(debugasync) print *,__PIO_FILE__,__LINE__,list_item%index,async_id,list_item%iodesc%async_id if(abs(list_item%iodesc%async_id) == async_id) then iodesc => list_item%iodesc - if(debugasync) print *,__FILE__,__LINE__,async_id,list_item%index,iodesc%write%n_elemtype + if(debugasync) print *,__PIO_FILE__,__LINE__,async_id,list_item%index,iodesc%write%n_elemtype exit end if list_item=>list_item%next diff --git a/pio/piodarray.F90.in b/pio/piodarray.F90.in index e808455ac0d1..1c6e1198f048 100644 --- a/pio/piodarray.F90.in +++ b/pio/piodarray.F90.in @@ -207,7 +207,7 @@ contains if(debugasync) print *,__PIO_FILE__,__LINE__ endif - if(debugasync .and. ios%ioproc) print *,__FILE__,__LINE__,iodesc%async_id + if(debugasync .and. ios%ioproc) print *,__PIO_FILE__,__LINE__,iodesc%async_id select case(File%iotype) case(pio_iotype_pbinary, pio_iotype_direct_pbinary) @@ -996,7 +996,7 @@ contains call alloc_check(IOBUF,0,'IOBUF') end if endif -! print *,__FILE__,__LINE__,ndims, fndims, start(1:fndims),count(1:fndims),vardesc%rec +! print *,__PIO_FILE__,__LINE__,ndims, fndims, start(1:fndims),count(1:fndims),vardesc%rec #ifdef TIMING call t_startf("pio_read_nf") @@ -1308,7 +1308,7 @@ contains #ifdef _PNETCDF ierr = nfmpi_wait_all(file%fh, cnt-1, array_of_requests, status) #endif - if(DEBUG) print *,__FILE__,__LINE__,status, ierr, total_buffsize + if(DEBUG) print *,__PIO_FILE__,__LINE__,status, ierr, total_buffsize ptr=>file%data_list_top do while(associated(ptr)) diff --git a/pio/piolib_mod.F90 b/pio/piolib_mod.F90 index 2a13ef0484e5..008de6146cce 100644 --- a/pio/piolib_mod.F90 +++ b/pio/piolib_mod.F90 @@ -840,7 +840,7 @@ subroutine initdecomp_1dof_nf_i8(iosystem,basepiotype,dims,lenblocks,compdof,iod !--------------------- glength= product(int(dims,kind=PIO_OFFSET)) if(glength > huge(ndisp)) then - print *,__FILE__,__LINE__,dims,glength + print *,__PIO_FILE__,__LINE__,dims,glength call piodie( __PIO_FILE__,__LINE__, & 'requested array size too large for this interface ') endif @@ -1517,7 +1517,7 @@ subroutine genindexedblock(lenblocks,basetype,elemtype,filetype,displace) if(check) call checkmpireturn('genindexedblock: after call to type_commit: ',ierr) ! if(debug) then ! call mpi_type_get_envelope(filetype, nints, nadds, ndtypes, comb, ierr) -! print *,__FILE__,__LINE__,nints,nadds,ndtypes,comb,ierr +! print *,__PIO_FILE__,__LINE__,nints,nadds,ndtypes,comb,ierr ! endif endif @@ -1783,7 +1783,7 @@ subroutine init_intracom(comp_rank, comp_comm, num_iotasks, num_aggregator, stri iotmp2(:)=0 call MPI_allreduce(iotmp, iotmp2, iosystem%num_tasks, MPI_INTEGER, MPI_SUM, comp_comm, ierr) - call CheckMPIReturn('Call to MPI_ALLREDUCE()',ierr,__FILE__,__LINE__) + call CheckMPIReturn('Call to MPI_ALLREDUCE()',ierr,__PIO_FILE__,__LINE__) call alloc_check(iosystem%ioranks,n_iotasks,'init:n_ioranks') j=1 iosystem%iomaster = -1 @@ -1986,11 +1986,11 @@ subroutine init_intercom(component_count, peer_comm, comp_comms, io_comm, iosyst iam = -1 end if call mpi_allreduce(iam, io_leader, 1, mpi_integer, MPI_MAX, peer_comm, ierr) - call CheckMPIReturn('Call to MPI_ALLREDUCE()',ierr,__FILE__,__LINE__) + call CheckMPIReturn('Call to MPI_ALLREDUCE()',ierr,__PIO_FILE__,__LINE__) ! Find the rank of the comp leader in peer_comm iam = -1 call mpi_allreduce(iam, comp_leader, 1, mpi_integer, MPI_MAX, peer_comm, ierr) - call CheckMPIReturn('Call to MPI_ALLREDUCE()',ierr,__FILE__,__LINE__) + call CheckMPIReturn('Call to MPI_ALLREDUCE()',ierr,__PIO_FILE__,__LINE__) ! create the intercomm call mpi_intercomm_create(io_comm, 0, peer_comm, comp_leader, i, iosystem(i)%intercomm, ierr) ! create the union_comm @@ -1999,7 +1999,7 @@ subroutine init_intercom(component_count, peer_comm, comp_comms, io_comm, iosyst ! Find the rank of the io leader in peer_comm iam = -1 call mpi_allreduce(iam, io_leader, 1, mpi_integer, MPI_MAX, peer_comm, ierr) - call CheckMPIReturn('Call to MPI_ALLREDUCE()',ierr,__FILE__,__LINE__) + call CheckMPIReturn('Call to MPI_ALLREDUCE()',ierr,__PIO_FILE__,__LINE__) ! Find the rank of the comp leader in peer_comm iosystem(i)%comp_rank = -1 @@ -2012,7 +2012,7 @@ subroutine init_intercom(component_count, peer_comm, comp_comms, io_comm, iosyst end if end if call mpi_allreduce(iam, comp_leader, 1, mpi_integer, MPI_MAX, peer_comm, ierr) - call CheckMPIReturn('Call to MPI_ALLREDUCE()',ierr,__FILE__,__LINE__) + call CheckMPIReturn('Call to MPI_ALLREDUCE()',ierr,__PIO_FILE__,__LINE__) ! create the intercomm call mpi_intercomm_create(comp_comms(i), 0, peer_comm, io_leader, i, iosystem(i)%intercomm, ierr) @@ -2062,11 +2062,11 @@ subroutine init_intercom(component_count, peer_comm, comp_comms, io_comm, iosyst if(Debugasync) print *,__PIO_FILE__,__LINE__ call MPI_allreduce(iosystem(i)%comproot, j, 1, MPI_INTEGER, MPI_MAX,iosystem(i)%union_comm,ierr) - call CheckMPIReturn('Call to MPI_ALLREDUCE()',ierr,__FILE__,__LINE__) + call CheckMPIReturn('Call to MPI_ALLREDUCE()',ierr,__PIO_FILE__,__LINE__) iosystem%comproot=j call MPI_allreduce(iosystem(i)%ioroot, j, 1, MPI_INTEGER, MPI_MAX,iosystem(i)%union_comm,ierr) - call CheckMPIReturn('Call to MPI_ALLREDUCE()',ierr,__FILE__,__LINE__) + call CheckMPIReturn('Call to MPI_ALLREDUCE()',ierr,__PIO_FILE__,__LINE__) iosystem%ioroot=j @@ -2097,7 +2097,7 @@ subroutine init_intercom(component_count, peer_comm, comp_comms, io_comm, iosyst call alloc_check(iosystem(i)%ioranks, iosystem(i)%num_iotasks,'init:n_ioranks') if(Debugasync) print *,__PIO_FILE__,__LINE__,iotmp call MPI_allreduce(iotmp,iosystem(i)%ioranks,iosystem(i)%num_iotasks,MPI_INTEGER,MPI_MAX,iosystem(i)%union_comm,ierr) - call CheckMPIReturn('Call to MPI_ALLREDUCE()',ierr,__FILE__,__LINE__) + call CheckMPIReturn('Call to MPI_ALLREDUCE()',ierr,__PIO_FILE__,__LINE__) if(Debugasync) print *,__PIO_FILE__,__LINE__,iosystem(i)%ioranks call dealloc_check(iotmp) @@ -2200,7 +2200,7 @@ subroutine pio_recommend_iotasks(comm, ioproc, numiotasks, miniotasks, maxiotask endif iotmp2(:)=0 call MPI_allreduce(iotmp,iotmp2,num_tasks,MPI_INTEGER,MPI_SUM,comm,ierr) - call CheckMPIReturn('Call to MPI_ALLREDUCE()',ierr,__FILE__,__LINE__) + call CheckMPIReturn('Call to MPI_ALLREDUCE()',ierr,__PIO_FILE__,__LINE__) numiotasks=SUM(iotmp2) diff --git a/pio/pionfatt_mod.F90.in b/pio/pionfatt_mod.F90.in index bde549db1599..9e4d8ad55eae 100644 --- a/pio/pionfatt_mod.F90.in +++ b/pio/pionfatt_mod.F90.in @@ -155,7 +155,7 @@ contains ! case(iotype_netcdf,PIO_iotype_netcdf4c,PIO_iotype_netcdf4p) case(iotype_netcdf,PIO_iotype_netcdf4c) if (Ios%io_rank==0) then - if(debug) print *,__FILE__,__LINE__,name,value + if(debug) print *,__PIO_FILE__,__LINE__,name,value ierr=nf90_put_att(File%fh,varid,name,value) endif case(PIO_iotype_netcdf4p) diff --git a/pio/pionfput_mod.F90.in b/pio/pionfput_mod.F90.in index b7bce3970d65..f9ea72804e3b 100644 --- a/pio/pionfput_mod.F90.in +++ b/pio/pionfput_mod.F90.in @@ -125,7 +125,7 @@ contains ierr = nfmpi_begin_indep_data(File%fh) if(Ios%io_rank==0 .and. (ierr==NF_EINDEP .or. ierr==PIO_NOERR)) then - print *,__FILE__,__LINE__,index,count,trim(ival) + print *,__PIO_FILE__,__LINE__,index,count,trim(ival) ierr = nfmpi_put_vara (File%fh, varid, int(index,kind=PIO_OFFSET), & int(count,kind=PIO_OFFSET), ival, int(count,kind=PIO_OFFSET), & MPI_CHARACTER) @@ -134,7 +134,7 @@ contains ierr = nfmpi_end_indep_data(File%fh) end if !#else -! print *,__FILE__,__LINE__,index,count,trim(ival) +! print *,__PIO_FILE__,__LINE__,index,count,trim(ival) ! ierr = nfmpi_put_vara_all (File%fh, varid, int(index,kind=PIO_OFFSET), & ! int(count,kind=PIO_OFFSET), ival) !#endif diff --git a/pio/pionfwrite_mod.F90.in b/pio/pionfwrite_mod.F90.in index f2bd99ad59e8..5288b1848a7c 100644 --- a/pio/pionfwrite_mod.F90.in +++ b/pio/pionfwrite_mod.F90.in @@ -1,3 +1,4 @@ +#define __PIO_FILE__ "pionfwrite_mod.F90" !> !! @file !! $Revision$ @@ -121,11 +122,11 @@ contains ! allocate space on root for copy of iobuf etc. iobuf_size=size(IOBUF) if(File%iosystem%num_iotasks>1) then - if(Debug) print *,__FILE__,__LINE__ + if(Debug) print *,__PIO_FILE__,__LINE__ call MPI_ALLREDUCE(iobuf_size,max_iobuf_size, & 1,MPI_INTEGER,MPI_MAX,File%iosystem%IO_comm,mpierr) call CheckMPIReturn(subName, mpierr) - if(Debug) print *,__FILE__,__LINE__,iobuf_size + if(Debug) print *,__PIO_FILE__,__LINE__,iobuf_size if (File%iosystem%io_rank==0) then call alloc_check(temp_iobuf,max_iobuf_size) else @@ -147,7 +148,7 @@ contains temp_count(1:ndims)=int(count(1:ndims)) - if(Debug) print *,__FILE__,__LINE__,ndims,temp_start(1:ndims),temp_count(1:ndims) + if(Debug) print *,__PIO_FILE__,__LINE__,ndims,temp_start(1:ndims),temp_count(1:ndims) ! Every i/o proc send data to root