[Fortran] subroutine needs fixing

  • Context: Fortran 
  • Thread starter Thread starter khalchris
  • Start date Start date
  • Tags Tags
    Fortran Subroutine
Click For Summary
SUMMARY

The forum discussion centers on debugging a Fortran subroutine that requires an external file, "vaba_param.inc," for successful compilation. The user lacks programming experience and seeks guidance on error checking and debugging. Respondents emphasize the necessity of understanding programming fundamentals and the importance of creating a main program to properly utilize the subroutine. Without the required include file and a standalone main program, the provided code will not compile or produce an executable.

PREREQUISITES
  • Basic understanding of Fortran programming syntax
  • Familiarity with compiling Fortran code
  • Knowledge of error messages and debugging techniques
  • Ability to create a main program in Fortran
NEXT STEPS
  • Research Fortran error messages and their meanings
  • Learn how to create a main program in Fortran
  • Explore methods for debugging Fortran code
  • Understand the role of include files in Fortran
USEFUL FOR

This discussion is beneficial for novice Fortran programmers, software developers seeking to improve their debugging skills, and anyone needing to understand the integration of subroutines in Fortran applications.

khalchris
Messages
1
Reaction score
0
I am trying to use this subroutine which I found online in my model but I am not experienced in programming and I need to know how can I check for errors or debug the code and try to find the mistakes or syntax errors , I have attached the code for your review

Thank you
 

Attachments

Technology news on Phys.org
It would help if you tell us the syntax error messages that you got, at least the first few of them.
 
I am always very hesitant to answer requests like this because I fear it will turn out into a never ending chain of help requests...you cannot be not-experience and do debugging, error checking and programming...you need to put the time to know what you are doing; otherwise, you will simply by the middle man between the program and the forum.

All I am going to say for now is that the source that you attached has an include statement which expects to find a file named "vaba_param.inc" ...so, you need to get a hold of that file, too, before you can compile the program.

Also, the file that you have attached is not meant to be compiled in a standalone fashion, nor will produce an executable program...you are supposed to put together your own main program where you assemble your problem and THEN call the subroutine in this file...
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 59 ·
2
Replies
59
Views
12K
  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 5 ·
Replies
5
Views
8K
  • · Replies 20 ·
Replies
20
Views
4K