Menu

#33 FGD trace dump is screwed up

v1.0 (example)
closed
nobody
None
4
2019-11-16
2013-04-19
seismick
No

FGD does a trace header dump of 100 traces. As it dumps too many headers to fit in 132 columns, it does 2 groups of headers.
The first group I call headers 2 to 59 is mostly coordinates. The second group I call 7 to 47 is mostly grid locations and shotpoints.
The first (2-59) is not aligned with the annotation. The second group (7-47) is aligned. On closer examination it is actually dumping
the headers 2-59 twice, so that is why it does not match the annotation which is for 7-47.
fgd.f90 uses some of the routines in tdmp.f90 for this, and I do not know which source file has the bug.

Discussion

  • seismick

    seismick - 2013-04-19
    • priority: 5 --> 4
     
  • Joe Rathoon

    Joe Rathoon - 2015-09-05

    FGD is innocent. I blame and shame TDMP. FGD calls TDMP twice. A job with 2 TDMP processes has the same symptoms. The output is repeated using parameters of the second call to TDMP.
    Now TDMP used to work 5 years ago! Why? The comments in tdmp.f90 of 2011/6/9 note:
    "Removed fortran I/O and replaced with cpsio"
    Well, Fortran creates different filenames for scratch files. Now there is a fixed filename for the scratch file. So the scratch file is overwritten, then copied twice to stdout in wrapup phase. So we need distinct filenames. It also appears the getlun() for dump_lun was commented out. The bug can be patched by opening the scratch files like this:
    Replace these lines:

      ! attempt to get logical unit for temporary dump file
      !call getlun(obj%dump_lun, status)
      status=0
    
      if (status == 0) then
         status=cpsio_open('.tdmp_tmp','w+',obj%dump_lun,.true.)
    

    with these:

      ! attempt to get logical unit for temporary dump file
      call getlun(obj%dump_lun, status)
      call string_ii2cc(obj%dump_lun,lunc)       ! for distinct filenames
      if (status == 0) then
         status=cpsio_open('.tdmp_tmp'//TRIM(lunc),'w+',obj%dump_lun,.true.)
    

    The above is in the subroutine tdmp_update between the execute_only comments. Also need to declare "lunc" as character(LEN=3).
    After editing tdmp.f90, make icps then make cfe.
    And rejoice, TDMP and FGD will dump headers properly again.

     
  • seismick

    seismick - 2019-11-16

    This was fixed years ago and can be closed.

     
  • Bill Menger

    Bill Menger - 2019-11-16
    • status: open --> closed
    • Group: --> v1.0 (example)
     

Log in to post a comment.

MongoDB Logo MongoDB