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.

from unix to linux

let1ch
Beginner
654 Views

Hi,
I'm trying to compile with ifc a program (f77), previously working just on unix machines (it's not a long time I use compilers).
With the options -O2 -Vaxlib -w -WB -o
I can compile all my subroutines except two external functions, for which I obtain the errors
"Error 294 : Function TOCMPLX has not been given a result value"
and
"Error 294 : Function TOIMAG has not been given a result value"
Those functions work well in unix (where I compile with
f77 -xO3 -xarch=v8 -dalign -o);
if I define a value for them, I can compile, but then the program runs without stopping and doesn't give results.
I could't find an option in the user guide to solve this problem, could someone help me?

0 Kudos
3 Replies
Steven_L_Intel1
Employee
654 Views
I doubt an "option" is going to help. You need to debug the program to find out what is going wrong. I find it curious that you were able to run successfully before with functions that never defined their values.

I also note that you use -WB which disables array bounds checking - if you get array bounds errors without -WB, I think that's trying to tell you something...

Steve
0 Kudos
TimP
Honored Contributor III
654 Views
According to your description, it's unlikely that your program would have worked with the usual Unix f77 compilers, most of which have a resemblance to g77.
Options which could be useful in pointing out further problems, where your program deviates from Fortran, include -g -C.
0 Kudos
david3
Beginner
654 Views

I got the same problem when compiling a few thousand fortran modules under hp-ux and two failed with this very error.

A workaround was to modify the program source so that it set a return value. (These two functions would have been type void in C).

So in the example above

TOCMPLX= 0

as the first command in the fortran would allow the Function TOCMPLX to compile (but maybe not to work correctly).
0 Kudos
Reply