-1

I am running a fortran code. The code has no pauses nor any switches that ask user to do anything. It should run beginning to end with no stops. This is a code that has a big outer loop and several OpenMP inner loops. The only thing I output are the index of the bigger outer loop so that I can know where the code is.

The code usually runs with no problems. However, the last two times I run it, the code stopped with no error (I know that because the cores usage started being 0%). However if I press enter in the console the code resumes normally.

So my question, is there any way to pause a fortran code at run time without having an explicit pause on the code?

phdstudent
  • 1,060
  • 20
  • 41
  • Which OS? windows? In the later case maybe a selection in the terminal window which is blocking further output and the selection is removed with the . – albert Aug 25 '17 at 13:37
  • Yes. Windows. Let me try to do that and see if that's it. – phdstudent Aug 25 '17 at 14:35

1 Answers1

0

Do you have any READ statements in your program? They'd pause the terminal if they're waiting for input.

For example, the following program looks like it's pausing in the middle of the loop. Pressing enter allows it to continue.

integer i
do i = 1, 10
  if (i == 5) read(*, *) 
  print *, i
end do
end

Perhaps you or someone else added a READ for debugging purposes and forgot to remove it?

Rafik Zurob
  • 361
  • 2
  • 6