From 36865d9cfefb819adaa0fab41f4340b5b35a2c59 Mon Sep 17 00:00:00 2001 From: goodale Date: Thu, 6 Oct 2005 17:54:46 +0000 Subject: Known architecture file for the IBM Blue Gene/L. You should configure with HOST_MACHINE=ppc-ibm-bgl and set the compilers as necessary, e.g. CC=blrts_xlc CXX=blrts_xlC F90=blrts_xlf90 and MPI with MPI=NATIVE git-svn-id: http://svn.cactuscode.org/flesh/trunk@4177 17b73243-c579-4c4c-a9d2-2d5706c11dac --- lib/make/known-architectures/bgl | 118 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 lib/make/known-architectures/bgl (limited to 'lib/make/known-architectures/bgl') diff --git a/lib/make/known-architectures/bgl b/lib/make/known-architectures/bgl new file mode 100644 index 00000000..2d653047 --- /dev/null +++ b/lib/make/known-architectures/bgl @@ -0,0 +1,118 @@ +#! /bin/sh +# /*@@ +# @file bgl +# @date Wed Oct 6 15:35:45 2005 +# @author Tom Goodale +# @desc +# Known-architectures file for IBM Bluegene/L systems +# @enddesc +# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/make/known-architectures/bgl,v 1.1 2005-10-06 17:54:46 goodale Exp $ +# @@*/ + +if test "$CCTK_CONFIG_STAGE" = 'preferred-compilers' ; then + + if test -z "$CC"; then + CC=blrts_xlc + echo Setting C compiler to $CC + fi + + if test -z "$CXX"; then + CXX=blrts_xlC + echo Setting C++ compiler to $CXX + fi + + if test -z "$F77"; then + F77=blrts_xlf77 + echo Setting F77 compiler to $F77 + fi + + if test -z "$F90"; then + F90=blrts_xlf90 + echo Setting F90 compiler to $F90 + fi + + if test -z "$FPP" -a -z "$FPPFLAGS"; then + FPP='/lib/cpp' + FPPFLAGS='-traditional' + echo "Setting FPP to $FPP" + echo "Setting FPPFLAGS to $FPPFLAGS" + fi + +else + + cross_compiling=yes + # Fortran compilers + : ${F90FLAGS="-qmaxmem=64000"} + : ${F77FLAGS="-qmaxmem=64000 -qfixed"} + : ${F90_OPTIMISE_FLAGS='-O2 -qarch=440'} + : ${F77_OPTIMISE_FLAGS='-O2 -qarch=440'} + : ${F90_DEBUG_FLAGS='-g'} + : ${F77_DEBUG_FLAGS='-g'} + + : ${F90_SUFFIX='f'} + CCTK_WriteLine make.arch.defn 'F90FLAGS += $(BGL_$(subst .,,$(suffix $<))_FLAGS)' + CCTK_WriteLine make.arch.defn 'BGL_F90_FLAGS =' + CCTK_WriteLine make.arch.defn 'BGL_f90_FLAGS =' + CCTK_WriteLine make.arch.defn 'BGL_F_FLAGS = -qfixed' + CCTK_WriteLine make.arch.defn 'BGL_f_FLAGS = -qfixed' + + F77_VERSION=`$F77 2>&1 | head -n1` + F90_VERSION=`$F90 2>&1 | head -n1` + + # C/C++ compilers + case "$CC" in + blrts_xlc) + : ${C_DEPEND='$(CC) -M $(CPPFLAGS)'} + : ${C_DEPEND_OUT=' 2> /dev/null; mv $(basename $(basename $@)).d $@'} + : ${CFLAGS="-qmaxmem=64000 -qlanglvl=stdc99"} + : ${C_OPTIMISE_FLAGS='-O2 -qarch=440'} + CC_VERSION=`$CC 2>&1 | head -n1` + ;; + *) + ;; + esac + + case "$CXX" in + blrts_xlC) + : ${CXX_DEPEND='$(CXX) -M $(CPPFLAGS)'} + : ${CXX_DEPEND_OUT=' 2> /dev/null; mv $(basename $(basename $@)).d $@'} + : ${CXXFLAGS="-qmaxmem=64000 -qlanglvl=stdc99"} + : ${CXX_OPTIMISE_FLAGS='-O2 -qarch=440'} + CXX_VERSION=`$CXX 2>&1 | head -n1` + ;; + *) + ;; + esac + + # Linker + if test -z "$LIBS" -a "$LD" != 'xlf90' ; then + BGL_f90_path="`which $F90 | sed -e 's:/bin/.*::'`" + LIBDIRS="$BGL_f90_path/blrts_lib" + LIBS="xlf90 xlfmath m" + fi + + if test "x$cross_compiling" = 'xyes' ; then + ENDIAN=big + SIZEOF_LONG_LONG=8 + SIZEOF_LONG_INT=4 + SIZEOF_INT=4 + SIZEOF_SHORT_INT=2 + + SIZEOF_LONG_DOUBLE=8 + SIZEOF_DOUBLE=8 + SIZEOF_FLOAT=4 + + SIZEOF_POINTER=8 + + NULL_DEVICE='/dev/null' + fi + + # MPI stuff + if test -n "$MPI" ; then + BGL_MPI_BASE="`which mpicc | sed -e 's:/bin/.*::'`" + NATIVE_MPI_LIBS='mpich.rts msglayer.rts devices.rts rts.rts devices.rts rts.rts' + NATIVE_MPI_LIB_DIRS=$BGL_MPI_BASE/lib + NATIVE_MPI_INC_DIRS=$BGL_MPI_BASE/include + fi + +fi -- cgit v1.2.3