Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29412 Discussions

Deallocating memory fortran (newbie question)

breno_a_
Beginner
1,014 Views

Guys, I think it is a newbie question, but I can't find it anywhere.

I notice that the function WRRRN() uses a lot of RAM. I want to know how to avoid or dealloc the memory (I don't even know if it is possible).
Here is my code:
do i = 1, 10000
    do j = 1, 10000
          call wrrrn ('x', 3, 1, x, 3, 0)
    end do
end do

The simple fact of showing the values of the matrix x, just increases a lot the used memory. I try to clear the strings from the terminal using this:
call system ('cls') but it doesn't work. I'm using the old microsoft developer studio fortran powerstation 95. Could it be a compiler problem?

Thanks in advice
 

0 Kudos
3 Replies
andrew_4619
Honored Contributor III
1,014 Views

What is using the ram, your application or the terminal window buffering the output? What OS are you running?

0 Kudos
breno_a_
Beginner
1,014 Views

Hello!

I think is not the terminal buffering because the memory usage increases disproportionately. Printing a 3x3 matrix increases 1MB for each iteration. I think the problem is with the wrrrn() itself. I'm using windows 7 ultimate.

0 Kudos
Steven_L_Intel1
Employee
1,014 Views

WRRRN is an IMSL routine, though it's written in Fortran. There's nothing you can do about any memory being allocated here - it isn't screen buffer memory. Of course, you're using a 16+ year old product that is long, long unsupported.

0 Kudos
Reply