Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6468567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T05:54:06+00:00 2026-05-25T05:54:06+00:00

I have wrote a genetic algorithm in Fortran to be able to compute with

  • 0

I have wrote a genetic algorithm in Fortran to be able to compute with a long double precision a generic fitness function. The first version (double precision) was written for gfortran where I implemented a progress bar.

Now I have to compile with ifort because gfortran is not capable of performing real*16 calculations. All works fine but in this case (ifort) the progress bar does not work properly. Namely, only when the whole cycle is completed the progress bar is printed to std output.

Here is the piece of code for the progress bar:

if (rate(i).gt.ratemax) then

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 an Intel Xeon of 64bit and the options for ifort are:

ifort -O2 -assume bscc FFevalLD.f90  func.o -o FFevalLD

while when use gfortran I compile in this way:

gfortran -ffree-form -O2 -fbackslash FFeval.f func.o -o FFeval

in gfortran (but double precision) all works fine.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T05:54:07+00:00Added an answer on May 25, 2026 at 5:54 am

    Here’s a solution:

    if (rate(i).gt.ratemax) then 
      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),'%' 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this Array i wrote a function MostFreq that takes an array of
I have to solve the Travelling Salesman Problem using a genetic algorithm that I
Question: I have just wrote my first code using c# lambda expressions. It works,
I wrote a quick generic linked list, simple stuff. But I have a bug
I want a generic function that would work with types that have Top ,
I want to write in Delphi (2009 - so I have generic dictionary class)
I have wrote a custom MultipleChoiceField. I have everything working ok but when I
I have wrote an application that syncs two folders together. The problem with the
i have wrote a script to produce an array of data but now want
I wrote this code I have these errors Cannot implicitly convert type x.Program.TreeNode' to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.