- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello all,
When I define a derived type and try to broadcast an (coarray) array of this type I get the following message,
rank 7 in job 1 cfds_42600 caused collective abort of all ranks
exit status of rank 7: killed by signal 9
if:
1. the extend of the array of derived types is greater than a certain number (around n=600000, see code below)
2. another component is added to the derived type, in the code I have added an extra real to the derived type
uncommenting the line produced the same message
3. the extend of the array component of the type is changed(say to 40)
The following code works fine. In order to reproduce the message above you should make one of the previously
listed changes(or all). Please try it and let me know how the code worked for you.
[fortran]module my_struct
type struct
!real(kind(0.d0)), dimension(3) :: re ! <- Remove comment from this line, the message appears
integer, dimension(2) :: in ! <- Change size from 2 to 40, the message appears
end type struct
interface assignment (=)
module procedure equal_struct
end interface
contains
elemental subroutine equal_struct(st1,st2)
type(struct), intent(inout) :: st1
type(struct), intent(in) :: st2
st1%in = st2%in
end subroutine equal_struct
end module my_struct
program coarrays_transfer_struct
use my_struct
implicit none
integer :: i, n=400000 ! change n to 700000, the message appears
type(struct), dimension(:), allocatable :: st
type(struct), dimension(:), codimension[:],allocatable :: cost ! <- Both allocatable
!type(struct), dimension(400000), codimension :: cost ! and "explicit" fail
character(5) :: fc
allocate(cost(n) )
if (this_image() == 1) then
allocate(st(n))
do i=1,n
st(i)%in = i
end do
cost=st
print *, ' Broadcasting ...'
end if
if (this_image()/=1) cost=cost[1]
print *, this_image(), 'Done'
sync all
write(fc,'(i5)'), this_image()
open(this_image(),file='ts'//trim(adjustl(fc))//'.txt')
do i=1,n
write(this_image(),*) cost(i)%in
end do
end program coarrays_transfer_struct[/fortran]
Thank you ! I really appreciate your help!
Kostas
PS:
shared-memory
ifort version 12.1.5
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It was naive of me.. changing the stacks works fine !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
that is good to know. it is easy to forget the stack size, especially when some batch systems toss out your env vars at dispatch. so many little details to look after.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page