Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

compiler error I belive

diedro
Beginner
589 Views
hi everyone,

I don't know why but a strange error it's heppening to me:
I have same vector and I want to join then in only one vector. Some of then are empty.
The code that I use is:
[bash]                    jar = [mc(ipc-1,jpc-1   ,1:nmc(ipc-1,jpc-1)), &
                           mc(ipc  ,jpc-1   ,1:nmc(ipc  ,jpc-1)), &
                           mc(ipc+1,jpc-1   ,1:nmc(ipc+1,jpc-1)), &
                           mc(ipc-1,jpc     ,1:nmc(ipc-1,jpc  )), &
                           mc(ipc  ,jpc     ,1:nmc(ipc,  jpc  )), &
                           mc(ipc+1,jpc     ,1:nmc(ipc+1,jpc  )), &
                           mc(ipc-1,jpc+1   ,1:nmc(ipc-1,jpc+1)), &
                           mc(ipc+1,jpc+1   ,1:nmc(ipc+1,jpc+1)), &
                           mc(ipc-1,jpc+1   ,1:nmc(ipc-1,jpc+1))][/bash]
if I do not print anything to video I get:
1 2 3
4 14 15
16 17 27
28 29 30
40 41 42
43 5 6
7 8 9
18 19 20
21 22 31
32 33 34
35 44 45
46 47 48
57 58 59
60 61 70
71 72 73
74 83 84
85 86 87
96 97 98
99 100 109
110 111 112
113 140733822102032 57
58 59 60
61 70 71
72 73 74
83 84 85
86 87 96
97 98 99
however I print a video:
[bash]write(*,*) mc(ipc-1,jpc-1   ,1:nmc(ipc-1,jpc-1))
!           write(*,*) '...............'
!           write(*,*) mc(ipc  ,jpc-1   ,1:nmc(ipc  ,jpc-1))
!           write(*,*) '...............'
!           write(*,*) mc(ipc+1,jpc-1   ,1:nmc(ipc+1,jpc-1))
!           write(*,*) '...............'
!           write(*,*) mc(ipc-1,jpc     ,1:nmc(ipc-1,jpc  ))
!           write(*,*) '...............'
!           write(*,*) mc(ipc  ,jpc     ,1:nmc(ipc,  jpc  ))
!           write(*,*) '...............'
!           write(*,*) mc(ipc+1,jpc     ,1:nmc(ipc+1,jpc  ))
!           write(*,*) '...............'
!           write(*,*) mc(ipc-1,jpc+1   ,1:nmc(ipc-1,jpc+1))
!           write(*,*) '...............'
!           write(*,*) mc(ipc+1,jpc+1   ,1:nmc(ipc+1,jpc+1))
!           write(*,*) '...............'
!           write(*,*) mc(ipc-1,jpc+1   ,1:nmc(ipc-1,jpc+1))[/bash]
I get:
1 2 3
4 14 15
16 17 27
28 29 30
40 41 42
43 5 6
7 8 9
18 19 20
21 22 31
32 33 34
35 44 45
46 47 48
57 58 59
60 61 70
71 72 73
74 83 84
85 86 87
96 97 98
99 100 109
110 111 112
113 34 57
58 59 60
61 70 71
72 73 74
83 84 85
86 87 96
97 98 99
Why? I only print to video some data?
It os a compiler error or it is a my error?
If it is mine what is the error?
0 Kudos
2 Replies
mecej4
Honored Contributor III
589 Views
The information that you have provided is far too scanty and ambiguous to make any assertions about the error. You have not shown the array declarations, and statements that assign values to the variables that you display.

How can you say that "I get ..." when you do not have any output statements? Did you look at the array using a debugger?

Which compiler are you using? 32 bit or 64 bit? Which operating system?
0 Kudos
diedro
Beginner
589 Views
you are absolutely right
I use the debugger and I find an error.
I apologyase with every one
0 Kudos
Reply