Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How to compile and run as batch?

How to compile and run as batch?

How to compile and run as batch?

I am pretty clueless with Fortran, but would like to convert the following fortran code into a batch mode input


- What compiler should I use?  G95 seems like a good choice.

- How do I convert it so that it accepts a batch file as input rather than command line?

- What type of modifications to source code need to done to get it to up to par (i.e. fixed format to free format, etc.)

Are there any good manuals on this kind of thing?  Thanks for any help.   


RE: How to compile and run as batch?

Yep, I would like a simple text file that would be read into the compiled code.   

But again, I really know next to nothing about Fortran so need to guidance.


RE: How to compile and run as batch?


I hope you don't mind me saying so, but this source code requires the attention of an experienced fortan user, not a novice. From a quick scan, I can see that it is old, very old, written in fortran IV or earlier, using Hollerith data and mixing integers with Hollerith data. This has not been part of the standard since before fortran 77, although many current compilers still allow it for the sake of backwards compatibility.

But more seriously there is a severe problem with the code, the GOTO statement on line 128 points to label 240 which is inside the DO 280 and DO 270 loops with the GOTO statement being outside both of these DO loops. This is illegal, because the DO loop counters will not have been given a value when the program flow reaches their CONTINUE statements.

Silverfrost FTN95 correctly refuses to compile the code with this error whilst gfortran does compile the code as it stands but issues a warning message about this problem.

I suggest that you find an experienced fortran programmer to help you.


RE: How to compile and run as batch?


Thanks for the advice.  I am aware of this potential problem with the loop, but "heard" that it would still properly run regardless of this.  Either way, this is probably out of my domain and I will need to get someone else involved.  


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close