- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am asking your help because I have a problem when I try to make a programm written on linux work on windows. This program was written with fortran 77.
Compilation and build are successful and I have the .exe file. But when I test it if it works well, problems begin.
When I execute with MS DOS, I have this message:
forrtl: severe (408): fort: (2): Subscript # 1 of the array P value Has 4 WHICH IS Greater Than the upper bound of 3
(fort is the input file in which the program is supposed to read.)
I tried to spot the error and I found that I have in a header the following line:
COMMON/COM07 / PPRO (0:3), RPRO (4)
this line meant that when I finished filling the table PPRO it starts filling rpro. and therefore in the following subroutine:
DO 2 J = 0,7
2 PPRO (J) = P (J)
was going very well on linux. On windows this is no longer the case. Please why not spend more? And what could I do?
thanks.
I am asking your help because I have a problem when I try to make a programm written on linux work on windows. This program was written with fortran 77.
Compilation and build are successful and I have the .exe file. But when I test it if it works well, problems begin.
When I execute with MS DOS, I have this message:
forrtl: severe (408): fort: (2): Subscript # 1 of the array P value Has 4 WHICH IS Greater Than the upper bound of 3
(fort is the input file in which the program is supposed to read.)
I tried to spot the error and I found that I have in a header the following line:
COMMON/COM07 / PPRO (0:3), RPRO (4)
this line meant that when I finished filling the table PPRO it starts filling rpro. and therefore in the following subroutine:
DO 2 J = 0,7
2 PPRO (J) = P (J)
was going very well on linux. On windows this is no longer the case. Please why not spend more? And what could I do?
thanks.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is a rather nasty practice dating from earlier decades. Common, but nasty nonetheless.
I guess you are using the debug configuration on Windows? In that case array bound checking is turned
on by default (or at least it happens to be turned on) and then you can not do this.
Remedies:
- Scanthe source code for this type of constructions and properly fill each array
(The most recommendable solution, but it may be a great effort to correct everything)
- Turn off the array bound checking - this is a compile option.
Regards,
Arjen
I guess you are using the debug configuration on Windows? In that case array bound checking is turned
on by default (or at least it happens to be turned on) and then you can not do this.
Remedies:
- Scanthe source code for this type of constructions and properly fill each array
(The most recommendable solution, but it may be a great effort to correct everything)
- Turn off the array bound checking - this is a compile option.
Regards,
Arjen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page