- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
% ifort -v
Version 8.1
sometimes statements like:
X%bin_tot=X%bin
or :
X%bin_tot(X%indx:X%finx,X%indy:X%finy,:,:,:) = X%bin
hang (w/o error) at runtime.
Replacing w/ explicit loops as below runs fine.
do m=1,size(X%bin,5)
do l=1,size(X%bin,4)
do k=1,size(X%bin,3)
do j=X%indy,X%finy
do i=X%indx,X%finx
X%bin_tot(i,j,k,l,m)=X%bin(i,j,k,l,m)
end do
end do
end do
end do
end do
I think this has some dependance on the sparcity of the multidimensionals arrays (ie. intermedial dimensions of length 1).
Optimization flags don't seem to make a difference. Very frustating.
Brad
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I doubt it hangs. It just may be taking a long time, especially if the arrays are large and your system is low on physical memory. Your explicit loop code isn't quite the same as Fortran semantics for array assignment which requires that the right side be completely evaluated first. When you're assigning components, the compiler is less able to know whether or not there is overlap and it may be creating temporary copies.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Serious hang actually. No movement for 12+ hours (run before leaving the office for the day) vs. less-than-seconds.
Memory is not a problem as I'm only tieing up a few percent of total available with small test cases.
Specifics: last 3 dimensions of RHS are identical to LHS. Special case is where both sides are of identical size (so I tried the bin_tot=bin line). Even this fails. General case is where several RHS are placed into the LHS to build a total output space.
Things work fine no matter the construct when only first and last dimensions have length and 1,2,5. 1,3,5 fails w/o explicit loop.
I didn't understand some of your comments. Are you refering to loop order?
Cheers-
Brad
Memory is not a problem as I'm only tieing up a few percent of total available with small test cases.
Specifics: last 3 dimensions of RHS are identical to LHS. Special case is where both sides are of identical size (so I tried the bin_tot=bin line). Even this fails. General case is where several RHS are placed into the LHS to build a total output space.
Things work fine no matter the construct when only first and last dimensions have length and 1,2,5. 1,3,5 fails w/o explicit loop.
I didn't understand some of your comments. Are you refering to loop order?
Cheers-
Brad
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