mpi-linux-ppc port. This works on BigRed (NAMD runs)
authorAbhinav Bhatele <bhatele@illinois.edu>
Fri, 6 Feb 2009 08:05:26 +0000 (08:05 +0000)
committerAbhinav Bhatele <bhatele@illinois.edu>
Fri, 6 Feb 2009 08:05:26 +0000 (08:05 +0000)
src/arch/mpi-linux-ppc/cc-mpicxx.h [new file with mode: 0644]
src/arch/mpi-linux-ppc/cc-mpicxx.sh [new file with mode: 0644]
src/arch/mpi-linux-ppc/cc-xlc64.h [new file with mode: 0644]
src/arch/mpi-linux-ppc/cc-xlc64.sh [new file with mode: 0644]
src/arch/mpi-linux-ppc/conv-mach.h [new file with mode: 0644]
src/arch/mpi-linux-ppc/conv-mach.sh [new file with mode: 0644]

diff --git a/src/arch/mpi-linux-ppc/cc-mpicxx.h b/src/arch/mpi-linux-ppc/cc-mpicxx.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/arch/mpi-linux-ppc/cc-mpicxx.sh b/src/arch/mpi-linux-ppc/cc-mpicxx.sh
new file mode 100644 (file)
index 0000000..7f6174d
--- /dev/null
@@ -0,0 +1,58 @@
+
+# user enviorn var: MPICXX and MPICC
+# or, use the definition in file $CHARMINC/MPIOPTS
+MPICXX_DEF=mpicxx
+MPICC_DEF=mpicc
+
+MPICXX=$MPICXX_DEF
+MPICC=$MPICC_DEF
+test "$MPICXX" != "$MPICXX_DEF" && /bin/rm -f $CHARMINC/MPIOPTS
+if test ! -f "$CHARMINC/MPIOPTS"
+then
+  echo MPICXX_DEF=$MPICXX > $CHARMINC/MPIOPTS
+  echo MPICC_DEF=$MPICC >> $CHARMINC/MPIOPTS
+  chmod +x $CHARMINC/MPIOPTS
+fi
+
+CMK_REAL_COMPILER=`$MPICXX -show 2>/dev/null | cut -d' ' -f1 `
+case "$CMK_REAL_COMPILER" in
+g++) CMK_AMD64="-m64 -fPIC" ;;
+esac
+
+CMK_CPP_CHARM="/lib/cpp -P"
+CMK_CPP_C="$MPICC -E"
+CMK_CC="$MPICC $CMK_AMD64 "
+CMK_CXX="$MPICXX $CMK_AMD64 "
+CMK_CXXPP="$MPICXX -E $CMK_AMD64 "
+CMK_LD="$CMK_CC "
+CMK_LDXX="$CMK_CC "
+
+CMK_NATIVE_CC="$CMK_CC"
+CMK_NATIVE_LD="$CMK_LD"
+CMK_NATIVE_CXX="$CMK_CXX"
+CMK_NATIVE_LDXX="$CMK_LDXX"
+
+# fortran compiler 
+# for Intel Fortran compiler 8.0 and higher which is renamed to ifort from ifc
+# does not work for ifc 7.0
+CMK_CF77="mpif77 -auto -fPIC "
+CMK_CF90="mpif90 -auto -fPIC "
+CMK_CF90_FIXED="$CMK_CF90 -132 -FI "
+F90DIR=`which ifort 2> /dev/null`
+if test -h "$F90DIR"
+then
+  F90DIR=`readlink $F90DIR`
+fi
+if test -x "$F90DIR"
+then
+  F90LIBDIR="`dirname $F90DIR`/../lib"
+  F90MAIN="$F90LIBDIR/for_main.o"
+fi
+# for_main.o is important for main() in f90 code
+CMK_F90MAINLIBS="$F90MAIN "
+CMK_F90LIBS="-L$F90LIBDIR -lifcore -lifport "
+CMK_F77LIBS="$CMK_F90LIBS"
+
+CMK_F90_USE_MODDIR=""
+
+
diff --git a/src/arch/mpi-linux-ppc/cc-xlc64.h b/src/arch/mpi-linux-ppc/cc-xlc64.h
new file mode 100644 (file)
index 0000000..f28df1e
--- /dev/null
@@ -0,0 +1 @@
+#define CMK_64BIT                                               1
diff --git a/src/arch/mpi-linux-ppc/cc-xlc64.sh b/src/arch/mpi-linux-ppc/cc-xlc64.sh
new file mode 100644 (file)
index 0000000..198f1ee
--- /dev/null
@@ -0,0 +1,21 @@
+COMMENT="Enable 64-bit mode (-q64)"
+CMK_CC='mpicc -q64 -qarch=ppc970 -qtune=ppc970'
+CMK_CXX='mpicxx -q64 -qarch=ppc970 -qtune=ppc970 -qstaticinline '
+CMK_C_OPTIMIZE='-O3 -qstrict -Q  '
+CMK_CXX_OPTIMIZE='-O3 -qstrict -Q '
+CMK_LD="$CMK_CC  "
+CMK_LDXX="$CMK_CXX "
+
+CMK_NATIVE_CC='xlc_r -q64 -qarch=ppc970 -qtune=ppc970'
+CMK_NATIVE_LD='xlc_r -q64 -qarch=ppc970 -qtune=ppc970'
+CMK_NATIVE_CXX='xlC_r -qstaticinline -q64 -qarch=ppc970 -qtune=ppc970'
+CMK_NATIVE_LDXX='xlC_r -q64 -qarch=ppc970 -qtune=ppc970'
+
+CMK_CF77='xlf_r -q64 -qarch=ppc970 -qtune=ppc970'
+CMK_CF90='xlf90_r -q64 -qarch=ppc970 -qtune=ppc970 -qsuffix=f=f90'
+CMK_CF90_FIXED='xlf90_r -qfixed -q64 -qarch=ppc970 -qtune=ppc970 '
+
+CMK_AR='ar  cq'
+CMK_NM='nm '
+CMK_CC64=true
+
diff --git a/src/arch/mpi-linux-ppc/conv-mach.h b/src/arch/mpi-linux-ppc/conv-mach.h
new file mode 100644 (file)
index 0000000..97d9465
--- /dev/null
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ * $Source$
+ * $Author$
+ * $Date$
+ * $Revision$
+ *****************************************************************************/
+
+#ifndef _CONV_MACH_H
+#define _CONV_MACH_H
+
+#define CMK_AMD64                                          1
+#define CMK_CONVERSE_MPI                                   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_THREADS_REQUIRE_NO_CPV                         0
+
+#define CMK_TIMER_USE_GETRUSAGE                            0
+#define CMK_TIMER_USE_SPECIAL                              1
+#define CMK_TIMER_USE_TIMES                                0
+#define CMK_TIMER_USE_RDTSC                               0
+
+#define CMK_THREADS_USE_CONTEXT                            1
+#define CMK_THREADS_USE_PTHREADS                           0
+
+#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_64BIT    1
+
+#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
+
+#endif
+
diff --git a/src/arch/mpi-linux-ppc/conv-mach.sh b/src/arch/mpi-linux-ppc/conv-mach.sh
new file mode 100644 (file)
index 0000000..8728534
--- /dev/null
@@ -0,0 +1,25 @@
+CMK_CPP_CHARM='/lib/cpp -P'
+CMK_CPP_C='mpicc -E'
+CMK_CC='mpicc -q64 '
+CMK_CXX='mpicxx -q64'
+CMK_CXXPP='mpiCC -E -q64'
+CMK_RANLIB='ranlib'
+CMK_LIBS='-lckqt -lmpich '
+CMK_LD_LIBRARY_PATH="-Wl,-rpath,$CHARMLIBSO/"
+
+CMK_NATIVE_LIBS=''
+CMK_NATIVE_CC='xlc_r -q64 '
+CMK_NATIVE_LD='xlc_r -q64 '
+CMK_NATIVE_CXX='xlC_r -q64 '
+CMK_NATIVE_LDXX='xlC_r -q64 '
+CMK_NATIVE_CC='xlc_r -q64 '
+CMK_NATIVE_CXX='xlC_r -q64 '
+
+CMK_CF77='mpif77 -q64'
+CMK_CF90='mpif90 -q64'
+CMK_F90LIBS='-L/opt/absoft/lib -lf90math -lfio -lU77 -lf77math '
+CMK_MOD_NAME_ALLCAPS=1
+CMK_MOD_EXT="mod"
+CMK_F90_USE_MODDIR=1
+CMK_F90_MODINC="-p"
+