Fortran runtime error cannot write to file opened for read




















Compared to the TSinflow runtime, this bug felt like my Fortran couldn't recognize this high-resolution VTK wind file. My classmate did not encounter this bug at runtime, probably because her version of GCC was different from mine. She uses gcc My next step is to try to upgrade GCC to 7. Thank you very much for your reply, please leave a comment if you want me to provide more information.

The problem is almost solved. In other words, there is no parallel computation for the wind turbine animated visualization file in the LES example. Helloczm , Thanks for the follow up! This indicates to me that there are issues with the GetNewUnit function when openmp is used. I'm suspicious two openmp threads are attempting to open files in rapid succession and either the GetNewUnit calls in each thread are unaware of each others handing out unit numbers, or both hit the code at the same time and hand out the same unit.

Dear andrew-platt Thank you for your reply! Expect better performance from FAST. Farm in the future! I expect to propose a solution for this soon as it is hampering my workflow. I chose to change the value from 15 to 0.

Skip to content. Star New issue. Jump to bottom. Bug report FAST. Labels FAST. Farm Type: Bug. Copy link. To Reproduce Steps to reproduce the behavior: Compile with 'gnu gcc Stack Overflow for Teams — Collaborate and share knowledge with a private group.

Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 5 years, 9 months ago. Active 4 years, 6 months ago. Viewed 2k times. Improve this question. Can you create a program which exhibits the same problem? Unit numbers are global, but my first question would be whether your calls are in the expected order. I cannot reproduce this. Please provide a complete program. To get the first line or 64 chars of it , use ' a '.

Without a compilable program we can't test it, please consider creating a minimal example of your issue. That's what I'd have guessed from the error message. You are trying to read from standard error. You must have some issue with the module variable going out of scope, but that is impossible to diagnose from this code fragment.

Try putting use mymod in your main program if its not there already. You should say your specific compiler version as well. Show 2 more comments. Active Oldest Votes. I have come across this error if you don't have the proper permissions set on the file. Improve this answer. Mogara Mogara 21 2 2 bronze badges. Add a comment. There is no need to explicitly pass it to the subroutine AlexanderVogt Yes, of course. But why would its value in that subroutine be the "10" from another one?

Is it? I think that it's getting initialized to whatever it does and it is not referring to the resource. Come to think of it -- it should be initialized at the module level, and its assignment in one routine can't affect the other?

With implicit none I meant good practice. But I tnink that it'd solve this, too.



0コメント

  • 1000 / 1000