Giter Club home page Giter Club logo

Comments (6)

cseppan avatar cseppan commented on July 30, 2024

Training data package with SMOKE 5.0 executables
/proj/ie/proj/SMOKE/training/smoke_training_20231003.tar.gz

from smoke.

hnqtran avatar hnqtran commented on July 30, 2024

Garbage binary also found in smoke report files. e.g. $REP_ROOT/inv/rep_rwc_2018gg_18j_inv_state.txt

from smoke.

hnqtran avatar hnqtran commented on July 30, 2024

No garbage found in smkinven_rwc_2018gg_18j.log if SMOKE was compiled with gfortran.

However, there was array out-of-bound issue in variable OUTDNAM( RPT_%NUMDATA, RCNT ) occurred in subroutine WRREPHDR (src/smqa/wrrephdr.f) when SMOKE was compiled with gfortran.

When SMOKE is compiled with gfortran, segmentation fault occurred and point back to this error

At line 1900 of file /proj/ie/proj/SMOKE/htran/SMOKE_DEV/src/emqa/wrrephdr.f 
Fortran runtime error: Index '20' of dimension 1 of array 'outdnam' above upper bound of 19 
Error termination. Backtrace: 
#0  0x46a061 in ??? 
#1  0x45a848 in ??? 
#2  0x4036ec in ??? 
#3  0x14d1c9451d84 in ??? 
#4  0x40374d in ??? 
#5  0xffffffffffffffff in ??? 
0.196u 0.018s 0:00.38 52.6% 0+0k 22064+56io 102pf+0w 

Code snip set with new line inserted for debuging:

 write(*,*)"HTdbg: ", "STIDX=",STIDX,"EDIDX=",EDIDX 
            DO J = STIDX, EDIDX 
                    write(*,*)"HTdbg: ", "J=",J,";",OUTDNAM( J,RCNT ) 
                    IF( RPT_%RPTMODE .EQ. 3 ) THEN 
                        L2 = LEN_TRIM( HEADERS( IHDRDATA ) ) 
                        W1 = MAX( NLEFT, W1, L2 ) 
                    ELSE 
                        L2 = LEN_TRIM( OUTDNAM( J,RCNT ) ) 
                        W1  = MAX( NLEFT, W1, L2, LN ) 
                    END IF 
           END DO 

Such error did not occur if SMOKE was compiled with ifort, which just assign garbage value to OUTDNAME untill it is filled

HTdbg: SIZE(OUTDNAM)          19 
HTdbg: STIDX=           1 EDIDX=          77 
HTdbg: J=           1 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=           2 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=           3 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=           4 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=           5 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=           6 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=           7 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=           8 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=           9 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          10 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          11 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          12 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          13 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          14 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          15 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          16 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          17 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          18 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          19 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          20 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          21 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          22 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          23 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          24 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          25 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          26 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          27 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          28 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          29 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          30 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          31 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          32 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          33 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          34 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          35 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          36 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          37 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          38 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          39 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          40 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          41 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          42 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          43 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          44 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          45 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          46 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          47 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          48 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          49 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          50 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          51 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          52 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          53 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          54 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          55 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          56 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          57 ;^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 
HTdbg: J=          58 ;PM2_5 
HTdbg: J=          59 ;PAL 
HTdbg: J=          60 ;PCA 
HTdbg: J=          61 ;PCL 
HTdbg: J=          62 ;PEC 
HTdbg: J=          63 ;PFE 
HTdbg: J=          64 ;PH2O 
HTdbg: J=          65 ;PK 
HTdbg: J=          66 ;PMG 
HTdbg: J=          67 ;PMN 
HTdbg: J=          68 ;PMOTHR 
HTdbg: J=          69 ;PNA 
HTdbg: J=          70 ;PNCOM 
HTdbg: J=          71 ;PNH4 
HTdbg: J=          72 ;PNO3 
HTdbg: J=          73 ;POC 
HTdbg: J=          74 ;PSI 
HTdbg: J=          75 ;PSO4 
HTdbg: J=          76 ;PTI 
HTdbg: J=          77 ;PM2_5 

gcc.smkinven_rwc_2018gg_18j.log

from smoke.

hnqtran avatar hnqtran commented on July 30, 2024

Update: ifortran would pick up out-of-bound error if SMOKE was compiled with "-check bounds" flag.
In SMOKE/src/Makeinclude

EFLAG = -extend-source 132 -zero -static-intel -debug -check bounds # Intel Fortran

from smoke.

hnqtran avatar hnqtran commented on July 30, 2024

Fixed by modified $IOAPI_HOME/ioapi/m3err.F

Original code block:

        IF ( FATAL ) THEN
            CALL M3EXIT( CALLER, JDATE, JTIME, MSGTXT, 2 )
        ELSE    !  not endflag
            CALL M3WARN( CALLER, JDATE, JTIME, MSGTXT )
        END IF

Modified code block:

        INTEGER         L

        L = LEN_TRIM( MSGTXT )
        IF ( FATAL ) THEN
            CALL M3EXIT( CALLER, JDATE, JTIME, MSGTXT(1:L), 2 )
        ELSE    !  not endflag
            CALL M3WARN( CALLER, JDATE, JTIME, MSGTXT(1:L) )
        END IF

Re-compile both IOAPI and SMOKE to take the fix into effect.

from smoke.

cjcoats avatar cjcoats commented on July 30, 2024

^@ is the normal text-representation of ASCII-NULL. This log-output looks like something coming from a C-language subroutine or something, where calloc() fills the entire allocated array with NULLs rather than something from Fortran, where the Standard says that strings are always filled or padded with ACII blanks (and so that the TRIM() in M3EXIT and M3WARN works correctly -- which it doesn't with NULL-padded strings). So this is a programmer-error somewhere upstream of these calls.

And probably coming from C programmer who does not know how to correctly interface with Fortran, in spite of the fact that there are numerous examples of that in the I/O API ;-(

NOTE: M3ERR was declared OBSOLETE for I/O API Prototype 0.5 in July 1992, and has remained obsolete since. Do not use it !!!

from smoke.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.