Problem using nested type-bound procedures and coarrays

Problem using nested type-bound procedures and coarrays

Portrait de flying_hermes

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

Program Main
  
  use MyType_Module              ,only:  MyType
  implicit none
  
  type(MyType)  ,codimension[*] ::      CoVar
  
  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

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[*]  ,intent(in)  :: This
  write(*,"(6x,'[Sub1]:',i0,'/',i0,': Do nothing')") This_Image(),Num_Images()
End Subroutine
Subroutine Sub2( This )
  implicit none
  class(MyType)  ,codimension[*]  ,intent(in)  :: This
  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

The above code can be compiled with the following commands:

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

Thanks

Fichier attachéTaille
Téléchargement test-coarray.tar.gz731 octets
5 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.
Portrait de Annalee (Intel)

I have escalated this to the developers. The issue number is DPD200243988. I will keep you informed of any updates I receive.

Annalee

 

Portrait de Annalee (Intel)

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

Portrait de flying_hermes

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

Portrait de Steve Lionel (Intel)

September.

Steve

Connectez-vous pour laisser un commentaire.