Changeset 1439 for issm/trunk/m4


Ignore:
Timestamp:
07/30/09 14:53:37 (16 years ago)
Author:
Eric.Larour
Message:

All changes necessary to carry out compilation under windows intel platforms

Location:
issm/trunk/m4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/m4/issm_options.m4

    r1382 r1439  
    5151                MATLABINCL=-I"$MATLAB_ROOT/extern/include";
    5252                dnl  use matlab provided mexext routine to test for extension
    53                 MEXEXT=`$MATLAB_ROOT/bin/mexext`
    54                 MEXEXT=".$MEXEXT"
     53                               
    5554                MEX=$MATLAB_ROOT/bin/mex
    5655
     
    6665                                MEXLINK="-pthread -shared -W2,--version-script,${MATLAB_ROOT}/extern/lib/glnx86/mexFunction.map";
    6766                        fi
     67                        MEXEXT=`$MATLAB_ROOT/bin/mexext`
     68                        MEXEXT=".$MEXEXT"
    6869                        ;;
    6970                        *darwin9.6.0*)
    7071                        MEXLIB=-L"$MATLAB_ROOT/bin/maci/ -lmex -lmx"
    7172                        MEXLINK="-Wl,-twolevel_namespace -undefined error -arch i386 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -bundle -Wl,-exported_symbols_list,$MATLAB_ROOT/extern/lib/maci/mexFunction.map"
     73                        MEXEXT=`$MATLAB_ROOT/bin/mexext`
     74                        MEXEXT=".$MEXEXT"
     75                        ;;
     76                        *cygwin*)
     77                        MEXLIB="-dll -export:mexFunction -LIBPATH:\"$MATLAB_ROOT\extern\lib\win32\microsoft\" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  -NOLOGO -INCREMENTAL:NO"
     78
     79
     80                        MEXEXT=`$MATLAB_ROOT/bin/mexext.bat`
     81                        MEXEXT=".$MEXEXT"
    7282                        ;;
    7383
     
    176186                dnl defaults
    177187                HAVE_METIS=yes
     188               
     189                case "${host_os}" in
     190                        *cygwin*)
     191                        METISLIB="-LIBPATH:\"$METIS_ROOT\" libmetis.lib"
     192                        ;;
     193                        *linux*)
     194                        METISLIB=-L"$METIS_ROOT/ -lmetis"
     195                        ;;
     196                        *darwin9.6.0*)
     197                        METISLIB=-L"$METIS_ROOT/ -lmetis"
     198                        ;;
     199                esac
     200                                                 
    178201                METISINCL=-I"$METIS_ROOT/Lib"
    179                 METISLIB=-L"$METIS_ROOT/ -lmetis"
    180202
    181203                AC_DEFINE([_HAVE_METIS_],[1],[with Metis in ISSM src])
     
    256278               
    257279                        PETSCINCL="-I$PETSC_ROOT/include  -I$PETSC_ROOT/ -I$PETSC_ROOT/bmake/$PETSC_ARCH -I$PETSC_ROOT/src/mat/impls/dense/mpi/plapack/"
    258                         PETSCLIB="-L$PETSC_ROOT/lib/$PETSC_ARCH -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetsc  -lpetscsnes -lpetscts"
     280               
     281                        case "${host_os}" in
     282                                *cygwin*)
     283                                PETSCLIB="-link -LIBPATH:\"$PETSC_ROOT/lib/$PETSC_ARCH\" libpetscksp.lib  libpetscdm.lib  libpetscmat.lib  libpetscvec.lib libpetsc.lib  libpetscsnes.lib libpetscts.lib libmpiuni.lib"
     284                                ;;
     285                                *linux*)
     286                                PETSCLIB="-L$PETSC_ROOT/lib/$PETSC_ARCH -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetsc  -lpetscsnes -lpetscts"
     287                                ;;
     288                                *darwin9.6.0*)
     289                                PETSCLIB="-L$PETSC_ROOT/lib/$PETSC_ARCH -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetsc  -lpetscsnes -lpetscts"
     290                                ;;
     291                        esac
    259292                                                 
    260293
     
    273306
    274307        if test $HAVE_PETSC = no; then
    275                 if test "$PARALLEL_VALUE" = "yes" ; then
    276                         AC_MSG_ERROR([could not find petsc. user should specify --with-petsc-dir and --with-petsc-arch options. Petsc is needed to run ISSM in paralle!])
    277                 fi
     308                AC_MSG_ERROR([could not find petsc. user should specify --with-petsc-dir and --with-petsc-arch options. Petsc is needed to run ISSM!])
    278309        else
    279310                AC_MSG_RESULT($HAVE_PETSC)
    280311        fi
    281312
     313        dnl: when running in serial mode, MPI must be ignored, and set to internal petsc mpiuni:
     314        if test "$PARALLEL_VALUE" = "no" ; then
     315                HAVE_MPI=yes
     316                MPIINCL=-I"$PETSC_ROOT/include/mpiuni"
     317
     318                case "${host_os}" in
     319                        *cygwin*)
     320                        MPILIB="-link -LIBPATH:\"$PETSC_ROOT/lib/$PETSC_ARCH\" libmpiuni.lib"
     321                        ;;
     322                        *linux*)
     323                        MPILIB="-L$PETSC_ROOT/lib/$PETSC_ARCH -lmpiuni"
     324                        ;;
     325                        *darwin9.6.0*)
     326                        MPILIB="-L$PETSC_ROOT/lib/$PETSC_ARCH -lmpiuni"
     327                        ;;
     328                esac
     329                                                                 
     330
     331
     332                       
     333                AC_DEFINE([_HAVE_MPI_],[1],[with Mpi in ISSM src])
     334                AC_DEFINE([HAVE_MPI],[1],[with Mpi in ISSM src])
     335                AC_SUBST([MPIINCL])
     336                AC_SUBST([MPILIB])
     337        fi
     338       
    282339
    283340        dnl Slepc directory
     
    338395                HAVE_BLASLAPACK=yes
    339396                BLASLAPACKINCL=""
    340                 dnl BLASLAPACKLIB=-L"$BLASLAPACK_ROOT -lmkl_lapack -lmkl -lguide"
    341                 BLASLAPACKLIB=-L"$BLASLAPACK_ROOT -lfblas -lflapack"
     397               
     398                dnl: branch on whether we are running on windows or linux.
     399                case "${host_os}" in
     400                        *cygwin*)
     401                        BLASLAPACKLIB="-link -LIBPATH:\"$BLASLAPACK_ROOT\" libf2cblas.lib  libf2clapack.lib"
     402                        ;;
     403                        *linux*)
     404                        BLASLAPACKLIB=-L"$BLASLAPACK_ROOT -lfblas -lflapack"
     405                        ;;
     406                        *darwin9.6.0*)
     407                        BLASLAPACKLIB=-L"$BLASLAPACK_ROOT -lfblas -lflapack"
     408                        ;;
     409                esac
     410                                                                 
     411
    342412
    343413                AC_DEFINE([_HAVE_BLASLAPACK_],[1],[with blas lapack in ISSM src])
     
    489559        AC_MSG_RESULT(done)
    490560
     561        dnl vendor?
     562        AC_ARG_WITH([vendor],
     563                          AS_HELP_STRING([--with-vendor = VENDOR], [vendor name, ex: intel]),
     564                         [VENDOR=$withval],[VENDOR=""])
     565        AC_MSG_CHECKING(for vendor compilers )
     566        if test -n "$VENDOR"; then
     567
     568                if  test $VENDOR = intel; then
     569                        export CC=icl
     570                        export CXX=icl
     571                        export CXXFLAGS="-DWIN32 -D_INTEL_"
     572                else
     573                AC_MSG_ERROR([unknow compiler vendor!])
     574                fi
     575        fi
     576
    491577])
  • issm/trunk/m4/matlab.m4

    r1 r1439  
    289289                                break
    290290                        fi
     291                               
     292                                # For Matlab R2008 and more, the version number is stored in bin/util/mex/version.txt
     293                        ax_cv_matlab_version=`cat $MATLAB/bin/util/mex/version.txt`
     294                        if test -n "$ax_cv_matlab_version" ; then
     295                                break
     296                        fi
     297
    291298                fi
    292299        done
     
    305312    MATLAB_MINOR=`echo $MATLAB_VERSION | sed -e 's/^@<:@0-9@:>@*\.\(@<:@0-9@:>@*\).*/\1/'`
    306313    ;;
     314  R2009a)
     315        MATLAB_VERSION=R2009a
     316    MATLAB_MAJOR=R2009
     317    MATLAB_MINOR=a
     318        ;;
    307319  *)
    308320    if test x$ax_enable_matlab = xyes ; then
Note: See TracChangeset for help on using the changeset viewer.