[comp.text] METAFONT Trap test fails on MIPS. Help!

gm@keysec.kse.com (Greg McGary) (01/09/90)

MF 1.7 from the UNIX-TeX distribution fails the trap test on a MIPS b.
I'll give a brief report here, and if some kind soul would like more of the
gory details, I'll give a complete report via mail.

The compiler version:
    cc -V reveals that all compiler comonents are:
	MIPS cmplrs 2.0 (from RISC/os 4.00)

    I compiled with `-signed -systype bsd43'.  By default the MIPS compiler does
    easy optimizations.  I forcibly turned all optimizations off with `-O0' but
    it made no difference.

The first (`trapin') phase completed successfully.

The second (`trap') phase bombed.
A summary of the most disturbing things I noticed in my trap run were
the following:

    ! Too far to shift.
    (There's unbounded black in character shipped out!)
    ! METAFONT capacity exceeded, sorry [main memory size=3001].

The `capacity exceeded' condition occurred only about 10% into the run.

Thanks in advance for your assistance.

-- Greg McGary
-- Key Systems Engineering
-- Work: (703) 742-7870  Home: (703) 352-0407
-- gm@kse.com, gm@cs.duke.edu, ..!uunet!keysec!gm

Here's the (abbreviated) context diff:

*** SAVEtrap.log	Tue Jan  9 05:50:03 1990
--- trap.log	Tue Jan  9 06:55:38 1990
***************
*** 1584,1593 ****
  {(picture)shifted((-4095,4092))}
  {-(3)}
  {(picture)shifted((-3,0))}
  >> Edge structure at line 75:
! row 4094: -4094+ -4093- -4094+ -4093- |
! row 4093: -4094+ -4093- -4094+ -4093- |
! row 4092: -4095+ -4092- -4093+ -4094- |
  
  {-(4095)}
  {(picture)shifted((4089,-4095))}
--- 1584,1602 ----
  {(picture)shifted((-4095,4092))}
  {-(3)}
  {(picture)shifted((-3,0))}
+ ! Too far to shift.
+ <to be read again> 
+                    ,
+ l.75 ...95,4092) shifted (-3,0),
+                                 
+ I can't shift the picture as requested---it would
+ make some coordinates too large or too small.
+ Proceed, and I'll omit the transformation.
+ 
  >> Edge structure at line 75:
! row 4094: -4091+ -4090- -4091+ -4090- |
! row 4093: -4091+ -4090- -4091+ -4090- |
! row 4092: -4092+ -4089- -4090+ -4091- |
  
  {-(4095)}
  {(picture)shifted((4089,-4095))}
***************
*** 1767,1782 ****
  @ transition line 0, from (4095.49998,1) to (4095.49998,1)
  @ transition line 1, from (4095.49998,1) to (-4095.49998,0)
  @ transition line 2, from (-4095.49998,0) to (-4095.49998,0)
! (4095,1)(0,1)
  @ Octant SSW (1 offset), from (-4095.49998,0) to (-4095.49998,-1)
  @ transition line 2, from (-4095.49998,0) to (-4095.49998,0)
  @ transition line 1, from (-4095.49998,0) to (-4095.49998,-1)
! (0,0)(-4095,0)
  @ Octant SSE (0 offsets), from (-4095.49998,-1) to (-4095.49998,-1)
  @ transition line 0, from (-4095.49998,-1) to (-4095.49998,-1)
  @ Octant ESE (0 offsets), from (-4095.49998,-1) to (-4095.49998,-1)
  @ transition line 1, from (-4095.49998,-1) to (-4095.49998,-1)
! (-4095,-1).
  
  {show}
  >> Edge structure at line 81:
--- 1776,1791 ----
  @ transition line 0, from (4095.49998,1) to (4095.49998,1)
  @ transition line 1, from (4095.49998,1) to (-4095.49998,0)
  @ transition line 2, from (-4095.49998,0) to (-4095.49998,0)
! ?(0,1)
  @ Octant SSW (1 offset), from (-4095.49998,0) to (-4095.49998,-1)
  @ transition line 2, from (-4095.49998,0) to (-4095.49998,0)
  @ transition line 1, from (-4095.49998,0) to (-4095.49998,-1)
! ?(-4095,1)
  @ Octant SSE (0 offsets), from (-4095.49998,-1) to (-4095.49998,-1)
  @ transition line 0, from (-4095.49998,-1) to (-4095.49998,-1)
  @ Octant ESE (0 offsets), from (-4095.49998,-1) to (-4095.49998,-1)
  @ transition line 1, from (-4095.49998,-1) to (-4095.49998,-1)
! (-4095,0).
  
  {show}
  >> Edge structure at line 81:
***************
*** 1801,1807 ****
  
  {showstats}
  Memory usage 1066&170 (765 still untouched)
! String usage 18&67 (1011&12034 still untouched)
  {addto}
  {(path)yscaled(0.01666)}
  Path at line 82, before subdivision into octants:
--- 1810,1816 ----
  
  {showstats}
  Memory usage 1066&170 (765 still untouched)
! String usage 18&67 (1011&12035 still untouched)
  {addto}
  {(path)yscaled(0.01666)}
  Path at line 82, before subdivision into octants:
***************
*** 1900,1906 ****
   & cycle
  
  Tracing edges at line 83: (weight 2)
! (2,0)(2,1)(4,1)(4,2)(4,1)(2,1)(2,0).
  
  {tracingspecs:=0}
  Path at line 84, before choices:
--- 1909,1915 ----
   & cycle
  
  Tracing edges at line 83: (weight 2)
! (2,0)(2,1)(4,1)(4,2)(3,2)(3,1)(1,1)(1,0).
  
  {tracingspecs:=0}
  Path at line 84, before choices:
***************
*** 1994,2000 ****
  @ transition line 1, from (999.1545,9.3455) to (999.1545,9.3455)
  @ Octant NNW (0 offsets), from (999.1545,9.3455) to (999,10.5)
  @ transition line 0, from (999.1545,9.3455) to (999.1545,9.3455)
! (1003,9)(999,9)(999,11).
  
  Tracing edges at line 86: (weight 1)
  @ Octant SSE (0 offsets), from (999,10.5) to (999.15451,9.34549)
--- 2003,2009 ----
  @ transition line 1, from (999.1545,9.3455) to (999.1545,9.3455)
  @ Octant NNW (0 offsets), from (999.1545,9.3455) to (999,10.5)
  @ transition line 0, from (999.1545,9.3455) to (999.1545,9.3455)
! (1003,9)(999,9)(999,10).
  
  Tracing edges at line 86: (weight 1)
  @ Octant SSE (0 offsets), from (999,10.5) to (999.15451,9.34549)
***************
*** 2009,2014 ****
--- 2018,2024 ----
  (999,9)(1003,9)
  @ Octant NNW (0 offsets), from (1003,10.5) to (1002.84549,11.65451)
  @ transition line 0, from (1003,10.5) to (1003,10.5)
+ !
  @ Octant WNW (0 offsets), from (1002.84549,11.65451) to (1001,12)
  @ transition line 1, from (1001,12) to (1001,12)
  @ Octant WSW (0 offsets), from (1001,12) to (999.1545,11.6545)
***************
*** 2031,2049 ****
  (999,11)
  @ Octant ESE (0 offsets), from (1001,12) to (1002.61804,11.42705)
  @ transition line 1, from (1002.61804,11.42705) to (1002.61804,11.42705)
! (999,12)(1003,12)
  @ Octant SSE (0 offsets), from (1002.61804,11.42705) to (1003,10.5)
  @ transition line 0, from (1002.61804,11.42705) to (1002.61804,11.42705)
  @ Octant SSW (0 offsets), from (1003,10.5) to (1002.61803,9.57294)
  @ transition line 1, from (1002.61803,9.57294) to (1002.61803,9.57294)
  @ Octant WSW (0 offsets), from (1002.61803,9.57294) to (1001,9)
  @ transition line 0, from (1002.61803,9.57294) to (1002.61803,9.57294)
  @ Octant WNW (0 offsets), from (1001,9) to (999.38196,9.57295)
  @ transition line 1, from (999.38196,9.57295) to (999.38196,9.57295)
! (1003,9)(999,9)
  @ Octant NNW (0 offsets), from (999.38196,9.57295) to (999,10.5)
  @ transition line 0, from (999.38196,9.57295) to (999.38196,9.57295)
! (999,11).
  
  {restoring autorounding=2}
  {endgroup}
--- 2041,2061 ----
  (999,11)
  @ Octant ESE (0 offsets), from (1001,12) to (1002.61804,11.42705)
  @ transition line 1, from (1002.61804,11.42705) to (1002.61804,11.42705)
! ?(1002,12)
  @ Octant SSE (0 offsets), from (1002.61804,11.42705) to (1003,10.5)
  @ transition line 0, from (1002.61804,11.42705) to (1002.61804,11.42705)
  @ Octant SSW (0 offsets), from (1003,10.5) to (1002.61803,9.57294)
  @ transition line 1, from (1002.61803,9.57294) to (1002.61803,9.57294)
+ ?(1003,12)
  @ Octant WSW (0 offsets), from (1002.61803,9.57294) to (1001,9)
  @ transition line 0, from (1002.61803,9.57294) to (1002.61803,9.57294)
+ !(1003,11)
  @ Octant WNW (0 offsets), from (1001,9) to (999.38196,9.57295)
  @ transition line 1, from (999.38196,9.57295) to (999.38196,9.57295)
! ?(999,10)
  @ Octant NNW (0 offsets), from (999.38196,9.57295) to (999,10.5)
  @ transition line 0, from (999.38196,9.57295) to (999.38196,9.57295)
! (999,10).
  
  {restoring autorounding=2}
  {endgroup}
***************
*** 2059,2071 ****
  {(6)*(-1)}
  {(picture)shifted((0,-6))}
  {(picture)+(picture)}
! [5.-14]
  Edge structure at line 88 (just shipped out):
! row 11: | 998- 998+ 998++ 1002-- 1002- 1002+
! row 10: | 998- 998+ 998++ 1002-- 1002- 1002+
  row 9: | 998- 998+ 998++ 1002-- 1002- 1002+
! row 5: | 998- 998+ 998++ 1002-- 1002- 1002+
! row 4: | 998- 998+ 998++ 1002-- 1002- 1002+
  row 3: | 998- 998+ 998++ 1002-- 1002- 1002+
  row 2: | 3+ 3+ 3+ 3+ 4- 4- 4- 4-
  row 1: | -1+ -1+ 0- 0- 1+ 2- 3+ 3+ 3+ 3+ 4- 4- 4- 4-
--- 2071,2085 ----
  {(6)*(-1)}
  {(picture)shifted((0,-6))}
  {(picture)+(picture)}
! [5.-14
! (There's unbounded black in character shipped out!)
! (There's unbounded black in character shipped out!)]
  Edge structure at line 88 (just shipped out):
! row 11: | 998- 998+ 998++ 1001-- 1002- 1002+
! row 10: | 998+ 1002-- 1002- 1002- 1002+
  row 9: | 998- 998+ 998++ 1002-- 1002- 1002+
! row 5: | 998- 998+ 998++ 1001-- 1002- 1002+
! row 4: | 998+ 1002-- 1002- 1002- 1002+
  row 3: | 998- 998+ 998++ 1002-- 1002- 1002+
  row 2: | 3+ 3+ 3+ 3+ 4- 4- 4- 4-
  row 1: | -1+ -1+ 0- 0- 1+ 2- 3+ 3+ 3+ 3+ 4- 4- 4- 4-
***************
*** 2116,4162 ****
   ..(0,2)
  
  Tracing edges at line 91: (weight 1)
! (-3071,0)(-3071,1)(-1024,1)(-1024,2)(-1024,1)(-3071,1)(-3071,0).
  
  {show}
  {-(90)}
  {(picture)rotated(-90)}
! >> Edge structure at line 91:
  
! <... about 2000 lines of stuff that only appears in SAVEtrap.log ...>
--- 2130,2151 ----
   ..(0,2)
  
  Tracing edges at line 91: (weight 1)
! (-3071,0)(-3071,1)(-1024,1)(-1024,2)(-1024,1)(-3072,1)(-3072,0).
  
  {show}
  {-(90)}
  {(picture)rotated(-90)}
! ! METAFONT capacity exceeded, sorry [main memory size=3001].
! l.91 ...,2); show e3 rotated-90,
!                                  (e0+e0) rotated90$ rotated90;
! If you really absolutely need more capacity,
! you can ask a wizard to enlarge me.
  
!  
! Here is how much of METAFONT's memory you used:
!  20 strings out of 1029
!  71 string characters out of 12088
!  3001 words of memory out of 3001
!  267 symbolic tokens out of 2100
!  4i,42n,8r,6p,105b stack positions out of 30i,100n,300r,150p,500b
! Output written on trap.72270gf (2 characters, 248 bytes).

-- 
-- Greg McGary
-- Key Systems Engineering
-- Work: (703) 742-7870  Home: (703) 352-0407
-- gm@kse.com, gm@cs.duke.edu, ..!uunet!keysec!gm

lgy@blake.acs.washington.edu (Laurence Yaffe) (01/10/90)

In article <1990Jan9.125234.3893@keysec.kse.com> gm@keysec.kse.com (Greg McGary) writes:
>MF 1.7 from the UNIX-TeX distribution fails the trap test on a MIPS b.
>I'll give a brief report here, and if some kind soul would like more of the
>gory details, I'll give a complete report via mail.

>-- Greg McGary
>-- Key Systems Engineering
>-- Work: (703) 742-7870  Home: (703) 352-0407
>-- gm@kse.com, gm@cs.duke.edu, ..!uunet!keysec!gm

    I've built both TeX and Metafont using MIPS' 2.0 compilers and had
them successfully pass the TRIP and TRAP tests.  In 'site.h', I use:

	#define SYSV
	#undef  BSD
	#undef  ANSI
	typedef signed char schar;

The 'signed char' in the last typedef is cruical.  I've tried using both
#define SYSV (and /bin/cc) and #define BSD (and /bsd43/bin/cc) - both worked
when optimization no greater than -O1 was used.  Using -O2 breaks something
in both TeX and Metafont.  I've sent MIPS a bug report about this many months
ago, but never heard whether the problem has been found.  Hope this helps.

-- 
Laurence G. Yaffe		Internet: lgy@newton.phys.washington.edu
University of Washington	  Bitnet: yaffe@uwaphast.bitnet

rudy@mips.COM (Rudy Wang) (01/10/90)

In article <5273@blake.acs.washington.edu> lgy@newton.phys.washington.edu (Laurence Yaffe) writes:
>In article <1990Jan9.125234.3893@keysec.kse.com> gm@keysec.kse.com (Greg McGary) writes:
>>MF 1.7 from the UNIX-TeX distribution fails the trap test on a MIPS b.
>>I'll give a brief report here, and if some kind soul would like more of the
>>gory details, I'll give a complete report via mail.
>
>>-- Greg McGary
>>-- Key Systems Engineering
>>-- Work: (703) 742-7870  Home: (703) 352-0407
>>-- gm@kse.com, gm@cs.duke.edu, ..!uunet!keysec!gm
>
>    I've built both TeX and Metafont using MIPS' 2.0 compilers and had
>them successfully pass the TRIP and TRAP tests.  In 'site.h', I use:
>
>	#define SYSV
>	#undef  BSD
>	#undef  ANSI
>	typedef signed char schar;
>
>The 'signed char' in the last typedef is cruical.  I've tried using both
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>#define SYSV (and /bin/cc) and #define BSD (and /bsd43/bin/cc) - both worked
>when optimization no greater than -O1 was used.  Using -O2 breaks something
>in both TeX and Metafont.  I've sent MIPS a bug report about this many months
>ago, but never heard whether the problem has been found.  Hope this helps.
>
>-- 
>Laurence G. Yaffe		Internet: lgy@newton.phys.washington.edu
>University of Washington	  Bitnet: yaffe@uwaphast.bitnet


I'm sure most programmer don't like to read man pages, specially when
the it gets to be 20 screenfuls.  But if you actually picked your way
through the zillion cc options, you'll for sure come upon the following:

	-signed  Cause all cahr declarations to be "signed char"
		 declarations, the default is to treat them as
		 "unsigned char" declarations.

This may or may not cure your problems, but I believe it should relieve
the pain of typedef'ing "schar" and change all your "char"s to "schar"s.
-- 
UUCP:	{ames,decwrl,prls,pyramid}!mips!rudy	(or rudy@mips.com)
DDD:	408-991-0247 Rudy Wang			(or 408-720-1700, Ext. 247)
USPS:	MIPS Computer Systems, 930 Arques, Sunnyvale, CA 94086-3650
Quote:	I think they're for 1 AM - Descartes, about his midnight snacks

TOMASIC@RICEVM1.BITNET (ZDENKO) (01/11/90)

-O2 or higher options on C2.0 messes up webtoc program (from which C versions
are made out of web).  Optimizing experts in compiler group should take note.
It took >29 min on RS2030 to finish compilation into wrong code with higher
options, -O1 does it in <1 min.

zdenko