Fortran Freezes While Compiling

I am trying to compile two different codes distributed by NASA. It is written in fortran 77 and I am trying to compile it on Sun Solaris 10 . The first source distribution begines compiling fine. The library of functions develops appropriatly until it gets to one of the subroutines that it needs to compile. At that point, it just freezes. It does'nt return control to the command line, it just stops comiling and stays where it's at. Any ideas? The second set of code says that there is a "bad leaf",what is this? Thanks.

ECD

[542 byte] By [ecdiggita] at [2007-11-26 23:54:13]
# 1
Which version of the compiler are you using? Can you cut and paste the "bad leaf" error message? Can you cut and paste the compilation command?
igba at 2007-7-11 15:36:06 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2

I am using the most recent fortran compiler released with Solaris Workshop. It is a fortran 95 compiler. (There might be a problem that the code I am compiling is written in fortran77). Anywho.

For program 1, I get the following: (includes some info before the error occurs)

NOTICE: Invoking /opt/SUNWspro/bin/f90 -f77 -c -fast -ftrap=%none -xtarget=generic //export/home/ins3d2.1b/src/ilusolF.f

//export/home/ins3d2.1b/src/ilusolF.f:

ilusol:

iluindini:

iluindex:

ilusol4:

ilusol1:

iluini4:

iluini1:

compiler(iropt) error: leaf_lookup_expr: bad leaf (tag=0)

*** Error code 1

make: Fatal error: Command failed for target `//export/home/ins3d2.1b/lib/ins3d.dp.a(//export/home/ins3d2.1b/src/ilusol.o)'

Current working directory /export/home/ins3d2.1b/src

*** Error code 1

make: Fatal error: Command failed for target `sun_dp_lib'

The second code does this:

//export/home/ins2d2.2c/src/metricF.f:

metric:

metric2:

metric3:

timemet:

and then it just stops linking. It does not return control to the command line. It just sits there like that.

Thanks again.

ecdiggita at 2007-7-11 15:36:06 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3

> I am using the most recent fortran compiler released

> with Solaris Workshop. It is a fortran 95 compiler.

What is the output when you type "f95 -V"?

> (There might be a problem that the code I am

> compiling is written in fortran77). Anywho.

That shouldn't cause any problems.

> For program 1, I get the following: (includes some

> info before the error occurs)

>

>

> NOTICE: Invoking /opt/SUNWspro/bin/f90 -f77 -c

> -fast -ftrap=%none -xtarget=generic

What happens if you compile without optimization?

> The second code does this:

>

>//export/home/ins2d2.2c/src/metricF.f:

>metric:

>metric2:

>metric3:

>timemet:

> en it just stops linking. It does not return control

> to the command line. It just sits there like that.

Sometimes the optimizer takes a very long time to finish compiling a file. If you run prstat in another window while the compiler is sitting there, does it show "iropt" , "cg", "ir2hf" or "ube" consuming a lot of CPU time?

Iain

igba at 2007-7-11 15:36:06 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 4

The output of f95 -V is:

# f95 -V

f95: Sun Fortran 95 8.2 2005/10/13

Usage: f95 [ options ] files. Use 'f95 -flags' for details

How do I compile without optimization? Sorry, I am very new to the non windows platforms.

Yes, it shows iropt consuming a lot of CPU time.

ECD

Message was edited by:

ecdiggit

ecdiggita at 2007-7-11 15:36:06 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 5

You can compile without optimization by removing the "-fast" flag from the compilation command. (Of course, the code will not run as fast when compiled without optimization. This is just a way to find the source of the problem. If it compiles correctly without optimization, then you can try using "-O1". If that works, then try "-O2", and so on.)

The "bad leaf" error message indicates an internal compiler error. So far as I know, this is not an error that has been reported before. Is there a way for us to get access to the source code?

igba at 2007-7-11 15:36:06 > top of Java-index,Development Tools,Solaris and Linux Development Tools...