fortran - Progress bar. [gfortran vs ifort] -
i have wrote genetic algorithm in fortran able compute long double precision generic fitness function. first version (double precision) wrote gfortran have implemented progress bar. have compile ifort because gfortran not capable of perform real*16 calculations. works fine in case (ifort) progress bar not works properly. namely when whole cycle completed progress bar printed std output.
here piece of code progress bar:
if (rate(i).gt.ratemax) ratemax=rate(i) write(*,"(1x,a57,d12.4,a27,f6.2,a1)",advance="no") & '\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b ff: ', & ratemax,' progress:',100.*real(nmix)/real(nmixing),'%' end if
i use intel xeon of 64bit , options ifort are:
ifort -o2 -assume bscc ffevalld.f90 func.o -o ffevalld
while when use gfortran compile in way:
gfortran -ffree-form -o2 -fbackslash ffeval.f func.o -o ffeval
in gfortran (but double precision) works fine.
where mistake when use ifort? thanx
here's solution:
if (rate(i).gt.ratemax) ratemax=rate(i) 1100 format(1x,a57,d12.4,a27,f6.2,a1,$) write(*,1100) & '\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b$ ratemax,' progress:',100.*real(nmix)/real(nmixing),'%'
Comments
Post a Comment