I have ~43000 floats in my floats.in file (doing a simulation for a real-life problem) and when I run with it, I get a ROMS I/O error message in the screen output and the code crashes.  I am also using MPI.  If however, I go to the following code segment in ROMS/Utility/inp_par.F (SUBROUTINE read_FloatsPar (model, inp, out, Lwrite)] and comment it out, the code runs without any problems!!!
!-----------------------------------------------------------------------
!  Report input parameters.
!-----------------------------------------------------------------------
!
!      IF (Lwrite) THEN
!        DO ng=1,Ngrids
!          IF (Lfloats(ng)) THEN
!            IF (ncount(ng).ne.Nfloats(ng)) THEN
!              WRITE (stdout,60) ncount(ng), Nfloats(ng)
!              exit_flag=4
!              RETURN
!             END IF
!             WRITE (out,70) ng
!            DO i=1,nentry(ng)
!              IF (.not.spherical.and.(Fcoor(i,ng).eq.0)) THEN
!                frmt='(i1,i2,i5,f10.4,2f8.2,f8.2,4f9.3)'
!              ELSE
!                frmt='(i1,i2,i5,f10.4,3f8.2,4f9.3)'
!              END IF
!              WRITE (out,frmt) Fcoor(i,ng), Ftype(i,ng), Fcount(i,ng),  &
!     &                         Ft0(i,ng), Fx0(i,ng), Fy0(i,ng),         &
!     &                         Fz0(i,ng), Fdt(i,ng), Fdx(i,ng),         &
!     &                         Fdy(i,ng), Fdz(i,ng)
!            END DO
!            WRITE (out,80) Nfloats(ng),                                 &
!     &            'Nfloats',                                            &
!     &            'Number of float trajectories to compute.'
!          END IF
!        END DO
!      END IF
I tried de-bugging the code by incrementally increasing the number of floats in my floats.in file and the code runs with 1500 particles but crashes with 2000 particles.  However, when I comment the above code segment, everything runs nicely even with 43000 particles!
			
			
									
									
						ROMS I/O bug when using floats
Re: ROMS I/O bug when using floats
Sorry, I should have mentioned, I am using ROMS svn version 526.
			
			
									
									
						- m.hadfield
- Posts: 521
- Joined: Tue Jul 01, 2003 4:12 am
- Location: NIWA
Re: ROMS I/O bug when using floats
Interesting. You shouldn't be seriously stressing the memory on your machine with 43,000 floats, let along, 2000.
Try building the model with USE_DEBUG, then run it and look for any array bounds violations.
			
			
									
									
						Try building the model with USE_DEBUG, then run it and look for any array bounds violations.
