Hi there,
I got a source code from the following link:
http://x004.psycm.uwcm.ac.uk/~peter/aligator.f
After replacing dreal with dble, the code can be compiled successfully
using gfortran. however, the executable program can not be run in
Winodws XP. A pop up window said that "Not A Valid Win32 Application?"
What's wrong with the code?
Any suggestions and comments will be really appreciated. Thanks in advance.
Best regards,
Jinsong
|
|
0
|
|
|
|
Reply
|
jszhao (77)
|
5/24/2012 6:12:38 AM |
|
On 5/24/2012 1:12 AM, Jinsong Zhao wrote:
> Hi there,
>
> I got a source code from the following link:
>
> http://x004.psycm.uwcm.ac.uk/~peter/aligator.f
>
> After replacing dreal with dble, the code can be compiled successfully
> using gfortran. however, the executable program can not be run in
> Winodws XP. A pop up window said that "Not A Valid Win32 Application?"
> What's wrong with the code?
>
> Any suggestions and comments will be really appreciated. Thanks in advance.
>
> Best regards,
> Jinsong
>
fyi:
looking at the binary generated code on windows, I see this
near the top
"This program cannot be run in DOS mode"
I did gfortran aligator.f
compiled with cygwin under windows 7, gfortran 4.5.3
I do not know what all this means. Just thought to mention it.
--Nasser
|
|
0
|
|
|
|
Reply
|
Nasser
|
5/24/2012 9:11:07 AM
|
|
On 5/24/2012 2:12 AM, Jinsong Zhao wrote:
> Hi there,
>
> I got a source code from the following link:
>
> http://x004.psycm.uwcm.ac.uk/~peter/aligator.f
>
> After replacing dreal with dble, the code can be compiled successfully
> using gfortran. however, the executable program can not be run in
> Winodws XP. A pop up window said that "Not A Valid Win32 Application?"
> What's wrong with the code?
>
> Any suggestions and comments will be really appreciated. Thanks in advance.
>
> Best regards,
> Jinsong
>
The data size exceeds the limit for static objects on Windows. For
Windows, you would need to make the big arrays allocatable, if you are
trying to make use of the /3GB boot switch of XP32, and you still may
need X64 if you aren't willing to trim the size.
The code looks like minimum trial and error modification of an IBM360
legacy application for some f77 with more than usual IBM extensions.
We can't guess which of many Windows versions of gfortran you may be
using, but all Windows Fortrans I know of share the 2GB limitation on
static data+code.
--
Tim Prince
|
|
0
|
|
|
|
Reply
|
tprince8714 (291)
|
5/24/2012 11:22:57 AM
|
|
On 2012-05-24 7:11 PM, Nasser M. Abbasi wrote:
....
> fyi:
>
> looking at the binary generated code on windows, I see this
> near the top
>
> "This program cannot be run in DOS mode"
That's normal - you'll probably find most of your Windows executables
have that. It is part of a small DOS compatible stub program at the
front of the windows executable proper that advises people that they are
trying to run the exe on the wrong OS or OS subsystem.
|
|
0
|
|
|
|
Reply
|
ian_harvey (217)
|
5/24/2012 11:36:51 AM
|
|
On 24/05/2012 12:22, timprince wrote:
> On 5/24/2012 2:12 AM, Jinsong Zhao wrote:
>> Hi there,
>>
>> I got a source code from the following link:
>>
>> http://x004.psycm.uwcm.ac.uk/~peter/aligator.f
>>
>> After replacing dreal with dble, the code can be compiled successfully
>> using gfortran. however, the executable program can not be run in
>> Winodws XP. A pop up window said that "Not A Valid Win32 Application?"
>> What's wrong with the code?
>>
>> Any suggestions and comments will be really appreciated. Thanks in
>> advance.
>>
>> Best regards,
>> Jinsong
>>
> The data size exceeds the limit for static objects on Windows. For
> Windows, you would need to make the big arrays allocatable, if you are
> trying to make use of the /3GB boot switch of XP32, and you still may
> need X64 if you aren't willing to trim the size.
> The code looks like minimum trial and error modification of an IBM360
> legacy application for some f77 with more than usual IBM extensions.
> We can't guess which of many Windows versions of gfortran you may be
> using, but all Windows Fortrans I know of share the 2GB limitation on
> static data+code.
>
.... and on Win7 - 64 bit with Intel Fortran I get
LINK : fatal error LNK1248: image size (B3510000) exceeds maximum
allowable size (80000000)
Simon
|
|
0
|
|
|
|
Reply
|
simon9085 (164)
|
5/24/2012 11:36:58 AM
|
|
On 2012-05-24 19:22, timprince wrote:
> On 5/24/2012 2:12 AM, Jinsong Zhao wrote:
>> Hi there,
>>
>> I got a source code from the following link:
>>
>> http://x004.psycm.uwcm.ac.uk/~peter/aligator.f
>>
>> After replacing dreal with dble, the code can be compiled successfully
>> using gfortran. however, the executable program can not be run in
>> Winodws XP. A pop up window said that "Not A Valid Win32 Application?"
>> What's wrong with the code?
>>
>> Any suggestions and comments will be really appreciated. Thanks in
>> advance.
>>
>> Best regards,
>> Jinsong
>>
> The data size exceeds the limit for static objects on Windows. For
> Windows, you would need to make the big arrays allocatable, if you are
> trying to make use of the /3GB boot switch of XP32, and you still may
> need X64 if you aren't willing to trim the size.
> The code looks like minimum trial and error modification of an IBM360
> legacy application for some f77 with more than usual IBM extensions.
> We can't guess which of many Windows versions of gfortran you may be
> using, but all Windows Fortrans I know of share the 2GB limitation on
> static data+code.
>
Thank you very much. It must be the reason for my problem. What should I
do next? Use allocatable array?
Thanks again.
Regards,
Jinsong
|
|
0
|
|
|
|
Reply
|
jszhao (77)
|
5/24/2012 11:46:43 AM
|
|
"Jinsong Zhao" <jszhao@yeah.net> wrote in message
news:jpl732$27f$1@dont-email.me...
> On 2012-05-24 19:22, timprince wrote:
>> On 5/24/2012 2:12 AM, Jinsong Zhao wrote:
>>> Hi there,
>>> I got a source code from the following link:
>>> http://x004.psycm.uwcm.ac.uk/~peter/aligator.f
>>> After replacing dreal with dble, the code can be compiled successfully
>>> using gfortran. however, the executable program can not be run in
>>> Winodws XP. A pop up window said that "Not A Valid Win32 Application?"
>>> What's wrong with the code?
>>> Any suggestions and comments will be really appreciated. Thanks in
>>> advance.
>> The data size exceeds the limit for static objects on Windows. For
>> Windows, you would need to make the big arrays allocatable, if you are
>> trying to make use of the /3GB boot switch of XP32, and you still may
>> need X64 if you aren't willing to trim the size.
>> The code looks like minimum trial and error modification of an IBM360
>> legacy application for some f77 with more than usual IBM extensions.
>> We can't guess which of many Windows versions of gfortran you may be
>> using, but all Windows Fortrans I know of share the 2GB limitation on
>> static data+code.
> Thank you very much. It must be the reason for my problem. What should I
> do next? Use allocatable array?
On gfortran for Windows you must:
1) Make array KSCO allocatable
2) Use 64-bit version of the compiler
The 32-bit version yields the error:
Operating system error: No such file or directory
Allocation would exceed memory limit
When attempting to allocate array KSCO.
--
write(*,*) transfer((/17.392111325966148d0,6.5794487871554595D-85, &
6.0134700243160014d-154/),(/'x'/)); end
|
|
0
|
|
|
|
Reply
|
not_valid (1681)
|
5/24/2012 2:36:19 PM
|
|
"James Van Buskirk" wrote in message news:jplh16$1d2$1@dont-email.me...
On gfortran for Windows you must:
1) Make array KSCO allocatable
2) Use 64-bit version of the compiler
----------------------------------------------------------
There are other large arrays around.
A less-recoding fix may be to place some/all the largish arrays into one or
several common blocks (rather than making them allocatable, and even though
the common blocks would not be used elsewhere). It looks as if all the
arrays follow the standard implied data-typing, so that it might just be
necessary to replace "INTEGER" by "COMMON", etc.. Of course, if the OP wants
to make extensive use/developments of the code, working out the required
sizes of the arrays and allocating them after this would be the place to go
(eventually).
|
|
0
|
|
|
|
Reply
|
dajhawk (6)
|
5/24/2012 8:55:42 PM
|
|
timprince <tprince@computer.org> writes:
> We can't guess which of many Windows versions of gfortran you may be
> using, but all Windows Fortrans I know of share the 2GB limitation on
> static data+code.
Even the 64-bit ones?
|
|
0
|
|
|
|
Reply
|
tholen (16649)
|
6/17/2012 1:20:40 AM
|
|
On 2012-06-17 11:20 AM, tholen@antispam.ham wrote:
> timprince<tprince@computer.org> writes:
>
>> We can't guess which of many Windows versions of gfortran you may be
>> using, but all Windows Fortrans I know of share the 2GB limitation on
>> static data+code.
>
> Even the 64-bit ones?
Yep. That limit is (at least) in the executable file format.
|
|
0
|
|
|
|
Reply
|
ian_harvey (217)
|
6/17/2012 8:05:52 PM
|
|
|
9 Replies
141 Views
(page loaded in 0.125 seconds)
|