Commit 2db481bb authored by ofgeorg's avatar ofgeorg

small fix for seed with mpi on single machine

parent 2a299a5a
......@@ -197,12 +197,18 @@
IF (options%flgouttxt .OR. options%flgGenData .OR. options%flgGenTrace) &
&THEN !if any textfiles are written
#endif
tmp_dir=trim(adjustl(options%output_folder))&
& // '/seed'&
#ifdef __HAVE_MPI__
& // '_' &
#endif
& // trim(adjustl(proc)) &
& // '.txt'
#ifdef __HAVE_MPI__
OPEN(unit=uNum+20+MY_RANK,file=tmp_dir,status='replace',&
#else
OPEN(unit=uNum+20,file=tmp_dir,status='replace',&
#endif
& action='write', iostat=ioError)
......@@ -211,15 +217,21 @@
STOP
END IF
WRITE(uNum+20,*) options%seed
#ifdef __HAVE_MPI__
WRITE(uNum+20+MY_RANK,*) options%seed
#else
WRITE(uNum+20,*) options%seed
#endif
IF(ioError .NE. 0) THEN
WRITE(*,*) 'I/O-Error writing Seed Data.'
STOP
END IF
#ifdef __HAVE_MPI__
CLOSE(unit=uNum+20+MY_RANK)
#else
CLOSE(unit=uNum+20)
#endif
END IF
!-----------------------------------------------------------------------
......
......@@ -53,11 +53,6 @@
! Init random number generator
IF (first_init) THEN
CALL ZBQLINI(options%seed)
ELSE
WRITE(proc,'(I10)') MY_RANK
tmpint = options%seed + 1 +MY_RANK**2
options%seed = tmpint
END IF
END IF
!CALL SYSTEM_CLOCK(options%seed)
......@@ -75,9 +70,6 @@
! Init random number generator
IF (first_init) THEN
CALL ZBQLINI(options%seed)
ELSE
tmpint = options%seed + 1
options%seed = tmpint
END IF
DO i = 1,options%dimensions
IF (options%use_init_bounds ) THEN
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment