Custom Query (541 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (19 - 21 of 541)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Ticket Resolution Summary Owner Reporter
#143 fixed Illegal tab characters in seismic_processing/rayloc_ew/robust_util.f somebody baker
Description

gfortran version 4.1.2 (CentOS 5.6 x86_64) build of seismic_processing/rayloc_ew fails with errors such as:

gfortran -m32 -g -O -ffixed-form -ffixed-line-length-132 -std=legacy -fd-lines-as-comments -fno-automatic -g  -c -o robust_util.o robust_util.f
 In file robust_util.f:862

      call delaz(olats,olatc,olons,olonc,slats,slatc,slons,slonc,
                                                                1
Error: Syntax error in argument list at (1)
 In file robust_util.f:863

       1   delta,azim)
      1
Error: Unclassifiable statement at (1)

This is because there are Fortran statements in seismic_processing/rayloc_ew/robust_util.f spanning multiple lines with a tab character instead of five spaces at the start of the continuation lines. This is not legal Fortran. There are nine instances where this occurs:

$ awk -F1 '( $1 == "\t" ){ print NR":"$0 }' seismic_processing/rayloc_ew/robust_util.f
863:	1			delta,azim)
1325:	1			delta,azim)
1404:	1			delta,azim)
1570:	1	 phcd1(i).eq.'P').and.dtdh1(i).gt.0.) then
1574:	1	 phcd1(i).eq.'Sn'.or.phcd1(i).eq.'S').and.dtdh1(i).gt.0.) then
1597:	1	 'Pn'.or.phcd1(j).eq.'P'.or.phcd1(j).eq.'Pdif'.or.
1611:	1	 'Sn'.or.phcd1(j).eq.'S') then
1690:	1		 abs(trvtim-travt(j)).lt.win(j)) then
1704:	1		 abs(trvtim-travt(j)).lt.win(j)) then

The fix is to replace the tab character at the start of each continuation line with five spaces.

#145 fixed Hypo71PC bug fixes and gfortran support somebody baker
Description

Attached is a diff -u output (- are removed lines, + are added lines) of the files I changed for Hypo71PC. Some changes were necessary to compile with gfortran. Two input format changes were required because of a bug in gfortran handling of Fortran Tn FORMAT items. I also found errors where Hypo71PC was referencing undefined variables.

The bugs in Hypo71PC I found are:

  • In geo_sp.f, line 636 references dist instead of dist2:
           dist2=dx*dx+dy*dy
-          if(dist.GT.prec2)GO TO 10
+          if(dist2.GT.prec2)GO TO 10
  • In hypo1m.f, line 491 WRITEs undefined variables Auto_Manuel and Fichier_Origine, which must first be declared as CHARACTER variables before line 158:
 	data is2/0/
+c These are undefined; what are they?                                   
+      CHARACTER*1 Auto_Manuel                                           
+      CHARACTER*6 Fichier_Origine                                       
 C-----------------------------------------------------------------------
       numer=0
+c These are undefined; what are they?                                   
+      Auto_Manuel = '?'                                                 
+      Fichier_Origine = '??????'                                        
       WRITE(8   ,'(i6,2i3,f5.2,i3,f6.2,i4,2f6.2,f5.1,f6.2,f5.2,2f5.1,5x,
  • In hypo1m.f, line 429 references undefined variable nobsp, line 541 references undefined variable nobss; they must be initialized before entering the DO loop at line 400:
+      nobsp = 0                                                         
+      nobss = 0                                                         
       DO No1=1,NRP
  • In hypo4.f, line 60 references undefined variable AMXI, which should have been moved with the other two lines before the IF statement at line 54:
       K=KLAS(JI)                                                        
+      AMXI=ABS(AMX(I))                                                  
       IF ((RAD2.LT.1.).OR.(RAD2.GT.360000.)) GO TO 30                   
  • In input1.f, line 219 references undefined variable VC. This is a remnant that was improperly left behind when support for a variable first layer was removed:
       IF (ISW .NE. '1   ') GO TO 200                                    
-  180 FLT(2,I)=DLY(2,I)*VC+D(2)                                         
+C From YTRV.F ----------------------------------------------------------
+      print *,'the variable first layer not implemented'
+      stop
+C 180 FLT(2,I)=DLY(2,I)*VC+D(2)                                         
 C------- INPUT CONTROL CARD --------------------------------------------
   200 WRITE(8,205)                                                      

The bugs in gfortran required the following changes:

  • In hypo1m.f, the READ statement at line 28 was changed to first read the input into the CARD character variable, then to use an internal READ of CARD:
       L=1                                                               
-   30 read(12,35,END=300)
+   30 read(12,'(A)',END=300) ICARD
+      read(ICARD,35)
      + MSTA(L),PRMK(L),W(L),JTIME,jz,JMIN(L),P(L),S(L)
      1,SRMK(L),WS(L),AMX(L),PRX(L),CALP,CALX(L),RMK(L),DT(L),FMP(L)     
-     2,AZRES(L),SYM(L),AS,ICARD,QRMK(L),IPRO                            
+     2,AZRES(L),SYM(L),AS,QRMK(L),IPRO                            
 	jtime=jtime*100+jz
    35 FORMAT(2A4,T8,F1.0,T10,I6,i2,I2,F5.2,T32,F5.2,A4,T40,F1.0,T44,F4.0   
-     1,F3.2,F4.1,T59,F4.1,A3,F5.2,F5.0,T21,A4,T7,A1,T32,A4,T1,A80       
-     2,T63,A1,T5,A4)                                                    
+     1,F3.2,F4.1,T59,F4.1,A3,F5.2,F5.0,T21,A4,T7,A1,T32,A4,T63,A1,T5,A4)                                                    
 	if(msta(l).eq.'$   ')then
  • In input1.f, the Tn tab FORMAT items were removed from the 4 FORMAT at line 61:
