Commit a9dbe680 authored by ofgeorg's avatar ofgeorg

changed the way arrays are written when flggendata is set

parent 2db481bb
......@@ -369,7 +369,18 @@
& // '.txt'
OPEN(unit=uNum+19,file=tmp_dir,status='replace',&
& action='write', iostat=ioError)
tmp_dir=trim(adjustl(options%output_folder))&
& // '/popsize'&
& // trim(adjustl(proc)) &
& // '.txt'
OPEN(unit=uNum+20,file=tmp_dir,status='replace',&
& action='write', iostat=ioError)
tmp_dir=trim(adjustl(options%output_folder))&
& // '/histsize'&
& // trim(adjustl(proc)) &
& // '.txt'
OPEN(unit=uNum+21,file=tmp_dir,status='replace',&
& action='write', iostat=ioError)
IF(ioError .NE. 0) THEN
WRITE(*,*) 'I/O-Error writing Generation Data.'
STOP
......@@ -1379,7 +1390,7 @@
! Close Generation Data Files
!-------------------------------------------------------------------------
IF(options%flgGenData) THEN
DO i = 0, 19
DO i = 0, 21
CLOSE(unit=uNum+i)
END DO
END IF
......
......@@ -50,6 +50,7 @@
CHARACTER(len=20),SAVE :: formN,formHist,formInt,formFit
INTEGER :: i
INTEGER,SAVE :: calls = 0
INTEGER :: histsize
!-------------------------------------------------------------------------
! Get Array Formatter (only once)
......@@ -99,20 +100,26 @@
!WRITE(unit+8,formN) arxvalid(1:m,i)
!END DO
DO i = 1, m
WRITE(unit+7,formFit) arx(i,1:n)
WRITE(unit+8,formFit) arxvalid(i,1:n)
DO i = 1, n
WRITE(unit+7,formN) arx(1:m,i)
WRITE(unit+8,formN) arxvalid(1:m,i)
END DO
!-------------------------------------------------------------------------
! Write Fitness Values
!-------------------------------------------------------------------------
WRITE(unit+9,formFit) fitness%raw
WRITE(unit+10,formInt) fitness%idx
WRITE(unit+11,formFit) fitness%sel
WRITE(unit+12,formInt) fitness%idxsel
WRITE(unit+13,formHist) fitness%hist
WRITE(unit+14,formHist) fitness%histsel
DO i = 1, n
WRITE(unit+11,*) fitness%sel(i)
WRITE(unit+9, *) fitness%raw(i)
WRITE(unit+10,*) fitness%idx(i)
WRITE(unit+12, *) fitness%idxsel(i)
END DO
histsize = size(fitness%hist)
DO i = 1, histsize
WRITE(unit+13,*) fitness%hist(i)
WRITE(unit+14,*) fitness%histsel(i)
END DO
WRITE(unit+15,*) countEval
! Benis code
!WRITE(unit+16,*) abs(options%global_min - bestever%f)
......@@ -122,11 +129,14 @@
#ifdef __HAVE_MPI__
WRITE(unit+18,formN) GLOBAL_X_BEST
#endif
WRITE(unit+20,*) n
WRITE(unit+21,*) histsize
ELSEIF (options%flgGenTrace) THEN
WRITE(unit+16,*) bestever%f
WRITE(unit+17,formN) bestever%x
END IF
......
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