Hello!

I have PGI Visual Fortran 2010 (11.3), on Windows 7 64-Bit. I’m using the 32-bit command shell, because on the 64-bit version I got errors like (after a successfully compilation)

filename.obj : error LNK2001: unresolved external symbols .STATICS2

filename.exe : fatal error LNK1120: 1 unresolved externals

I don’t know why it happens, buy actually I can run CUDA Fortran code on 32 Bit command shell.

Ok my question is about two versions of the same program: Fortran and CUDA Fortran, both of them read a text file from disk and save results on 3 text files, the programs should to get the same results and I use MATLAB for result’s comparison (visual and numerical) the variables on the text files are matrices, their sizes depends of 2 integer parameters (mc and wfl) like this:

! 8000/wfl is always and integer

REAL, DIMENSION(8000/wfl,mc) :: cracks, ratiok, POF

The weird problem is, the number of columns depends of mc and in the Fortran version I ALWAYS got 3 columns, the rows number get increase and the product is always the same, for example:

wfl=10 and mc=90

cracks SHOULD BE: (800,90)

I got when import the text file to MATLAB: (24000,3)

I compile the Fortran code with gfortran on linux and the text files have **ALWAYS** the correct size

In CUDA Fortran is similar the situation, using wfl=10 and mc=32, the table should be (800,32) instead of that I got (6400,4). Always 4 columns!

In both cases (Fortran and CUDA Fortran) the total number of elements is always the same (8000/wfl)*mc

I don’t know what’s wrong, why is this happening? I need the correct sizes on text files to keep working on MATLAB, please help.

Thanks