[FORTRAN] Strange Characters in output

In summary, the conversation discusses a code that is producing errors and strange characters when compiled, despite being from a book and having previously worked. The code and input files are provided and it is suggested to try adding certain lines of code to fix the issue.
  • #1
zstratto
6
0
Hi, I am trying to compile a code that should work fine, but I am getting errors and also some odd characters are printing on the screen. This is the output:


ENTER INPUT FILE NAME (INCLUDE EXTENSION NAME)
blisw.inp
YOUR INPUT FILE IS
blisw.inp
THIS PROGRAM CURV.EXE WILL GENERATE SEVERAL OUTPUT FILES:
1. OUTPUT FILE NAME
bliswOUT.TXT5ø…àV5P
@
2. SUMMARY OUTPUT FILE NAME
bliswSUMMARYOUT.TXTtaßé*ƒ`
3. EXTERNAL VELOCITY IN FILE FORT.11
4. VELOCITY PROFILE IN FILE FORT.12
5. VELOCITY PROFILE along Stream Line coordinate System in File fort.10
6. Shape Factor,Rtheta Reynolds number based on momentum
thickness along external strea, in File FORT.88
invalid number: incomprehensible list input
apparent state: unit 55 named blisw.inp
last format: list io
lately reading direct formatted external IO
Aborted (core dumped)

The strange thing is that the code has been compiled before (its from a book), and that executable works fine when I specify the input, its only when I compile the source code that I get this error. I have tried several compilers so far (unix environment, silverfrost, g77) and this same thing happens. Any help with this would be very appreciated, thank you.
 
Technology news on Phys.org
  • #2
It would help if you posted the code.
It would help if you posted the content of the input file ( blisw.inp ? )
 
  • #3
Hi Gsal,

The code and input can be found here: http://extras.springer.com/2004/978-3-540-20160-1/document/BLISW_stp3d

The program I am trying to compile is blisw.for, and the input is blisw.inp. Thanks.
 
  • #4
The code would never have worked properly in standard Fortran, except by good luck.

You could try adding
Code:
INPUT_NAME = " "
OUTPUT_NAME = " "
SUMMARY_NAME = " "
at the start of the program. That might get rid of the "junk" characters.
 
  • #5


Dear researcher,

Thank you for bringing this issue to my attention. It seems that there may be an issue with the input file or the way it is being read by the program. I suggest checking the input file for any unusual characters or formatting errors. Also, make sure that the input file is being read correctly by the program.

Additionally, I recommend checking the compiler options and ensuring that they are set correctly for the type of code you are trying to compile. It is possible that the errors and odd characters are a result of incorrect compiler settings.

If the issue persists, I suggest reaching out to the author of the book or the compiler's technical support for further assistance. It may also be helpful to consult with other scientists or programmers who have experience with FORTRAN and similar issues.

I hope this helps in resolving the problem. Best of luck with your research.

Sincerely,
 

Related to [FORTRAN] Strange Characters in output

1. What causes strange characters to appear in FORTRAN output?

Strange characters in FORTRAN output are usually caused by errors in the code, such as missing or incorrect formatting, invalid characters, or malfunctioning input/output statements. These errors can result in unexpected characters being printed in the output.

2. How can I fix the issue of strange characters in my FORTRAN output?

To fix the issue of strange characters in FORTRAN output, you should carefully review your code and check for any errors that may be causing the issue. Make sure that your code is properly formatted and all input/output statements are functioning correctly. You may also need to check for invalid characters that may be causing the issue.

3. Can strange characters in FORTRAN output affect the accuracy of my results?

In most cases, strange characters in FORTRAN output do not affect the accuracy of your results. These characters are usually just a visual issue and do not impact the underlying calculations. However, if the strange characters are caused by errors in the code, they may lead to incorrect results, so it is important to fix them.

4. Are there any tools or techniques to help identify and fix strange characters in FORTRAN output?

Yes, there are several tools and techniques that can help identify and fix strange characters in FORTRAN output. These include debugging tools, code review, and using standard input/output methods. Additionally, you can consult FORTRAN documentation or seek help from experienced programmers.

5. How can I prevent strange characters from appearing in my FORTRAN output in the future?

To prevent strange characters from appearing in your FORTRAN output, it is important to follow best practices for coding and debugging. This includes using proper formatting, using valid characters, and thoroughly testing your code before running it. It is also helpful to regularly review your code and address any potential issues that may cause strange characters to appear.

Similar threads

  • Programming and Computer Science
Replies
2
Views
1K
  • Programming and Computer Science
Replies
3
Views
914
  • Programming and Computer Science
Replies
3
Views
2K
  • Programming and Computer Science
Replies
6
Views
2K
  • Programming and Computer Science
Replies
5
Views
1K
  • Programming and Computer Science
2
Replies
59
Views
9K
  • Programming and Computer Science
Replies
1
Views
1K
  • Programming and Computer Science
Replies
4
Views
1K
  • Programming and Computer Science
Replies
2
Views
3K
  • Programming and Computer Science
Replies
1
Views
3K
Back
Top