GMP updates for Cray X1/X1e

Donald Ferry daf at cray.com
Sat Feb 5 07:30:33 CET 2005


Suggested configuration updates for the Cray X1/X1e system.
-------------- next part --------------
Version:         GMP 4.1.4

Problem:         Suggested configuration updates for the Cray X1 system.

uname -a:        UNICOS/mp sn702 2.5.22 01300706 crayx1

config.guess:    nv1-cray-unicosmp2.5.X

configfsf.guess: nv1-cray-unicosmp2.5.X


1) Could the "configure" and "configure.in" files be updated 
   so that Cray X1 builds will use the existing "cray/ieee"
   versions of the routines?

Possible change configure.in

FROM:

case $host_cpu in
  c90 | t90)
    AC_EGREP_CPP(yes,
[#ifdef _CRAYIEEE
yes
#endif],
    [add_path="cray/ieee"],
    [add_path="cray/cfp"; extra_functions="mulwwc90"]) ;;
  j90 | sv1)
    extra_functions="mulwwj90"
    add_path="cray/cfp" ;;
esac


TO:

case $host_cpu in
  c90 | t90)
    AC_EGREP_CPP(yes,
[#ifdef _CRAYIEEE
yes
#endif],
    [add_path="cray/ieee"],
    [add_path="cray/cfp"; extra_functions="mulwwc90"]) ;;
  nv1)
    add_path="cray/ieee" ;;
  j90 | sv1)
    extra_functions="mulwwj90"
    add_path="cray/cfp" ;;
esac


2) Similarily, could the default options for the Cray X1
   be changed?

Possible change in configure.in

FROM:

  # Cray vector machines.
  # This must come after alpha* so that we can recognize present and future
  # vector processors with a wildcard.
  *-cray-unicos*)
    gmp_asm_syntax_testing=no
    cclist="cc"
    # We used to have -hscalar0 here as a workaround for miscompilation of
    # mpz/import.c, but let's hope Cray fixes their bugs instead, since
    # -hscalar0 causes disastrously poor code to be generated.
    cc_cflags="-O3 -hnofastmd -htask0 -Wa,-B"
    path="cray"
    ;;

TO:

  # Cray vector machines.
  # This must come after alpha* so that we can recognize present and future
  # vector processors with a wildcard.
  *-cray-unicos*)
    gmp_asm_syntax_testing=no
    cclist="cc"
    # We used to have -hscalar0 here as a workaround for miscompilation of
    # mpz/import.c, but let's hope Cray fixes their bugs instead, since
    # -hscalar0 causes disastrously poor code to be generated.
    cc_cflags="-O3 -hnofastmd -htask0 -Wa,-B"
    path="cray"

    # Cray X1 doesn't know "-hnofastmd". 
    case $host in
      nv1-cray-unicos*)  cc_cflags="-h ssp" ;;
    esac
    ;;

3) If the tune or speed programs are run, there will be a mismatch
   between the sscanf format, "%ld", and the data type of int.
   So, to have mp_size_t compatible with sscanf %ld, I'd suggest using
   long on X1 also. (Either mp_size_t needs to be a long, or else the "l"
   on all the "sscanf %ld" for mp_size_t needs to be removed.)

Possible changes in both gmp-h.in and mp-h.in.

FROM:

#if defined (_CRAY) && ! defined (_CRAYMPP)
/* plain `int' is much faster (48 bits) */
#define __GMP_MP_SIZE_T_INT     1
typedef int                     mp_size_t;
typedef int                     mp_exp_t;
#else
#define __GMP_MP_SIZE_T_INT     0
typedef long int                mp_size_t;
typedef long int                mp_exp_t;
#endif



TO:
/* #if defined (_CRAY) && ! defined (_CRAYMPP) */
#if defined (_CRAY1) 
/* plain `int' is much faster (48 bits) */
#define __GMP_MP_SIZE_T_INT     1
typedef int                     mp_size_t;
typedef int                     mp_exp_t;
#else
#define __GMP_MP_SIZE_T_INT     0
typedef long int                mp_size_t;
typedef long int                mp_exp_t;
#endif


More information about the gmp-devel mailing list