Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Running CVF executable in unix

jyanke
Beginner
1,355 Views

I am trying to find a way to compile with compaq visual fortran version 6.6b so that the executable will run in a unix environment. The way I had things set up, I would compile in cvf for debugging purposes. When the code was running as I wanted it to, I would copy all the source code to a unix based cluster. The cluster has its own fortran compiler. I would compile the source code using this compiler, and then submit the executable to be run on the cluster. This worked great until recently the unix based compiler was updated. The code will still compile on the unix based compiler, but for some reason when it is run on the cluster, it outputs garbage. So, to avoid tracking down the old compiler/ figuring out why the new compiler doesn't like my code, I would like to find a way to compile with CVF so that the executable can be run on a unix machine. Any suggestions on how this can be done or where to look for more info would be greatly appreciated,

Thanks

0 Kudos
4 Replies
Steven_L_Intel1
Employee
1,355 Views
It's not possible. Sorry.
0 Kudos
joerg_kuthe
Novice
1,355 Views
Try to run your app using 'wine' (this windows emulation is available on Linux, maybe on your Unix system too).

Joerg Kuthe
www.qtsoftware.de


0 Kudos
grtoro
Beginner
1,355 Views

Here is a wild guess: CVF uses static storage by default (I hope I am using the right terminology; I have not looked at these issues in a while).AFAIK, most unix compilers do not.

The main consequences of static storage are, as follows:

--The program initializes all variables to 0.

--Local variables in subroutines retain their values between calls

--Something similar happens with common blocks, but I do not remeber the rules.

It is generally easy to force this behavior in the unix compiler by using a compliation switch. I am afraid you will have to read the documentation.

Good luck!

0 Kudos
Steven_L_Intel1
Employee
1,355 Views
It is true that CVF defaults to using static storage for local variables, but this does not necessarily mean zero initialization. It is more likely that variables with be zero by default but not guaranteed. Intel Fortran (on all platforms) defaults to static storage only for arrays and structures, but not scalar local variables, so you can see differences if your program is incorrect. Try the option /Qsave on Intel Visual Fortran if you want to mimic CVF's behavior here.
0 Kudos
Reply