Skip to content
Snippets Groups Projects
Allwmake 1.59 KiB
Newer Older
  • Learn to ignore specific revisions
  • cd ${0%/*} || exit 1    # Run from this directory
    
    # Parse arguments for library compilation
    targetType=libso
    . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
    
    # get SCOTCH_VERSION, SCOTCH_ARCH_PATH
    
    if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config.sh/scotch`
    
    then
        . $settings
        echo "using SCOTCH_ARCH_PATH=$SCOTCH_ARCH_PATH"
    else
        echo
    
        echo "Error: no config.sh/scotch settings"
    
    # define how to create an mpi-versioned library of $targetType
    
    # compile into qualified directory
    # use sentinel file to handle version changes
    #
    wmakeMpiLib()
    {
        set +x
        for libName
        do
        (
            WM_OPTIONS="$WM_OPTIONS$WM_MPLIB"
    
            whichmpi="$WM_PROJECT_DIR/platforms/$WM_OPTIONS/src/parallel/decompose/$libName/using:$FOAM_MPI"
            whichscotch="$WM_PROJECT_DIR/platforms/$WM_OPTIONS/src/parallel/decompose/$libName/using:$SCOTCH_VERSION"
    
            [ -e "$whichmpi" -a -e "$whichscotch" ] || wclean $libName
    
            echo "wmake $targetType $libName"
            wmake $targetType $libName
    
    wmakeLnInclude decompositionMethods
    
    
        wmake $targetType scotchDecomp
    
    
        if [ -d "$FOAM_LIBBIN/$FOAM_MPI" ]
        then
            wmakeMpiLib ptscotchDecomp
        fi
    
    else
        echo
        echo "Skipping scotchDecomp (ptscotchDecomp)"
        echo
    
    
    # Try and build metisDecomp (has own logic)
    
    (cd metisDecomp && ./Allwmake $targetType)
    
    wmake $targetType decompositionMethods
    
    # ----------------------------------------------------------------- end-of-file