fixed fortran compiler
[charm.git] / src / arch / mpi-linux-x86_64 / conv-mach.sh
1
2 # user enviorn var: MPICXX and MPICC
3 # or, use the definition in file $CHARMINC/MPIOPTS
4 if test -x "$CHARMINC/MPIOPTS"
5 then
6   . $CHARMINC/MPIOPTS
7 else
8   MPICXX_DEF=mpicxx
9   MPICC_DEF=mpicc
10 fi
11
12 test -z "$MPICXX" && MPICXX=$MPICXX_DEF
13 test -z "$MPICC" && MPICC=$MPICC_DEF
14 test "$MPICXX" != "$MPICXX_DEF" && /bin/rm -f $CHARMINC/MPIOPTS
15 if test ! -f "$CHARMINC/MPIOPTS"
16 then
17   echo MPICXX_DEF=$MPICXX > $CHARMINC/MPIOPTS
18   echo MPICC_DEF=$MPICC >> $CHARMINC/MPIOPTS
19   chmod +x $CHARMINC/MPIOPTS
20 fi
21
22 CMK_REAL_COMPILER=`$MPICXX -show 2>/dev/null | cut -d' ' -f1 `
23 case "$CMK_REAL_COMPILER" in
24 g++) CMK_AMD64="-m64 -fPIC" ;;
25 charmc)  echo "Error> charmc can not call AMPI's mpicxx/mpiCC wrapper! Please fix your PATH."; exit 1 ;;
26 esac
27
28 CMK_CPP_CHARM="/lib/cpp -P"
29 CMK_CPP_C="$MPICC -E"
30 CMK_CC="$MPICC $CMK_AMD64 "
31 CMK_CXX="$MPICXX $CMK_AMD64 "
32 CMK_CXXPP="$MPICXX -E $CMK_AMD64 "
33
34 #CMK_SYSLIBS="-lmpich"
35 CMK_LIBS="-lckqt $CMK_SYSLIBS "
36 CMK_LD_LIBRARY_PATH="-Wl,-rpath,$CHARMLIBSO/"
37
38 CMK_NATIVE_CC="gcc $CMK_AMD64 "
39 CMK_NATIVE_LD="gcc $CMK_AMD64 "
40 CMK_NATIVE_CXX="g++ $CMK_AMD64 "
41 CMK_NATIVE_LDXX="g++ $CMK_AMD64 "
42 CMK_NATIVE_LIBS=""
43
44 # fortran compiler 
45 CMK_CF90=`which f95 2>/dev/null`
46 if test -n "$CMK_CF90"
47 then
48 #    CMK_FPP="/lib/cpp -P -CC"
49 #    CMK_CF90="$CMK_CF90 -fpic -fautomatic -fdollar-ok "
50 #    CMK_CF90_FIXED="$CMK_CF90 -ffixed-form "
51 #    CMK_F90LIBS="-lgfortran "
52 #    CMK_F90_USE_MODDIR=1
53 #    CMK_F90_MODINC="-I"
54 #    CMK_MOD_NAME_ALLCAPS=
55 #    CMK_MOD_EXT="mod"
56     . $CHARMINC/conv-mach-gfortran.sh
57 else
58     CMK_CF77="g77 "
59     CMK_CF90="f90 "
60     CMK_CF90_FIXED="$CMK_CF90 -W132 "
61     CMK_F90LIBS="-L/usr/absoft/lib -L/opt/absoft/lib -lf90math -lfio -lU77 -lf77math "
62     CMK_F77LIBS="-lg2c "
63     CMK_F90_USE_MODDIR=1
64     CMK_F90_MODINC="-p"
65 fi
66
67 CMK_QT='generic64'
68 CMK_RANLIB="ranlib"
69