3D matrix

3D matrix

How could I get my code to write a file displaying the data of a 3D matrix on two dimensions lets say H(i,j,k)-> only in function of H(i,k), I need to visualize the data as it should be located on the grid. Can this be done with the array visualizer.


9 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

So you want to plot H(i,j,k) where i and j vary and k is fixed?
AV can do this. Are you using Compaq Array Visualizer or Intel Array Visualizer?


I'm using Compaq Array Visualizer.

Actually, I should explain this better. I generate a .txt file with a fortran code which contains numerical data of a 3D grid domain (50x50x50). The array is H(i,j,k) so I get 125000 values all in a straight column. What I'm trying to figure out is how to display this data on a real picture. As you see the volume of data makes it impossible to go around and change things manually. I opened the file with the compaq visualizer I thought this was the solution of my problem but it won't read the txt file in 3D. It just reads the data on a 2D format cutting columns where it shouldn't etc.

In Compaq AV, to read three (or more) dimensional data from a text file, you need to add some header lines to the file to let AV know the exected dimensions of the array. For example:

#agl ascii data V1.0
#lang Fortran
#dim 50 50 50

Can you modify the fortran code that creates the text file to add these lines?


I applied the Command lines you suggested directly to the .txt file and It worked, at least for 3 or 4 samples I had run. I'm trying now with similar samples ( same dimensions etc) and the Array visualizer just freezes and it seems to be reading the file but it never stops. My computer has 785K and I don't think is a computer memory problem. Any ideas what could be happening.?

Most likely something in that file is causing the parsing code in CAV to go into an infinite loop.

If you could post the text file that's causing the problem I'll look into it.


This file is around 25000 kb with maximum compression it went down to 7000KB so I could not attached it to this message. I try a smaller sample an the AV read it well so Is this about computer memory.? or the AV capacity? This computer is a Pentium 4 with 785K on RAM. Is there a way to work this around?

Thank you


I wouldn't think it would be a memory issue, but I haven't tried importing any text files that big.

As a work-around, you could write a small Fortran or C program that reads the text file into an array and then creates an .agl file (i.e. faglSaveAsFile). The .agl file will be much faster to load in Array Viewer compared with a text file.


Leave a Comment

Please sign in to add a comment. Not a member? Join today