#! /bin/sh # /*@@ # @file aix # @date Wed Jul 14 12:38:45 1999 # @author Tom Goodale # @desc # Known-architectures file for IBM AIX systems # @enddesc # @version $Header: /cactusdevcvs/Cactus/lib/make/known-architectures/aix,v 1.30 2007/02/27 05:27:23 schnetter Exp $ # @@*/ # Modified by Hee Il Kim for ppc64-unknown-linux-gnu architecture # date: Tue Mar 20 11:50:39 KST 2007 # Tested machine info # Linux node480 2.6.5-7.139-pseries64 #1 SMP Fri Jan 14 15:41:33 UTC 2005 ppc64 ppc64 ppc64 GNU/Linux # OS: SLES 9 # Compilers: IBM XL Fortran Advanced Edition for Linux 9.1, IBM XL C/C++ Advanced Edition for Linux 7.0 # 32/64bit, declared from bashrc -- KHI OBJECT_MODE=$OBJECT_MODE if test "$CCTK_CONFIG_STAGE" = 'preferred-compilers' ; then # commented by KHI # Hereafter, all the AIX_BITS replaced by OBJECT_MODE # # default to building 64-bit executables using the native AIX compilers # if test -z "$OBJECT_MODE" ; then # OBJECT_MODE=64 # fi if test -z "$CC"; then echo Setting C compiler to xlc CC=xlc fi if test -z "$CXX"; then echo Setting C++ compiler to xlC CXX=xlC fi if test -z "$F77"; then echo Setting F77 compiler to xlf77 F77=xlf77 fi if test -z "$F90"; then echo Setting F90 compiler to xlf90 F90=xlf90 fi # use the Cactus preprocessor for Fortran if test -z "$FPP"; then FPP='$(PERL) $(CCTK_HOME)/lib/sbin/cpp.pl' echo Setting FPP to $FPP fi else # commented by KHI # if test "X$OBJECT_MODE" != 'X32' -a "X$OBJECT_MODE" != 'X64' ; then # echo "Invalid setting '$OBJECT_MODE' for OBJECT_MODE (must be either '32' or '64')" # exit 1 # fi # Fortran compilers # suppress congratulatory message on successful compilation : ${F90FLAGS="-q$OBJECT_MODE -qextname -qsuppress=1501-510:cmpmsg"} : ${F77FLAGS="-q$OBJECT_MODE -qextname -qsuppress=1501-510:cmpmsg"} : ${F90_DEBUG_FLAGS='-g'} : ${F77_DEBUG_FLAGS='-g'} : ${F90_SUFFIX='f'} # Commented by KHI # CCTK_WriteLine make.arch.defn 'F90FLAGS += $(AIX_$(subst .,,$(suffix $<))_FLAGS)' # CCTK_WriteLine make.arch.defn 'F77FLAGS += $(AIX_$(subst .,,$(suffix $<))_FLAGS)' # CCTK_WriteLine make.arch.defn 'AIX_F90_FLAGS = -qfree' # CCTK_WriteLine make.arch.defn 'AIX_f90_FLAGS = -qfree' # CCTK_WriteLine make.arch.defn 'AIX_F77_FLAGS = -qfixed' # CCTK_WriteLine make.arch.defn 'AIX_f77_FLAGS = -qfixed' # CCTK_WriteLine make.arch.defn 'AIX_F_FLAGS = -qfixed' # CCTK_WriteLine make.arch.defn 'AIX_f_FLAGS = -qfixed' : ${FPP='$(PERL) $(CCTK_HOME)/lib/sbin/cpp.pl'} : ${F_DEPEND='$(FPP) -M $(FPPFLAGS)'} : ${F77_DEPEND=$F_DEPEND} F77_VERSION=`$F77 2>&1 | head -n1` F90_VERSION=`$F90 2>&1 | head -n1` # NOTE IBM XLC/XLF optimizations. # Tested -02 through -O5. On BSSNCarpet runs, "-O3 -qhot" performed # best--but beware, it moves instructions. While turning on -qstrict # fixes this, it also degrades performance. The -qarch=auto causes the # code to be customized for the architecture on which it is compiled. # The higher levels turn on -qipa which does global optimizations and # work best if this option is also supplied at link time. --SW # C/C++ compilers # XL C/C++ for linux produces files with ".d" extension not ".u" as in AIX version after compiled with "-M" option. Note the changes of the extension! -- KHI case "$CC" in gcc) : ${C_DEPEND_OUT=' > $@'} CC_VERSION="`$CC -v 2>&1 | grep -i version | tail -n1`" ;; cc|xlc|xlc_r) : ${C_DEPEND='$(CC) -E -M $(CPPFLAGS)'} : ${C_DEPEND_OUT=' > /dev/null ; mv $(basename $(basename $@)).d $@'} : ${CFLAGS="-q$OBJECT_MODE -qlanglvl=stdc99"} : ${C_OPTIMISE_FLAGS="-O3 -qarch=auto -qtune=auto -qcache=auto -qhot"} CC_VERSION=`$CC 2>&1 | head -n1` ;; *) ;; esac case "$CXX" in 'g++'|'c++') : ${CXX_DEPEND_OUT=' > $@'} CXX_VERSION="`$CXX -v 2>&1 | grep -i version | tail -n1`" ;; xlC|xlC_r) : ${CXX_DEPEND='$(CXX) -E -M $(CPPFLAGS)'} : ${CXX_DEPEND_OUT=' > /dev/null ; mv $(basename $(basename $@)).d $@'} : ${CXXFLAGS="-q$OBJECT_MODE"} : ${CXX_OPTIMISE_FLAGS="-O3 -qarch=auto -qtune=auto -qcache=auto -qhot"} CXX_VERSION=`$CXX 2>&1 | head -n1` ;; *) ;; esac case "$F90" in xlf|xlf_r|xlf90|xlf90_r) : ${F90FLAGS="-q$OBJECT_MODE"} : ${F90_OPTIMISE_FLAGS="-O3 -qarch=auto -qtune=auto -qcache=auto -qhot"} ;; *) : ${F90_OPTIMISE_FLAGS="-O3"} ;; esac case "$F77" in xlf|xlf_r|xlf77|xlf77_r|xlf90|xlf90_r) : ${FF77LAGS="-q$OBJECT_MODE"} : ${F77_OPTIMISE_FLAGS="-O3 -qarch=auto -qtune=auto -qcache=auto -qhot"} ;; *) : ${F77_OPTIMISE_FLAGS="-O3"} ;; esac # Linker # commented by KHI # declaration of LIBS is essential for successful building # : ${ARFLAGS="-X$OBJECT_MODE -rucs"} if test -z "$LIBS" -a "$LD" != 'xlf90' ; then LIBS=xlf90 fi # in 32-bit mode: allow each process to use up to 2 GB of virtual memory # (default is only 256 MB) if test "$LD" != 'g++' -a "$LD" != 'c++'; then if test "$OBJECT_MODE" = 32; then : ${LDFLAGS="-q$OBJECT_MODE -bmaxdata:0x80000000"} else : ${LDFLAGS="-q$OBJECT_MODE"} fi fi # MPI stuff # removed by KHI fi