[GRASS-user] m.eigensystem segfaults under Jaunty (beta)

Nikos Alexandris nikos.alexandris at felis.uni-freiburg.de
Tue Apr 21 20:05:48 EDT 2009


Nikos:
> > m.eigensystem, compiled against latest grass6_dev _AND_
> > grass-6.4.0RC4 source code, segfaults under Ubuntu-J 64-bit
> > Beta.


Hamish:
> perhaps you could compile into the fortran code some informative
> hints, e.g. put scatter some of these before and after reading
> the input values, etc:
> 
> ----8<----
>        PRINT *,"Made it past normalizing the data"
> ----8<----

So I did. Randomely I've introduced in main.f some PRINT lines (I
changed the text -- details below).

I get an error when I try to compile:

# attempt to compile after changes
make MODULE_TOPDIR=/geo/osgeo/src/grass6_devel

Makefile:20: warning: overriding commands for target
`/geo/osgeo/src/grass6_devel/dist.x86_64-unknown-linux-gnu/bin/m.eigensystem'
/geo/osgeo/src/grass6_devel//include/Make/Module.make:15: warning:
ignoring old commands for target
`/geo/osgeo/src/grass6_devel/dist.x86_64-unknown-linux-gnu/bin/m.eigensystem'
Makefile:27: warning: overriding commands for target `clean'
/geo/osgeo/src/grass6_devel//include/Make/Rules.make:72: warning:
ignoring old commands for target `clean'
f77   -c -o main.o main.f
   MAIN eigen:
Error on line 43: Declaration error declaration among executables
Error on line 44: Declaration error declaration among executables
Error on line 45: Declaration error declaration among executables
/usr/bin/f77: aborting compilation
make: *** [main.o] Error 25
# # # # # #

Probably I am not doing it right. Any help to (finally) debug this?

Nikos
---

svn diff
Index: main.f
===================================================================
--- main.f	(revision 36664)
+++ main.f	(working copy)
@@ -39,6 +39,7 @@
 C         of the eigen value (E). 
 
 C
+       PRINT *,"Starting the program..."
        DOUBLE PRECISION A(30,30),W1,W2,WR(30),WI(30),Z(30,30),FV1(30)
        DOUBLE PRECISION SUM1,SUM2
        INTEGER          IV1(30),N
@@ -51,9 +52,10 @@
 C      PRINT *,"N=",N
 
 C
+       PRINT *,"Before reading the matrix"
 C read the matrix
        READ(5,*,END=1000) (( A(I,J),J=1,N),I=1,N)
-
+       PRINT *,"Read the matrix"
 C
 C run the real-general eigen subroutine
        CALL RG(30,N,A,WR,WI,1,Z,IV1,FV1,IERR)
@@ -72,6 +74,7 @@
        WRITE(6,100) "E",WR(I),WI(I), W1/SUM1 * 100.0
 
 C
+       PRINT *,"Normalising the data"
 C Normalize the eigenvectors before printing
        SUM2 = 0.0
        DO 6 J=1,N
@@ -113,8 +116,8 @@
    36  CONTINUE
 
     2  CONTINUE
+       PRINT *,"Made it past normalizing the data"
 
-
 C
        CALL EXIT(0)
  1000  PRINT *,"Incomplete input file"



More information about the grass-user mailing list