-    4 FORMAT(A4,T12, I2,T16,F9.4,A48)                                   
+    4 FORMAT(A4,7X,I2,2X,F9.4,A48)                                   

The rest of the changes in the attached Hypo71PC.diff file are to edit source lines that exceed 72 characters, which are too numerous to show here.

There are still several places where ftnchek found undefined variables being referenced in WRITE statements, for example. I did not try to fix those.

#146 fixed Mac OS X needs ld -search_paths_first option somebody baker
Description

gcc version 4.2.1 (Mac OS X 10.5.8) has an errors linking several programs, such as:

/Users/baker/bin/gcc -m32 -D_MACOSX -D_INTEL -D_USE_PTHREADS -D_USE_SCHED -I/Users/baker/Desktop/Software/Earthworm/earthworm-7.5svn/include -I./ -o /Users/baker/Desktop/Software/Earthworm/earthworm-7
.5svn/bin/reftek2ew main.o hbeat.o init.o notify.o params.o scn.o send.o terminate.o samprate.o /Users/baker/Desktop/Software/Earthworm/earthworm-7.5svn/lib/transport.o /Users/baker/Desktop/Software/E
arthworm/earthworm-7.5svn/lib/getutil.o /Users/baker/Desktop/Software/Earthworm/earthworm-7.5svn/lib/kom.o /Users/baker/Desktop/Software/Earthworm/earthworm-7.5svn/lib/logit.o /Users/baker/Desktop/Sof
tware/Earthworm/earthworm-7.5svn/lib/sema_ew.o /Users/baker/Desktop/Software/Earthworm/earthworm-7.5svn/lib/sleep_ew.o /Users/baker/Desktop/Software/Earthworm/earthworm-7.5svn/lib/time_ew.o /Users/bak
er/Desktop/Software/Earthworm/earthworm-7.5svn/lib/threads_ew.o -L./lib -lrtp -lreftek -lutil -lm -lpthread
Undefined symbols:
  "_util_sswap", referenced from:
      _reftek_dt in libreftek.a(dt.o)
<snip>

The reason is -lutil in the link step. By default, Mac OS X searches all the library directories in the link step for a matching shared library before searching again for a static library. The operating system libutil.dylib matches -lutil, even though it is the wrong library. Thus, the definitions in Earthworm libutil.a are neve found, resulting in the "Undefined symbols" errors.

The fix is to define LDFLAGS in ew_macosx_intel.sh:

export GLOBALFLAGS="-m32 -D_MACOSX -D_INTEL -D_USE_PTHREADS -D_USE_SCHED -I${EW_HOME}/${EW_VERSION}/include"

# Mac OS X searches for shared libraries before static libraries.  Thus, -L<ours> -lutil finds the system libutil.dylib
# before our libutil.a, which causes undefined references in the link step because it is using the wrong library.  The
# ld -search_paths_first option forces ld to search each directory first for a matching library, instead of all directories
# first for a shared library.
# Note: this is the form to pass -search_paths_first to ld when $(CC) is the linker command in makefile.ux
export LDFLAGS=-Wl,-search_paths_first

# for intel Mac OS X I only found gfortran to work on 10.4.X with the hyp2000 modules, get it from http://hpc.sourceforge.net

and modify the link step in the following makefile.ux's:

  • data_sources/nq2ring/makefile.ux
nq2ring: $(OBJS); \
        $(CC) $(LDFLAGS) -o $(B)/nq2ring $(OBJS) $(EW_LIBS) -L$(QLIB_DIR) -lqlib2nl -lutil  -lpthread -lm
  • data_sources/q2ew/makefile.ux (also, remove Paul F's libutil.a hack)
# IGD 2006/11/16 Note that we use qlib2nl: no-leap-seconds version of Qlib2
q2ew: $(OBJS); \
	$(CC) $(LDFLAGS) $(CFLAGS) -o $(B)/q2ew $(OBJS) $(EW_LIBS) -L$(QLIB_DIR) -L$(COMSERV_LIB) -lqlib2nl -lutil  -lpthread -lm
  • data_sources/reftek2ew/makefile.ux
reftek2ew: $O
	$(CC) $(LDFLAGS) $(CFLAGS) -o $B/reftek2ew $O -L$(RTPLDIR) -lrtp -lreftek -lutil -lm -lpthread
  • reporting/nq2gif/makefile.ux
# IGD 2006/11/16 Note that we use qlib2nl: no-leap-seconds version of Qlib2
nq2gif: $(OBJS); \
        $(CC) $(LDFLAGS) $(CFLAGS) -o $(B)/nq2gif $(OBJS) $(EW_LIBS) -L$(QLIB_DIR) -lqlib2nl -lutil  -lpthread -lm
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Note: See TracQuery for help on using queries.