#! /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$ # @@*/ if test "$CCTK_CONFIG_STAGE" = 'preferred-compilers' ; then # default to building 64-bit executables using the native AIX compilers if test -z "$AIX_BITS" ; then AIX_BITS=64 fi if test -z "$CC"; then echo Setting C compiler to xlc CC=xlc_r fi if test -z "$CXX"; then echo Setting C++ compiler to xlC CXX=xlC_r 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 if test "X$AIX_BITS" != 'X32' -a "X$AIX_BITS" != 'X64' ; then echo "Invalid setting '$AIX_BITS' for AIX_BITS (must be either '32' or '64')" exit 1 fi : ${ARFLAGS="-X$AIX_BITS -rucs"} : ${F90FLAGS="-q$AIX_BITS -qmaxmem=-1 -qspill=10000"} : ${F77FLAGS="-q$AIX_BITS -qmaxmem=-1 -qfixed"} : ${F90_OPTIMISE_FLAGS='-O5'} : ${F77_OPTIMISE_FLAGS='-O5'} : ${F90_DEBUG_FLAGS='-g'} : ${F77_DEBUG_FLAGS='-g'} : ${F90_SUFFIX='f'} CCTK_WriteLine make.arch.defn 'F90FLAGS += $(AIX_$(subst .,,$(suffix $<))_FLAGS)' CCTK_WriteLine make.arch.defn 'AIX_F90_FLAGS =' CCTK_WriteLine make.arch.defn 'AIX_f90_FLAGS =' 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' case "$CC" in gcc) : ${C_DEPEND_OUT=' > $@'} ;; cc|xlc|xlc_r) : ${C_DEPEND='$(CC) -E -M $(CPPFLAGS)'} : ${C_DEPEND_OUT=' > /dev/null ; mv $(basename $(basename $@)).u $@'} : ${CFLAGS="-q$AIX_BITS -qspill=17000 -qmaxmem=-1"} ;; *) ;; esac case "$CXX" in 'g++'|'c++') : ${CXX_DEPEND_OUT=' > $@'} ;; xlC|xlC_r) : ${CXX_DEPEND='$(CXX) -E -M $(CPPFLAGS)'} : ${CXX_DEPEND_OUT=' > /dev/null ; mv $(basename $(basename $@)).u $@'} : ${CXXFLAGS="-q$AIX_BITS -qspill=10000 -qmaxmem=-1"} ;; *) ;; esac : ${F_DEPEND='$(PERL) $(CCTK_HOME)/lib/sbin/cpp.pl -M $(CPPFLAGS)'} : ${F77_DEPEND=$F_DEPEND} if test -z "$LIBS" -a "$LD" != 'xlf90' ; then LIBS=xlf90 if test -r /usr/lib/libxlopt.a ; then LIBS="$LIBS xlopt" fi 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 "$AIX_BITS" = 32; then : ${LDFLAGS="-q$AIX_BITS -bmaxdata:0x80000000"} else : ${LDFLAGS="-q$AIX_BITS"} fi fi # MPI stuff if test -n "$MPI" ; then # must not set linker flags for 64-bit configurations # (LD will figure these out) if test "X$AIX_BITS" = "X32" ; then NATIVE_MPI_LIBS='mpi' NATIVE_MPI_LIB_DIRS='/usr/lpp/ppe.poe/lib' else NATIVE_MPI_LIBS=' ' fi NATIVE_MPI_INC_DIRS='/usr/lpp/ppe.poe/include' if test "X$MPI" = 'XNATIVE' ; then case "$CC:$CXX" in "xlc:xlC"|"cc:xlC") LD="mpCC -q$AIX_BITS" ;; "xlc_r:xlC_r") LD="mpCC_r -q$AIX_BITS" ;; *) echo 'NATIVE MPI requires xlc and xlC' echo 'Please reconfigure with these compilers' exit 1 ;; esac fi fi fi