new machine layer for Blue Gene/P
authorAbhinav Bhatele <bhatele@illinois.edu>
Wed, 23 May 2007 18:17:48 +0000 (18:17 +0000)
committerAbhinav Bhatele <bhatele@illinois.edu>
Wed, 23 May 2007 18:17:48 +0000 (18:17 +0000)
src/arch/mpi-bluegenep/cc-mpcc.h [new file with mode: 0644]
src/arch/mpi-bluegenep/cc-mpcc.sh [new file with mode: 0644]
src/arch/mpi-bluegenep/cc-xlc.h [new file with mode: 0644]
src/arch/mpi-bluegenep/cc-xlc.sh [new file with mode: 0644]
src/arch/mpi-bluegenep/charmrun [new file with mode: 0755]
src/arch/mpi-bluegenep/conv-mach.h [new file with mode: 0644]
src/arch/mpi-bluegenep/conv-mach.sh [new file with mode: 0644]

diff --git a/src/arch/mpi-bluegenep/cc-mpcc.h b/src/arch/mpi-bluegenep/cc-mpcc.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/arch/mpi-bluegenep/cc-mpcc.sh b/src/arch/mpi-bluegenep/cc-mpcc.sh
new file mode 100644 (file)
index 0000000..0263d06
--- /dev/null
@@ -0,0 +1,23 @@
+COMMENT="This configure assumes using native compiler (i.e. compile directly on a BG/L instead of using cross compiler)"
+
+CMK_CPP_CHARM="cpp -P "
+CMK_CPP_C="cpp -E "
+CMK_CC=mpcc
+CMK_CXX=mpCC
+CMK_CXXPP="mpCC -E"
+CMK_C_OPTIMIZE='-g -O -qmaxmem=-1 -qarch=440  -Q  '
+CMK_CXX_OPTIMIZE='-g -O -qmaxmem=-1 -qarch=440  -Q '
+CMK_CF77=mpxlf
+CMK_CF90=mpxlf90
+CMK_LD="$CMK_CC "
+CMK_LDXX="$CMK_CXX "
+CMK_LIBS='-lckqt'
+CMK_LD_LIBRARY_PATH=""
+CMK_NATIVE_CC='gcc '
+CMK_NATIVE_LD='gcc '
+CMK_NATIVE_CXX='g++ -Wno-deprecated '
+CMK_NATIVE_LDXX='g++'
+CMK_F90LIBS=' '
+CMK_RANLIB=ranlib
+CMK_AR="ar rv"
+CMK_QT="aix"
diff --git a/src/arch/mpi-bluegenep/cc-xlc.h b/src/arch/mpi-bluegenep/cc-xlc.h
new file mode 100644 (file)
index 0000000..9effcb3
--- /dev/null
@@ -0,0 +1 @@
+/* no defines needed. */
diff --git a/src/arch/mpi-bluegenep/cc-xlc.sh b/src/arch/mpi-bluegenep/cc-xlc.sh
new file mode 100644 (file)
index 0000000..a89265a
--- /dev/null
@@ -0,0 +1,21 @@
+XLC_PRE=/opt/ibmcmp
+XLC_POST=bin/bg
+XLC_F=$XLC_PRE/xlf/bg/11.1/
+CMK_CC="$XLC_PRE/vacpp/bg/9.0/${XLC_POST}xlc -qcpluscmt $BGP_INC"
+CMK_CXX="$XLC_PRE/vacpp/bg/9.0/${XLC_POST}xlC $BGP_INC"
+CMK_LD="$CMK_CC $BGP_LIB "
+CMK_LDXX="$CMK_CXX  $BGP_LIB"
+CMK_CF77="$XLC_F/${XLC_POST}xlf "
+CMK_CF90="$XLC_F/${XLC_POST}xlf90  -qsuffix=f=f90" 
+CMK_CF90_FIXED="$XLC_PRE/xlf/8.1/${XLC_POST}xlf90 " 
+CMK_C_OPTIMIZE='-O2 -qstrict -Q  '
+CMK_CXX_OPTIMIZE='-O2 -qstrict -Q '
+CMK_AR='ar cq'
+CMK_NM='nm '
+CMK_QT="aix"
+#CMK_NATIVE_CC="/opt/ibmcmp/vacpp/bg/9.0/bin/xlc"
+#CMK_NATIVE_CXX="/opt/ibmcmp/vacpp/bg/9.0/bin/xlC"
+CMK_NATIVE_LD="/opt/ibmcmp/vacpp/bg/9.0/bin/xlc"      #"$CMK_NATIVE_CC"
+CMK_NATIVE_LDXX="/opt/ibmcmp/vacpp/bg/9.0/bin/xlC"    #"$CMK_NATIVE_CXX"
+CMK_RANLIB="ranlib"
+CMK_F90LIBS="-L$XLC_F/lib -lxlf90 -lxlopt -lxl -lxlfmath"
diff --git a/src/arch/mpi-bluegenep/charmrun b/src/arch/mpi-bluegenep/charmrun
new file mode 100755 (executable)
index 0000000..93058a0
--- /dev/null
@@ -0,0 +1,47 @@
+#!/bin/sh
+#
+# Conv-host for Blue Gene:
+#  Translates +pN-style conv-host options into 
+# mpirun -npN options.
+#  Copies executable to $BL_HOME directory before running.
+#
+# You MUST have a copy of MMCS running in another terminal window.
+#
+
+if [ -z "$BL_HOME" ]
+then
+       echo "You must set the BL_HOME environment variable"
+       exit 1
+fi
+
+firstArg=""
+args=""
+pes=1
+
+while [ $# -gt 0 ]
+do
+       case $1 in
+       +p)
+               pes=$2
+               shift
+               ;;
+       +p*)
+               pes=`echo $1 | awk '{print substr($1,3)}'`
+               ;;
+       *) 
+               [ -z "$firstArg" ] && firstArg="$1"
+               args="$args $1"
+               ;;
+       esac
+       shift
+done
+
+if [ $firstArg -nt $BL_HOME/$firstArg ]
+then
+  echo "Copying $firstArg to $BL_HOME..."
+  cp $firstArg $BL_HOME 
+  [ $? -ne 0 ] && exit 1
+fi
+
+echo "Running on $pes processors: $args"
+exec /BlueLight/bin/CIORUN -p $pes $args
diff --git a/src/arch/mpi-bluegenep/conv-mach.h b/src/arch/mpi-bluegenep/conv-mach.h
new file mode 100644 (file)
index 0000000..93a4a6e
--- /dev/null
@@ -0,0 +1,72 @@
+#ifndef _CONV_MACH_H
+#define _CONV_MACH_H
+
+#define CMK_NO_OUTSTANDING_SENDS                          0
+
+#define CMK_MEMORY_PREALLOCATE_HACK                        1
+
+#define CMK_CONVERSE_MPI                                   1
+
+#define CMK_NO_SOCKETS                                    1
+
+#define CMK_DEFAULT_MAIN_USES_COMMON_CODE                  1
+
+#define CMK_GETPAGESIZE_AVAILABLE                          1
+
+#define CMK_IS_HETERO                                      0
+
+#define CMK_MALLOC_USE_GNU_MALLOC                          0
+#define CMK_MALLOC_USE_OS_BUILTIN                          1
+
+#define CMK_MEMORY_PAGESIZE                                8192
+#define CMK_MEMORY_PROTECTABLE                             1
+
+#define CMK_NODE_QUEUE_AVAILABLE                           0
+
+#define CMK_SHARED_VARS_EXEMPLAR                           0
+#define CMK_SHARED_VARS_UNAVAILABLE                        1
+#define CMK_SHARED_VARS_UNIPROCESSOR                       0
+
+#define CMK_SIGNAL_NOT_NEEDED                              0
+#define CMK_SIGNAL_USE_SIGACTION                           0
+#define CMK_SIGNAL_USE_SIGACTION_WITH_RESTART              1
+
+#define CMK_SYNCHRONIZE_ON_TCP_CLOSE                       0
+
+#define CMK_THREADS_USE_CONTEXT                            0
+#define CMK_THREADS_USE_PTHREADS                           0
+#define CMK_THREADS_ARE_WIN32_FIBERS                       0
+
+#define CMK_THREADS_REQUIRE_NO_CPV                         0
+
+#define CMK_TIMER_USE_GETRUSAGE                            0
+#define CMK_TIMER_USE_SPECIAL                              1
+#define CMK_TIMER_USE_TIMES                                0
+// This needs to be compiled with gcc only
+// #define CMK_TIMER_USE_BLUEGENEP                        0
+
+#define CMK_BLUEGENEP                                     1
+
+#define CMK_TYPEDEF_INT2 short
+#define CMK_TYPEDEF_INT4 int
+#define CMK_TYPEDEF_INT8 long long
+#define CMK_TYPEDEF_UINT2 unsigned short
+#define CMK_TYPEDEF_UINT4 unsigned int
+#define CMK_TYPEDEF_UINT8 unsigned long long
+#define CMK_TYPEDEF_FLOAT4 float
+#define CMK_TYPEDEF_FLOAT8 double
+
+#define CMK_WHEN_PROCESSOR_IDLE_BUSYWAIT                   1
+#define CMK_WHEN_PROCESSOR_IDLE_USLEEP                     0
+
+
+#define CMK_WEB_MODE                                       1
+#define CMK_DEBUG_MODE                                     0
+
+#define CMK_LBDB_ON                                       1
+
+#undef CMK_CCS_AVAILABLE
+#define CMK_CCS_AVAILABLE                                 0
+
+#endif
+
diff --git a/src/arch/mpi-bluegenep/conv-mach.sh b/src/arch/mpi-bluegenep/conv-mach.sh
new file mode 100644 (file)
index 0000000..831e74d
--- /dev/null
@@ -0,0 +1,60 @@
+BGP_TYPICAL_FLOOR=/auto/BGP/releases/ppcfloor
+
+# if no floor set, use typical floor path
+if test -z "$BGP_FLOOR"
+then
+  BGP_FLOOR=$BGP_TYPICAL_FLOOR
+fi
+
+# if no install path (for experimental) set, use floor
+if test -z "$BGP_INSTALL"
+then
+  BGP_INSTALL=$BGPHOME/bgp/work/
+  echo "Using $BGP_INSTALL"
+fi
+
+BGP_BIN=$BGP_FLOOR/gnu-linux/bin
+BGP_INC="-I$BGP_INSTALL/comm/include -I$BGP_INSTALL/arch/include"
+
+BGP_LIB="-L$BGP_INSTALL/comm/lib -L$BGP_INSTALL/runtime/SPI"
+
+# test if compiler binary present
+if test ! -x $BGP_BIN/powerpc-bgp-linux-g++
+then
+ echo "ERROR: Invalid BGP_INSTALL or BGP_FLOOR, C/C++ compiler missing"
+ exit 1
+fi
+
+OPTS_CPP="$OPTS_CPP"
+GCC_OPTS="-gdwarf-2 -Wno-deprecated $BGP_INC"
+OPTS_LD="$OPTS_LD"
+
+CMK_CPP_CHARM="$BGP_BIN/powerpc-bgp-linux-cpp -P"
+CMK_CPP_C="$BGP_BIN/powerpc-bgp-linux-cpp -E "
+CMK_CXX="$BGP_BIN/powerpc-bgp-linux-g++ $GCC_OPTS "
+CMK_GCXX="$BGP_BIN/powerpc-bgp-linux-g++ $GCC_OPTS "
+CMK_CC="$BGP_BIN/powerpc-bgp-linux-gcc $GCC_OPTS "
+CMK_CXXPP="$BGP_BIN/powerpc-bgp-linux-g++ -E "
+CMK_CF77="$BGP_BIN/powerpc-bgp-linux-gfortran "
+CMK_CF90='f90'
+CMK_RANLIB="$BGP_BIN/powerpc-bgp-linux-ranlib "
+CMK_AR="$BGP_BIN/powerpc-bgp-linux-ar q "
+CMK_LD="$CMK_CC $BGP_LIB"
+CMK_LDXX="bgxlC $BGP_LIB"
+CMK_LIBS='-lckqt -lmpich.cnk -ldcmfcoll.cnk -ldcmf.cnk -lpthread -lrt -lSPI.cna'
+CMK_LD_LIBRARY_PATH="-Wl,-rpath,$CHARMLIBSO/"
+#CMK_SEQ_LIBS=''
+#CMK_SEQ_CC="$BGP_BIN/powerpc-bgp-linux-gcc -Wno-deprecated "
+#CMK_SEQ_LD="$CMK_SEQ_CC"
+#CMK_SEQ_CXX="$BGP_BIN/powerpc-bgp-linux-g++ -Wno-deprecated "
+#CMK_SEQ_LDXX="$CMK_SEQ_CXX"
+CMK_NATIVE_CC='gcc '
+CMK_NATIVE_LD='gcc '
+CMK_NATIVE_CXX='g++ -Wno-deprecated '
+CMK_NATIVE_LDXX='g++'
+CMK_F90LIBS='-lf90math -lfio -lU77 -lf77math '
+CMK_MOD_NAME_ALLCAPS=1
+CMK_MOD_EXT="mod"
+CMK_F90_USE_MODDIR=1
+CMK_F90_MODINC="-p"
+CMK_QT="generic"