 GDF 22 may 2013,   Port of GAMESS to Blue Gene/Q

This document lists the changes made to GAMESS to port it to 
the Blue Gene/Q, Mira, at ALCF.

Begin by assuming BG/Q = BG/P, then...  

zunix.c:
 1. In the IBMBG clause, in functions 'memget', 'memrel' 
    and 'laddrs': replace 'int' with 'long'.

unport.src:
 2. In subroutine BEGING: add line,
*AIX  NWDVAR = 1 

comp:
 3. for TARGET=ibm-bg: add '-qintsize=8' to the bgxlf flags.
 4. set  -qarch=qp  -qtune=qp
 5. in the 'mathhack' section, add-
if ($TARGET == ibm-bg)    set mathhack=true 

lked:
 6. set BLAS='blaswrap.o'
 7. set 'LIBRARIES' to point to ESSL 

compall:
 8. in the 'blaswrap' section, add-
if ($TARGET == ibm-bg)     ./comp blaswrap 
 9. set  -qarch=qp  -qtune=qp for the build of zunix.c 

...DDI items...
compddi:
10. set MAXCPUS=64
    in the 'ibm-bg' clause-
11. remove the compiler flag 'D_32_BIT'
12. set 'F77_OPTS= -DINT_SIZE= long' (not 'int')
13. enter correct path to mpif.h for 'CFLAGS'
14. comment 'arch' path not needed
    under "Blue Gene objects"-
15. comment compilation/inclusion of ddi_bgp

ddi_put.c:
16. in DDI_PutP_comm_, replace 'int ranks[MAX_NODES];' 
    with 'int ranks[MAX_NODES*MAX_SMP_PROCS];' 

ddi_runtime.c and ddi_init.c:
17. comment out 'void DDI_Runtime_print(... ' function

common.h:
18. reduce MAX_DS_MSG_WORDS to ONE_MWORD (from *20) 


19. use the 'ibmbg.size' script to minimize common blocks for EFP 
    As of November 2012: new EFP code assumes that MXDFG is at 
    least 2 so ibmbg.size should be modified to reflect this 
    (currently,MXDFG=1) 


Notes-

Items 1-3,11,12 configure GAMESS to use 8-byte integers.
Items 5-8 are for interfacing ESSL with the i8 addressing.
Item 16 is a bug fix.
Items 18,19 are not strictly necessary but helped on BG/P and 
make sense on BG/Q.
Also,  -O2  (in comp) remains the 'safe' optimization level.

