About 'error stop' statement

Angelo Graziosi angelo.graziosi@alice.it
Mon Aug 7 06:40:00 GMT 2017


Ciao Damian,

I am afraid but I never used OpenCoarrays and that kind of programming..

Does this test case

$ cat foo.f90
program foo
   implicit none
   print *, 'Hello...'
   error stop
   print *, '..world!'
end program foo

use coarrays? Why should 'error stop' flag that there was a segfault and 
memory corruption? reread my OP...

For what I can see, some changes between 5.x and >= 6.x cause this. When 
I used 5.x on MSYS2/MINGW32/MINGW64 on Windows or on OSX (aka macOS) or 
on GNU/Linux Mint, there only was the output of example (4) in my OP.

In any case, now I am returning to the old STOP statement...

Thanks,
  Angelo.

Il 07/08/2017 02:06, Damian Rouson ha scritto:
> Hi Angelo,
> 
> I agree that the seg fault is confusing.  Because you’re using gfortran 5.4 in the Windows Subsystem for Linux, I’m guessing you used the OpenCoarrays windows-install.sh installs.  If you have no need for multi-image execution, then switching to STOP might be the easiest solution for you.
> 
> If you do want multi-image execution, then it would be really helpful to the OpenCoarrays project if you could research and share how to install a newer version of the OpenCoarrays prerequisites.  That would reduce the number of versions that need to be supported by OpenCoarrays contributors, who are all volunteers or contractors working on specific pre-assigned tasks.  I wrote the OpenCoarrays windows-install.sh script and I’d be glad to update it to install a newer gfortran if someone can explain the steps.  The results of my attempts are described in OpenCoarrays issue 227.  Building MPICH and CMake failed.  Unfortunately, MPICH no longer supports Windows.
> 
> Damian
> On August 6, 2017 at 8:53:34 AM, Anton Shterenlikht (mexas@bris.ac.uk) wrote:
> 
>>From angelo.graziosi@alice.it Sun Aug 6 16:21:15 2017  
>>   
>> Really I consider this very misleading, maybe I have to replace the new
>> "error stop" with the old 'stop' statement.
> 
> STOP and ERROR STOP are designed for different situations.
> They behave in different ways.
> So you need to decide what behaviour you need
> and use an appropriate statement.
> It is normal for coarray codes to use STOP
> in some places and ERROR STOP in others.
> 
> Anton
> 



More information about the Fortran mailing list