XEXP fails in Gfortran 64 bit

20 views
Skip to first unread message

oph

unread,
Jun 26, 2023, 8:21:11 AM6/26/23
to dislin-users
I was updating a program that uses EXP LABELS for Y aXIS. I tried XEXP and FEXP, and as XEXP look nice, I adopted it. All with Gfortran 32 bit.

But when I tried Gfortran 64 bit, the screen is dark (no black) and the program aborts.
 
64 bit is required for sobe extra big files to plot.

Regards,
OPH. 2023-06-26 09:20

Helmut Michels

unread,
Jun 26, 2023, 9:59:53 AM6/26/23
to dislin-users
Hi,

I have made some tests with a simple axis scaling, but they do not reproduce the  XEXP and FEXP problem for GFortran 64-bit.
Can you post a short code with just an axis system that shows the program abort?

With best regards,

Helmut

oph

unread,
Jun 26, 2023, 4:38:57 PM6/26/23
to dislin-users
I tried but could not reproduce the error in a simple example. In the routine the
error still occurs, and as I said, FEXP works fine.

In my program I use TEXMOD to allow the user units such as Ohm (Omega) or
micro (mu). I thought that this might interfere with the multiplication sign, but
the problem is not there

I could not reproduce the error in simple case nor avoid it in the working
program...

For now I'll keep using EXP with the asterisk, meanwhile I'll keep trying to find the bug,
to find the error.

Regards,

OPH. 2023-06-26 17:38

oph

unread,
Jun 26, 2023, 7:16:00 PM6/26/23
to dislin-users
Well, I found were the program failed.

C
C TEST OF XEXP
C
      IMPLICIT REAL*8 (A-H,O-Z)
      CHARACTER*5 CAX,CAY,CAZ
      IXPOS=100
      IYPOS=2000
      IXLEN=2000
      CALL SETPAG ('DA4L')
      CALL METAFL ('XWIN')
      CALL DISINI
      CALL LABELS ('FLOAT','X')
C      CALL LABELS ('XEXP','Y')
      CALL LABELS ('FEXP','Y')
      CALL LABELS ('FLOAT','Z')
      CALL LABDIG(-1,'Y')
      CALL GETLAB(CAX,CAY,CAZ)
      WRITE(*,*)CAX,CAY,CAZ
      XINI=0.00D0
      XFIN=1.00D0
      REDX= 0.10D0
      YINI=0.00D0
      YFIN=1.0D8
      REDY=0.1D8
      CALL GRAF(XINI,XFIN,XINI,REDX,YINI,YFIN,YINI,REDY)
      CALL RLINE(XINI,YINI,XFIN,YFIN)
      CALL DISFIN
      STOP
      END

The CALL GETLAB (CAX,CAY,CAZ) fails for 'XEXP'. For the rest of possible formats it works,
but with 'XEXP' the program aborts with a error message (Intel compiler). Gfortran simply aborts without messages.

I suppresed  this CALL GETLAB, and the nice XEXP format for labels is OK.

Regards,

OPH. 2023-06-26 20:15

Helmut Michels

unread,
Jun 27, 2023, 5:20:37 AM6/27/23
to dislin-users
Hi,

thank you for the example code. I could reproduce the problem and will let you know when I have
corrected it.

With best regards,

Helmut

Helmut Michels

unread,
Jun 27, 2023, 8:43:42 AM6/27/23
to dislin-users
Hi,

yes, the bug happens in the routine GETLAB. The option 'XEXP' is added later to LABELS without updating
GETLAB, so that an index overflow caused the crash. Thank you for the hint and the example code.
I will fix the bug with the next update. A workaround is not to use GETLAB for the option 'XEXP', which you have
already done.  Since GETLAB is just a requesting routine, it's not absolutely necessary.

With best regards,

Helmut   
Reply all
Reply to author
Forward
0 new messages