recovery from hard failures
[charm.git] / src / arch / mpi-linux-ppc / cc-mpicxx.sh
1
2 # user enviorn var: MPICXX and MPICC
3 # or, use the definition in file $CHARMINC/MPIOPTS
4 MPICXX_DEF=mpicxx
5 MPICC_DEF=mpicc
6
7 MPICXX=$MPICXX_DEF
8 MPICC=$MPICC_DEF
9 test "$MPICXX" != "$MPICXX_DEF" && /bin/rm -f $CHARMINC/MPIOPTS
10 if test ! -f "$CHARMINC/MPIOPTS"
11 then
12   echo MPICXX_DEF=$MPICXX > $CHARMINC/MPIOPTS
13   echo MPICC_DEF=$MPICC >> $CHARMINC/MPIOPTS
14   chmod +x $CHARMINC/MPIOPTS
15 fi
16
17 CMK_REAL_COMPILER=`$MPICXX -show 2>/dev/null | cut -d' ' -f1 `
18 case "$CMK_REAL_COMPILER" in
19 g++) CMK_AMD64="-fPIC" ;;
20 esac
21
22 CMK_CPP_CHARM="/lib/cpp -P"
23 CMK_CPP_C="$MPICC -E"
24 CMK_CC="$MPICC $CMK_AMD64 "
25 CMK_CXX="$MPICXX $CMK_AMD64 "
26 CMK_CXXPP="$MPICXX -E $CMK_AMD64 "
27 CMK_LD="$CMK_CC "
28 CMK_LDXX="$CMK_CXX "
29
30 CMK_NATIVE_CC="$CMK_CC"
31 CMK_NATIVE_LD="$CMK_LD"
32 CMK_NATIVE_CXX="$CMK_CXX"
33 CMK_NATIVE_LDXX="$CMK_LDXX"
34
35 # fortran compiler 
36 # for Intel Fortran compiler 8.0 and higher which is renamed to ifort from ifc
37 # does not work for ifc 7.0
38 CMK_CF77="mpif77 -auto -fPIC "
39 CMK_CF90="mpif90 -auto -fPIC "
40 CMK_CF90_FIXED="$CMK_CF90 -132 -FI "
41 F90DIR=`which ifort 2> /dev/null`
42 if test -h "$F90DIR"
43 then
44   F90DIR=`readlink $F90DIR`
45 fi
46 if test -x "$F90DIR"
47 then
48   F90LIBDIR="`dirname $F90DIR`/../lib"
49   F90MAIN="$F90LIBDIR/for_main.o"
50 fi
51 # for_main.o is important for main() in f90 code
52 CMK_F90MAINLIBS="$F90MAIN "
53 CMK_F90LIBS="-L$F90LIBDIR -lifcore -lifport "
54 CMK_F77LIBS="$CMK_F90LIBS"
55
56 CMK_F90_USE_MODDIR=""
57
58