×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Deallocation error?

Deallocation error?

Deallocation error?

(OP)
Ok, those are two questions.

First one: have anybody here already got an deallocation error (maybe with ifort 8.1)? I'm using it, and in a program with a hell of variables, I just tracked down an "forrtl: severe (174): SIGSEGV, segmentation fault occurred" error to the deallocation of a 4-dimensional array which is allocated. The funny part is that this is to be deallocated together with 2 others, that are properly deallocated, no messages, but doesn't matter the ordering, the program fails to deallocate THE ONE array. ;) Have anyone got this sort of error? What was the cause? How did you go around it?

Second: I would like to use an "minloc" intrinsic on a vector (1D array) to get the position of its minimum value. No problem there, it gives me that, but as an array of one single position. What would be a good way to turn it on an integer? I'm looking for something less disgusting than an ugly use of "sum(minloc(vector))", which was the horroble way around I found. Any clues?

Thanks a lot in advance for any help on these issues. ;)

RE: Deallocation error?

I've only used a 4D array once.  The only thing I can think of are arrays going out of bounds in one of the dimensions and somehow clobbering the descriptors of some of the others.

A quick fix to see if this is the problem is to increase each dimension by 1.  If it goes away, that might the problem.  The difficult part is finding out where it is.

Re: minloc.  Doesn't this work?

CODE

lowestindex = minloc (array)
See http://publib.boulder.ibm.com/infocenter/pseries/index.jsp?topic=/com.ibm.xlf91a.doc/xlflr/minloc.htm for an example

RE: Deallocation error?

(OP)
Hi xwb!

Well, nfortunatelly, at this time it can't be the bounds of the array. Cause it's not making sense, since I'm not trying to access a positon out of the bounds, neither trying to "write" something in the array but out of it's bounds. The thing that goes wrong, and is absolutelly nonsense, is just a "deallocate(sdfs)". Here, at least for what I know, bounds should not interfeer. :(

minloc: no, unfortunatelly that doesn't work. Cause "lowestindex" is an integer, while "minloc(array) = /integer/"... :(

So, I did the most non-sense thing ever:
"lowestindex = sum(minloc(array))"...  :P  Horroble.

Well, thanks a lot in advance for anything. ;)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close