; PS:TEX-FOR-IBM-RS-6000.TXT.3, 10-Jul-90 19:10:41, Edit by BEEBE =================== TeX for IBM RS/6000 =================== Nelson H. F. Beebe Center for Scientific Computing and Department of Mathematics South Physics Building University of Utah Salt Lake City, UT 84112 USA Tel: (801) 581-5254 [10-Jul-1990] ============ INTRODUCTION ============ IBM's announcement on 15-Feb-1990 in San Francisco of its new RISC System 6000 (code named RIOS) workstations caused considerable excitement in the industry because of the reported high performance levels (peak performance of 50 Mflops, with about 9 Mflops achievable on LINPACK in double precision, and 12 Mflops on double precision 100 x 100 matrix multiplication), and highly competitive pricing. Readers interested in the technical background of the development of the RS/6000 should consult @Book{IBM:rs6000, editor = "Mamata Misra", title = "IBM RISC System/6000 Technology, publication SA23-2619-00", publisher = "IBM Corporation", year = "1990", } This book is a collection of technical articles on the IBM RS/6000 system by the people who developed it. It goes into details of hardware and software design decisions, without any sales promotions. Reading it is the next best thing to actually talking to the designers, and I'm pleased that IBM has chosen to make it available. On any new system, particularly one in which the CPU architecture is new, one can expect growing pains, and the IBM RS/6000 has been no exception. At the time of writing this, almost 5 months after the announcement, deliveries have been slow, and the first official release of the operating system appeared only in late June. Even with that release, many software problems remain, and porting difficulties should be expected. =================================== TeX and METAFONT on the IBM RS/6000 =================================== Many of those people who are interested in the IBM RS/6000 want to run TeX on it, and to that end, this document has been prepared to collect our experience with it at Utah. The BAD news is that unless you have very up-to-date system software, you will not be able to install TeX or METAFONT. The GOOD news is that with the latest release available to me since 28-Jun-1990, both TeX 3.0 and METAFONT 2.0, and related TeXware and METAFONTware all pass the trip and trap torture tests at ALL optimization levels (-g, none, and -O) in the Web2C 5.0.c implementation, with some small changes documented below. I have therefore installed all of this software compiled with -O (full optimization) on a local RS/6000, usigraph.utah.edu, located at the Utah Supercomputer Institute on the University of Utah campus. I have been collaborating with the Web2C developers (Karl Berry, Tim Morgan, and Tom Rokicki) and you can expect that later releases than 5.0.c on the Web2C system on labrea.stanford.edu will incorporate the necessary source changes, and simplify the installation. What follows now is a collection of e-mail messages, in increasing chronological order (oldest to newest, so you have to read everything to get all of the details), with irrelevant parts deleted, which summarize the current state of affairs. This includes information about building the TeX and METAFONT systems, and also about performance. ============== STATUS REPORTS ============== ------------------------------------------------------------------------ 22-Jun-90 12:58:55-MDT,2088;000000000001 Mail-From: BEEBE created at 22-Jun-90 12:58:53 Date: Fri 22 Jun 90 12:58:53-MDT From: "Nelson H. F. Beebe" Subject: Re: TeX for AIX unix To: fox@hardy.u.washington.edu cc: Beebe@SCIENCE.utah.edu In-Reply-To: <9006221734.AA12884@hardy.u.washington.edu> X-US-Mail: "Center for Scientific Computing, South Physics, University of Utah, Salt Lake City, UT 84112" X-Telephone: (801) 581-5254 Message-ID: <12599896542.31.BEEBE@SCIENCE.utah.edu> >>... >> can you please send me those typedefs necessary to make TeX >> run properly on the AIX system. >>... Changes for Web2C under AIX [22-Jun-1990] The current Web2C (5.0.c) translator requires two small mods to make the installation succeed on any kind of IBM AIX. The changes have to do with a different handling of sign extension of char data by AIX compilers. Later versions of the Web2C translator are expected to incorporate these changes. In the following, you may need to use AIX instead of _AIX, depending upon whether you are on a PS/2, 30xx, RT, or RS system; check what the compiler does by trying "cc -v -c foo.c"; you should see -DAIX or -D_AIX in the output. For example, on the RS/6000, you will get 104 usigraph>cc -v -c foo.c exec: /usr/lpp/xlc/bin/xlcentry(xlcentry,foo.c,foo.o,foo.lst, -D_IBMR2,-D_AIX,-qlanglvl=extended,NULL) showing that _AIX and _IBMR2 are both defined. In site.h: /* The type `schar' should be defined here to be the smallest signed type available. ANSI C compilers may need to use `signed char'. If you don't have signed characters, then define schar to be the type `short'. */ #ifdef _AIX typedef int schar; #else typedef char schar; #endif In web2c/web2c.yacc, about line 340, else if (lower_bound >= 0 && upper_bound <= 65535) my_output("int" /* "unsigned short"*/); On most systems, unsigned short is used, but for AIX, use int. ------------------------------------------------------------------------ 14-Jun-90 15:42:41-MDT,2632;000000000001 Mail-From: BEEBE created at 14-Jun-90 15:42:37 Date: Thu 14 Jun 90 15:42:37-MDT From: "Nelson H. F. Beebe" Subject: Progress report on IBM RS/6000 To: caldwell@SCIENCE.utah.edu cc: Beebe@SCIENCE.utah.edu, op.bowman@SCIENCE.utah.edu, ma.gustafson@SCIENCE.utah.edu, rodgers@SCIENCE.utah.edu X-US-Mail: "Center for Scientific Computing, South Physics, University of Utah, Salt Lake City, UT 84112" X-Telephone: (801) 581-5254 Message-ID: <12597829198.21.BEEBE@SCIENCE.utah.edu> I compiled my TeX DVI drivers with only a couple of lines of code changes; with -g, output on a 40-page file matches the Sun 3 and 4 exactly, with the following times: % time dvialw dviman plot79.math.utah.edu (Sun 3/110, diskless): 45.9u 12.6s 2:20 41% 0+208k 70+37io 199pf+0w mjl.math.utah.edu (Sun SPARCstation, local swap disk): 7.9u 1.2s 0:11 81% 0+608k 23+37io 23pf+0w usigraph.utah.edu (IBM RS/6000, local disk): 11.87u 1.96s 0:46 3937% 10853+10853k 0+0io 0pf+0w I then recompiled dvialw with -O, and got usigraph.utah.edu: 7.34u 2.59s 0:30 1521% -26565+-26565k 0+0io 0pf+0w This time is almost as good as on the Sun SPARCstation, but notice that the elapsed time is double that of the SPARCstation; also the RS/6000 has a local disk for all of its files, while the SPARCstation has only local swap; all other files have to come from the Sun 3/280 file server. Unfortunately, the output with -O on the RS/6000 is wrong; it is missing curly braces in about 40 places, but is otherwise correct. Those missing braces are all from the header macros, which are output by a single function, cppsfile(), in dvialw.c, which is only one of about 150 source files and 52K lines of code making up the DVI drivers; I estimate that about 100 compiled source files are actually included in any one executable driver program. This suggests that a single code generation error is responsible. I therefore recompiled dvialw.c without optimization (and without -g), and found: usigraph.utah.edu: 8.46u 1.99s 0:34 4268% -1087+-1087k 0+0io 0pf+0w This is only marginally slower than the fully optimized program, and this time, the output is correct. I suspect that a Sun SPARCstation with everything on a local disk would outperform this by another 25% or better. I don't have such a system available, but I ran a test on a Sun 4/370 with a local disk for everything and found: maxwell.mmwb.ucsf.edu: 6.7u 1.2s 0:18 43% 0+776k 48+30io 58pf+0w From my I/O benchmarks, this machine is actually slower than a SPARCstation with a local Hitachi disk. ------------------------------------------------------------------------ 6-Jul-90 20:00:50-MDT,1705;000000000001 Mail-From: BEEBE created at 6-Jul-90 20:00:44 Date: Fri 6 Jul 90 20:00:44-MDT From: "Nelson H. F. Beebe" Subject: Announcing success of Web2C on IBM RS/6000! To: "Web2C developers and interested parties: last update [06-Jul-1990]": ; cc: Beebe@SCIENCE.utah.edu, usimap@snow.usi.utah.edu, caldwell@SCIENCE.utah.edu, usirjm@usigraph.utah.edu X-US-Mail: "Center for Scientific Computing, South Physics, University of Utah, Salt Lake City, UT 84112" X-Telephone: (801) 581-5254 Message-ID: <12603643355.11.BEEBE@SCIENCE.utah.edu> Just before I left for College Station for the TUG90 meeting, I reported to you that by bootstrapping some files from the Sun to the IBM RS/6000, and compiling at the debug level of optimization (-g), I was able to get TeX to pass the trip test, but METAFONT would not compile. Last week, we installed an upgrade to the O/S on the RS/6000, bringing it to level ``IBM AIX Version 3.1, loaded 28 June 1990 with 9021'' "strings /unix" gives no useful output, but ls -l reports -rwxr-xr-x 3 bin bin 26462 May 23 18:38 /bin/cc -r-xr-xr-x 1 root system 1261933 May 30 00:42 /unix -r--r--r-- 1 bin bin 25530 May 20 07:29 /usr/lib/libcsys.a The great news is that after this upgrade (1) no file bootstrapping is necessary, (2) METAFONT now compiles, and (3) trip and trap are passed at -g, none, and -O optimization levels! I have yet to install the DVI drivers, because I've once again been changing the sources. However, I expect to report back shortly with timings of the RS/6000 versus some other machines, including the IBM 3090/600VF supercomputer. ------------------------------------------------------------------------ 7-Jul-90 15:28:37-MDT,2862;000000000001 Mail-From: BEEBE created at 7-Jul-90 15:28:35 Date: Sat 7 Jul 90 15:28:35-MDT From: "Nelson H. F. Beebe" Subject: Update on TeX 3.0 timings To: "Web2C developers and interested parties: last update [06-Jul-1990]": ; cc: Beebe@SCIENCE.utah.edu, caldwell@SCIENCE.utah.edu, usimap@usigraph.utah.edu, usirjm@usigraph.utah.edu X-US-Mail: "Center for Scientific Computing, South Physics, University of Utah, Salt Lake City, UT 84112" X-Telephone: (801) 581-5254 From: "Nelson H. F. Beebe" Message-ID: <12603855954.11.BEEBE@SCIENCE.utah.edu> [This is an extract of results from an earlier message, with the IBM timings added] Here are the results of 'time latex messages.ltx' for TeX 3.0 on several (idle) machines (the IBM 3090 is never idle): Output written on messages.dvi (28 pages, 62116 bytes). DECstation 3100 (cosmic) 15.5u 0.6s 0:16 98% 564+2215k 0+19io 3pf+0w HP 9000/850 (ee) 20.9u 0.8s 0:29 74% IBM RS/6000 (usigraph) 13.8u 1.25s 0:40 2836% 0+2k 0+0io 0pf+0w IBM 3090/600VF (avalanche) 4.4u 0.2s 0:11.2 41% 208+938k 227+0io 55pf+0w Stardent 1520 (graphics) 31.3u 3.2s 0:36 95% 235+840k 28+34io 292pf+0w Sun 3/50 (moe) 64.9u 2.2s 1:11 93% 0+512k 78+12io 99pf+0w Sun 3/110 (plot79) 65.6u 5.0s 1:53 62% 0+408k 80+12io 215pf+0w Sun 3/280 (csc-sun) 34.9u 3.4s 0:48 78% 0+472k 114+19io 125pf+0w Sun 386i (shemp) 30.9u 1.7s 0:41 79% 0+496k 130+12io 157pf+0w Sun SPARCstation (mjl) 15.5u 0.8s 0:19 82% 0+1092k 6+18io 25pf+0w Sun 4/370 (maxwell.mmwb.ucsf) 13.7u 0.8s 0:17 83% 0+1304k 83+16io 74pf+0w The DECstation 3100 has nearly 2GB of local disk (/dev/rz). The Sun 3/50 and 3/110 systems are diskless; the SPARCstation has a local disk for swap, but gets its files from the central 3/280 file server. Here are the same results, ordered from fastest to slowest CPU time: IBM 3090/600VF (avalanche) 4.4u 0.2s 0:11.2 41% 208+938k 227+0io 55pf+0w Sun 4/370 (maxwell.mmwb.ucsf) 13.7u 0.8s 0:17 83% 0+1304k 83+16io 74pf+0w IBM RS/6000 (usigraph) 13.8u 1.25s 0:40 2836% 0+2k 0+0io 0pf+0w DECstation 3100 (cosmic) 15.5u 0.6s 0:16 98% 564+2215k 0+19io 3pf+0w Sun SPARCstation (mjl) 15.5u 0.8s 0:19 82% 0+1092k 6+18io 25pf+0w HP 9000/850 (ee) 20.9u 0.8s 0:29 74% Sun 386i (shemp) 30.9u 1.7s 0:41 79% 0+496k 130+12io 157pf+0w Stardent 1520 (graphics) 31.3u 3.2s 0:36 95% 235+840k 28+34io 292pf+0w Sun 3/280 (csc-sun) 34.9u 3.4s 0:48 78% 0+472k 114+19io 125pf+0w Sun 3/50 (moe) 64.9u 2.2s 1:11 93% 0+512k 78+12io 99pf+0w Sun 3/110 (plot79) 65.6u 5.0s 1:53 62% 0+408k 80+12io 215pf+0w Note that the wall clock time of the IBM RS/6000 is more than double the CPU time, despite its being otherwise idle. Repeated runs showed similar ratios. Another campus user has also reported seeing a 2:1 wall:cpu ratio on other benchmarks. [Author's note: this behavior is being investigated by local IBM staff; it may be due to idiosynchrasies of just one machine, so ignore it until further information is available.] ------------------------------------------------------------------------ 10-Jul-90 13:54:59-MDT,1450;000000000001 Mail-From: BEEBE created at 10-Jul-90 13:54:47 Date: Tue 10 Jul 90 13:54:46-MDT From: "Nelson H. F. Beebe" To: monohon@cernvax.cern.ch cc: Beebe@SCIENCE.utah.edu In-Reply-To: <9007100644.AA28181@cernvax.cern.ch> X-US-Mail: "Center for Scientific Computing, South Physics, University of Utah, Salt Lake City, UT 84112" X-Telephone: (801) 581-5254 Message-ID: <12604625310.21.BEEBE@SCIENCE.utah.edu> Prior to my going to College Station for the TUG90 meeting last month, I had only been able to get TeX 3.0 to pass the trip test on the IBM RS/6000 with optimization level -g (debug), and then only after bootstrapping some files from the Sun which could not be generated correctly on the RS/6000. METAFONT could not be compiled under any optimization level. On the 28th of June, the O/S was upgraded to 3.1.9021, and with that change, TeX and METAFONT pass the trip and trap tests at all optimization levels, and I've installed it here with the highest level. It is necessary to do make OPT="-O -DANSI" to get a syntax-error free compile. I worked from the 5.0.c Web2c translator, and had to make a couple of source code changes that are described in e-mail that I'll forward separately to you. Later releases of Web2C will incorporate these changes. ... ------------------------------------------------------------------------ 10-Jul-90 14:00:33-MDT,778;000000000001 Mail-From: BEEBE created at 10-Jul-90 14:00:31 Date: Tue 10 Jul 90 14:00:31-MDT From: "Nelson H. F. Beebe" Subject: xdvi on RS/6000 To: monohon@cernvax.cern.ch cc: Beebe@SCIENCE.utah.edu X-US-Mail: "Center for Scientific Computing, South Physics, University of Utah, Salt Lake City, UT 84112" X-Telephone: (801) 581-5254 Message-ID: <12604626354.21.BEEBE@SCIENCE.utah.edu> I could not compile xdvi from X11R4 on the RS/6000 because there is no support for the Athena widget library (-lXaw) and associated include files. I was able to make the X11R2 version run, and we are making do with it, even though it is much inferior to the 11R4 version. I unfortunately don't have the 11R3 version, which probably could be compiled. ------------------------------------------------------------------------