#! /bin/sh
#
# Provide information to the top level configure about the capabilities of the dcmf device.
#
# Currently, this is restricted to allowing the channels to assert
# support for MPI_THREAD_MULTIPLE
#
# Get the channel from the device_args, and invoke any channel prereq
echo "Executing mpich2prereq in $devicedir with $device_args"
if test -z "$device_args" ; then
    device_args=none
fi

if test "$device_args" = "BGP" ; then
    MPID_MAX_PROCESSOR_NAME=128
    MPID_NO_LONG_LONG=no
    MPID_NO_LONG_DOUBLE=no
    MPID_NO_SPAWN=yes
    MPID_NO_RMA=no
    MPID_MAX_THREAD_LEVEL=MPI_THREAD_MULTIPLE
    MPID_NO_PM=yes
    MPID_NO_PMI=yes
    INSTALL_FROM_DEVICE=yes
fi

#Possible values
#    MPID_MAX_THREAD_LEVEL - thread level supported by device.
#                            if unset, is MPI_THREAD_FUNNELED
#    MPID_NO_LONG_LONG     - if yes, the device does not support the
#                            long long integer type
#    MPID_NO_LONG_DOUBLE   - if yes, the device does not support the
#                            long double type
#    MPID_PM_NAMESERVER    - if set, provides the name of the nameserver
#                            that the process manager supports.
#                            This name server will be used if the
#                            default name server is selected.
#    MPID_NO_PM            - If yes, the device does not require any
#                            PM implementation.
#    MPID_NO_PMI           - If yes, the device does not require any
#                            PMI implementation.
#    EXTRA_STATUS_DECL     - Any extra declarations that the device
#                            needs added to the definition of MPI_Status.
#    MPID_MAX_PROCESSOR_NAME - The maximum number of character in a processor
#                            name.  If not set, 128 will be used.
#    PMI_REQUIRES_READABLE_TOKENS - if yes, define the C-preprocessor
#                            value USE_HUMAN_READABLE_TOKENS, which is
#                            used in src/include/mpimem.h to define token
#                            separators used in src/util/mem/argstr.c
#    PM_REQUIRES_PMI       - if set, provides the name of the PMI
#                            interface implementation.  If not set,
#                            the "simple" PMI implementation is used.
#                            A process manager that needs a particular
#                            process manager should check that this is
#                            not set to an incompatible value.
#    MPID_NO_SPAWN         - if yes, the device does not support the
#                            dynamic process routines (spawn, connect
#                            attach, join, plus port and publish
#                            routines).  The major effect of this
#                            is to let the test codes know that
#                            spawn is not implemented.
#    MPID_NO_RMA           - if yes, the device does not support the
#                            MPI RMA routines (MPI_Win_create and
#                            MPI_Put etc.).  The major effect of this
#                            is to let the test codes know that
#                            RMA is not implemented.
#
