- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm having some problems with a deried-type coarray and type-bound procedure.
What I'm basically trying to do
I've defined a derived-type coarray which has 2 type-bound procedures (Sub1 and Sub2), one (Sub2) calling the other (Sub1).
When I'm calling the Sub2, a segmentation fault error.
The code is given below, and it is also attached
[fortran]
Program Main
use MyType_Module ,only: MyType
implicit none
type(MyType) ,codimension
write(*,"(2x,'[Main]:',i0,'/',i0,': Starting')") This_Image(),Num_Images()
write(*,"(2x,'[Main]:',i0,'/',i0,': Calling CoVar%Sub1')") This_Image(),Num_Images()
call CoVar%Sub1()
write(*,"(2x,'[Main]:',i0,'/',i0,': Calling CoVar%Sub2')") This_Image(),Num_Images()
call CoVar%Sub2()
End Program
[/fortran]
[fortran]
Module MyType_Module
implicit none
private
public :: MyType
Type :: MyType
contains
procedure :: Sub1
procedure :: Sub2
End Type
contains
Subroutine Sub1( This )
implicit none
class(MyType) ,codimension
write(*,"(6x,'[Sub1]:',i0,'/',i0,': Do nothing')") This_Image(),Num_Images()
End Subroutine
Subroutine Sub2( This )
implicit none
class(MyType) ,codimension
write(*,"(4x,'[Sub2]:',i0,'/',i0,': Calling This%Sub1')") This_Image(),Num_Images()
call This%Sub1()
write(*,"(4x,'[Sub2]:',i0,'/',i0,': Exiting')")
End Subroutine
End Module
[/fortran]
The above code can be compiled with the following commands:
[bash]ifort -coarray -coarray-num-images=2 -c mytype_module.f90 -o mytype_module.o
ifort -coarray -coarray-num-images=2 -c main.f90 -o main.o
ifort -coarray -coarray-num-images=2 main.o mytype_module.o -o a.out[/bash]
Thanks
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have escalated this to the developers. The issue number is DPD200243988. I will keep you informed of any updates I receive.
Annalee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A fix has been found for this issue. We are currently planning to include it in the next major release which is currently scheduled for later this year.
Annalee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
This error is still present in ifort version 13.1.3.
Any idea when the next major release you are mentioning will be available ?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
September.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page