CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   Windows EXE file and Linux (http://www.cfd-online.com/Forums/main/8235-windows-exe-file-linux.html)

MING October 20, 2004 12:48

Windows EXE file and Linux
 
Since I can't find a good solution for the "stack overflow" problem when I run my Fortran program in Windows enviroment. I turn to the Linux according to Steve's suggestion. Then I encounter new trouble. To be honest, I am almost a layman to the Linux system. I don't know how to run windows EXE files in the Linux enviroment. Who can help me? Many many thanks!!! Oh, steve, how to set the stack limit in linux? Could u please detail this?

ag October 20, 2004 14:36

Re: Windows EXE file and Linux
 
Generally speaking you can't run Windows executable under another operating system (this holds true for any operating system). With regards to your stack overflow problem, you might look and see if you are allocating memory for your variables off the heap or the stack. The heap space will be much larger and should be used when possible, but requires an explicit allocate (at least in F90) in the subroutine. Getting your variables out of the stack space may help with your stack overflow problem.

steve October 21, 2004 09:14

Re: Windows EXE file and Linux
 
I agree with what ag said. I thought that you could get data out of stack space by putting it in named commons. The other possibility is to "malloc" it (in c-speak) or do some dynamic allocation in f77 or f90. You can't run a window exe in linux. You need a linux compiler and you need to rebuild it.

Steve October 22, 2004 04:45

Re: Windows EXE file and Linux
 
Stack problems in FORTRAN? Simply put, you need to force your variables to be on the heap rather than the stack. Any instance of a big array declared (without SAVE or COMMON) in a subroutine will cause stack problems in FORTRAN.

- Steve (a different one)

MING October 22, 2004 05:31

Re: Windows EXE file and Linux
 
Great idea! I mmanage to solve this problem now. THANK YOU VERY MUCH!!!!!

By the way, in Linux, windows applications can be run. it provides a command named 'wine' which forms a mimic windows enviroment.


All times are GMT -4. The time now is 09:25.