This package includes: doc/ --- contains documents for users and system administrators pcimem.tar --- PCI-HIB device driver library.tar --- GRAPE-4A user library testutil.tar --- test program for GRAPE-4A system How to install: 1. First you should install PCI-HIB device driver. You must be root to do this. 1) Change directiry to '/sys/io'. 2) Untar the file 'pcimem.tar'. 3) Change directory to '/sys/conf'. 4) Add a new entry to the file 'PICARD.list' (here we assume that the name of the host computer is 'picard'). If there is no file named 'PICARD. list', copy '/sys/conf/.product.list' to 'PICARD.list'. EX) # vi /sys/conf/PICARD.list # Registration file which contains a one line entry for kernel layered products # The format of each line is as follows. Empty lines are ignored. Any line # with a '#' as the first character on the line is a comment. Other # entries have the following fields: # # Module Path:Subset ID:Date:Company:Product:Version # # ......................................................................... /usr/opt/EBVXG100:EBVXG100:950512170733:DEC:: /usr/i18n/sys/BINARY:IOSWWBINCOM300:950518165055:DEC:: /sys/io/pcimem::::: <---- add this line 5) Reconfigure the kernel by giving the following commands. # cd /sys/conf # doconfig -c PICARD # mv /vmunix /vmunix.old # mv /sys/PICARD/vmunix / # reboot 6) During the boot process, you can see the messages like: pcimem_probe: bar0 phys = XXXXXXXXX pcimem_probe: bar1 phys = XXXXXXXXX pcimem_probe: bar2 phys = XXXXXXXXX pci_cfg_hdr->bar0:XXXXXXXXXXX pci_cfg_hdr->bar1:XXXXXXXXXXX pci_cfg_hdr->bar2:XXXXXXXXXXX 7) Confirm that a file '/dev/pcimem0' exists and it has permission code 'crw-rw-rw-'. If this file has not been created automatically, you have to make it by hand. Give the commands as follows: # cd /dev/ # mknod /dev/pcimem0 c 52 0 # chmod 666 /dev/pcimem0 Here, the number '52' is the major device number of this driver. You can find the number in the file '/sys/PICARD/conf.c'. You can see the line like: Assign_table assign_table[] = { { /* assign_table[0] */ "pcimem", /* config name */ "c", /* block/char device */ .......... 52, /* major number */ <-- this line ~~~~~~~~~~~~~~~~~~~~~~~~~~ 2. After the installation of the device driver, you can install GRAPE-4A user library and its test program. You do not need to be root to do this installation. 1) Somewhere in your own directory tree, untar 'library.tar' and 'testutil.tar'. $ tar xvf library.tar $ tar xvf testutil.tar 2) Change directory to 'library' and just type 'make'. 3) If the compilation succeed, you will get a library named 'libg4a.a'. 4) Set environment variables 'HARP3_NBOARDS', 'HARP3_NCLUSTERS', and 'HARP3_ DEFECTS' to appropriate values. Currenly, this package does not support multi cluster system and 'HARP3_NCLUSTERS' should be set to '1'. 5) Type './showstatus' and you can see the messages below, if the board is working correctly. ## configration register: 0x00000000: 0x906010b5 0x00000004: 0x02800047 0x00000008: 0xffffff03 0x0000000c: 0x0000ff00 0x00000010: 0x81810100 0x00000014: 0x00010101 0x00000018: 0x88000008 0x0000001c: 0x00000000 0x00000020: 0x00000000 0x00000024: 0x00000000 0x00000028: 0x00000000 0x0000002c: 0x00000000 0x00000030: 0x00000000 0x00000034: 0x00000000 0x00000038: 0x00000000 0x0000003c: 0x000000ff ## PCI9060 local register: 0x00000000: 0xfff00008 0x00000004: 0x00000001 0x00000008: 0x00000001 0x0000000c: 0x00000001 0x00000010: 0x00000000 0x00000014: 0x00000000 0x00000018: 0x490300c3 0x0000001c: 0x00000000 0x00000020: 0x00000000 0x00000024: 0x00000000 0x00000028: 0x00000000 0x0000002c: 0x00000000 6) Set environment variable 'HARP3_RBURST' to '8', then './rperf' and wait for a few minutes. If the host computer does not hang up and continues to work, there seems to be no problem and you can go to the next step. In the case the host hangs up, you have to reduce the read performance of PCI-HIB, unfortunately. Reboot the host and set 'HARP3_ RBURST' to '6'. If you retry the command './rperf' and the host still hangs up, you should reduce 'HARP3_RBURST' to '4' or '2'. The host hangs up even if you use the value '2', you may have to slow down the system clock of PCI-HIB. 7) If the './rperf' command continues running for a few minutes, press Ctrl-C and stop it. 8) Type './testrun.csh'. The output should look like: Enter nj, ni:(set_number_of_boards_from_environment) : nb=1 (setup_offsets) nchips = 84 will call GRAPE-4 in following condition nchips: 84 ndefects: 12 nboards: 1 ##### step: 0 ## compare_nblists() returned no error ## compare_nblists() returned no error ## compare_nblists() returned no error ........................ Compare failed, err = 0 -- packet sim = bfeffffe fa000000 80000000 0 80000000 0 0 0 0 bf7ffff4 -- packet from GRAPE = bfeffffe fa000000 80000000 0 80000000 0 80000000 0 0 bf7ffff4 -- packet sim = acc : -9.99999511986971e-01 -0.00000000000000e+00 -0.00000000000000e+00 jerk: 0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 phi: -9.99999284744263e-01 -- packet from GRAPE = acc : -9.99999511986971e-01 -0.00000000000000e+00 -0.00000000000000e+00 jerk: -0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 phi: -9.99999284744263e-01 ........................ total step: 1 err: 0 ^^^ If this number is not zero, something is wrong. 9) Change directory to '../testutil' and type 'make'. An executable 's8' will be created. 10) Type './s8'. You will see its output log like: (set_number_of_boards_from_environment) : nb=1 initialdata end eta_s,eta 1.000000e-02 3.000000e-02 n 1024 (setup_offsets) nchips = 84 eps:0.000976562 douttime:2 deouttime:0.1 endtime:1 inputfile pl1k pot = -5.051245e-01 kin = 2.437144e-01 total= -2.614101e-01 ratio = -4.824838e-01 t = 0.100098 pot = -4.94674563058652e-01 kin = 2.43686457328752e-01 total= -2.50988105729900e-01 ratio = -4.92619745438293e-01 error = 3.98683794262225e-02 0.100098 time 0.100098 6 nts = 326 nstep 14890 ....................... 0.402 Gflops(average) 0.204 Gflops t = 1 acc sum: -2.10664818922623e-14 1.14352971536391e-14 -1.64313007644523e-14 jerk sum: -8.34936008686782e-06 -6.34143088973360e-06 1.43369748002442e-05 If the last two lines of output are exactly same as that of the file 'log.1024_2_1_0.1_pl1k_0.01_0.03', GRAPE-4A system seems to be working correctly. 11) Check the system with your own N-body code. To use the GRAPE-4A user library with your code written for the original GRAPE-4 system, you should modify the makefile of your code to link 'libg4a.a' instead of 'libharp.a'.