Changeset 26039


Ignore:
Timestamp:
03/04/21 15:39:08 (4 years ago)
Author:
jdquinn
Message:

CHG: Modified configuration files for Windows build; external packages for MS-MPI and MinGW MEX; minor clean up

Location:
issm/trunk-jpl
Files:
5 added
5 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/etc/environment.sh

    r26034 r26039  
    168168} #}}}
    169169
    170 #######################
    171 # OS-specific handling
    172 #######################
    173 
    174 OS=$(uname -s)
    175 
    176 if [[ "${OS}" == MINGW* || "${OS}" == MSYS* ]]; then
    177         # If this is a Windows build, we need to copy MSMPI to working $ISSM_DIR
    178         MSMPI_ROOT="${ISSM_DIR}/MSMPI"
    179         if [ ! -d "${MSMPI_ROOT}" ]; then
    180                 ${ISSM_DIR}/scripts/win-msys2-create_local_msmpi_dir.sh
    181         fi
    182         export MSMPI_ROOT # Used in installation of ParMETIS, ScaLAPACK
    183         path_prepend "${ISSM_DIR}/bin" # Lets dynamic linker find DLLs
    184         cpath_prepend "${MSMPI_ROOT}/include"
    185         library_path_prepend "${MSMPI_ROOT}/lib"
    186 fi
    187 
    188 # Windows compilers
    189 if [[ "${ISSM_ARCH}" == "cygwin-intel" ]]; then
    190         source ${ISSM_DIR}/externalpackages/windows/windows_environment.sh
    191 fi
    192 
    193170path_append "${ISSM_DIR}/aux-config"
    194171path_append "${ISSM_DIR}/scripts"
     
    201178if [ -z "${ISSM_EXT_DIR+x}" ]; then
    202179        export ISSM_EXT_DIR="${ISSM_DIR}/externalpackages"
     180fi
     181
     182#######################
     183# OS-specific handling
     184#######################
     185
     186OS=$(uname -s)
     187
     188if [[ "${OS}" == MINGW* ]]; then
     189        MSMPI_ROOT="${ISSM_EXT_DIR}/msmpi/install"
     190        if [ -d "${MSMPI_ROOT}" ]; then
     191                export MSMPI_ROOT # Used in installation of ParMETIS, ScaLAPACK
     192                path_prepend "${ISSM_DIR}/bin" # Allows dynamic loaded to find DLLs
     193                cpath_prepend "${MSMPI_ROOT}/include"
     194                library_path_prepend "${MSMPI_ROOT}/lib"
     195        fi
     196
     197        MPIEXEC_DIR=$(cygpath -u $(cygpath -ms "/c/Program Files/Microsoft MPI/Bin"))
     198        if [ -d "${MPIEXEC_DIR}" ]; then
     199                export MPIEXEC_DIR
     200                path_append "${MPIEXEC_DIR}"
     201        fi
     202
     203        path_prepend "${ISSM_DIR}/bin" # Allows dynamic loader to find DLLs
     204fi
     205
     206# Windows compilers
     207if [[ "${ISSM_ARCH}" == "cygwin-intel" ]]; then
     208        source ${ISSM_DIR}/externalpackages/windows/windows_environment.sh
    203209fi
    204210
     
    284290if [ -d "${BLAS_ROOT}" ]; then
    285291        export BLAS_ROOT # Used in installation of LAPACK, ScaLAPACK, PETSc
    286         path_append "${BLAS_ROOT}/lib" # Lets dynamic linker find DLLs
    287292        library_path_append "${BLAS_ROOT}/lib"
    288293        ld_library_path_append "${BLAS_ROOT}/lib"
     294
     295        if [[ "${OS}" == MINGW* ]]; then
     296                path_append "${BLAS_ROOT}/lib" # Allows dynamic loaded to find DLLs
     297        fi
    289298fi
    290299
     
    292301if [ -d "${LAPACK_ROOT}" ]; then
    293302        export LAPACK_ROOT # Used in installation of ScaLAPACK, MUMPS, PETSc
    294         path_append "${LAPACK_ROOT}/lib" # Lets dynamic linker find DLLs
    295303        library_path_append "${LAPACK_ROOT}/lib"
    296304        ld_library_path_append "${LAPACK_ROOT}/lib"
     305
     306        if [[ "${OS}" == MINGW* ]]; then
     307                path_append "${LAPACK_ROOT}/lib" # Allows dynamic loaded to find DLLs
     308        fi
    297309fi
    298310
     
    300312if [ -d "${METIS_ROOT}" ]; then
    301313        export METIS_ROOT # Used in installation of ParMETIS, Gmsh, PETSc
    302         path_append "${METIS_ROOT}/lib" # Lets dynamic linker find DLLs
    303314        library_path_prepend "${METIS_ROOT}/lib"
    304315        ld_library_path_prepend "${METIS_ROOT}/lib"
     316
     317        if [[ "${OS}" == MINGW* ]]; then
     318                path_append "${METIS_ROOT}/lib" # Allows dynamic loaded to find DLLs
     319        fi
    305320fi
    306321
     
    308323if [ -d "${MUMPS_ROOT}" ]; then
    309324        export MUMPS_ROOT # Used in installation of PETSc
    310         path_append "${MUMPS_ROOT}/lib" # Lets dynamic linker find DLLs
    311325        library_path_append "${MUMPS_ROOT}/lib"
     326
     327        if [[ "${OS}" == MINGW* ]]; then
     328                path_append "${MUMPS_ROOT}/lib" # Allows dynamic loaded to find DLLs
     329        fi
    312330fi
    313331
     
    315333if [ -d "${PARMETIS_ROOT}" ]; then
    316334        export PARMETIS_ROOT # Used in installation of MUMPS, PETSc
    317         path_append "${PARMETIS_ROOT}/lib" # Lets dynamic linker find DLLs
    318335        library_path_prepend "${PARMETIS_ROOT}/lib"
    319336        ld_library_path_prepend "${PARMETIS_ROOT}/lib"
     337
     338        if [[ "${OS}" == MINGW* ]]; then
     339                path_append "${PARMETIS_ROOT}/lib" # Allows dynamic loaded to find DLLs
     340        fi
    320341fi
    321342
     
    323344if [ -d "${SCALAPACK_ROOT}" ]; then
    324345        export SCALAPACK_ROOT # Used in installation of MUMPS, PETSc
    325         path_append "${SCALAPACK_ROOT}/lib" # Lets dynamic linker find DLLs
    326346        library_path_append "${SCALAPACK_ROOT}/lib"
     347
     348        if [[ "${OS}" == MINGW* ]]; then
     349                path_append "${SCALAPACK_ROOT}/lib" # Allows dynamic loaded to find DLLs
     350        fi
    327351fi
    328352
     
    336360if [ -d "${PETSC_ROOT}" ]; then
    337361        export PETSC_ROOT # Used in installation of Gmsh
    338         path_append "${PETSC_ROOT}/lib" # Lets dynamic linker find DLLs
    339362        library_path_prepend "${PETSC_ROOT}/lib"
    340363        ld_library_path_prepend "${PETSC_ROOT}/lib"
     364
     365        if [[ "${OS}" == MINGW* ]]; then
     366                path_append "${PETSC_ROOT}/lib" # Allows dynamic loaded to find DLLs
     367        fi
    341368
    342369        # In case we have installed certain external packages via PETSc
     
    511538TRIANGLE_ROOT="${ISSM_EXT_DIR}/triangle/install"
    512539if [ -d "${TRIANGLE_ROOT}" ]; then
    513         path_append "${TRIANGLE_ROOT}/lib" # Lets dynamic linker find DLLs
    514540        ld_library_path_append "${TRIANGLE_ROOT}/lib"
    515541        dyld_library_path_append "${TRIANGLE_ROOT}/lib"
     542
     543        if [[ "${OS}" == MINGW* ]]; then
     544                path_append "${TRIANGLE_ROOT}/lib" # Allows dynamic loaded to find DLLs
     545        fi
    516546fi
    517547
  • issm/trunk-jpl/externalpackages/petsc/install-3.14-win-msys2-mingw-msmpi.sh

    r26034 r26039  
    55# - You must install various needed packages with,
    66#
    7 #               pacman -S autoconf make automake-wrapper bison git mingw-w64-x86_64-freeglut mingw-w64-x86_64-toolchain patch python perl pkg-config pkgfile rebase tar time tzcode unzip which mingw-w64-x86_64-libmicroutils
     7#               pacman -S git mingw-w64-x86_64-freeglut mingw-w64-x86_64-toolchain python pkg-config mingw-w64-x86_64-libmicroutils
    88#
    9 # then remove the MinGW 64-bit version of Python (and depdendent packages) with,
     9# then remove the MinGW 64-bit version of Python (and dependent packages) with,
    1010#
    1111#               pacman -R mingw-w64-x86_64-gdb-multiarch mingw-w64-x86_64-gdb mingw-w64-x86_64-python
     
    6969        --with-ssl=0 \
    7070        --with-proc-filesystem=0 \
    71         --with-mpiexec="/c/PROGRA~1/MICROS~1/Bin/mpiexec.exe" \
     71        --with-mpiexec="${MPIEXEC_DIR}/mpiexec.exe" \
    7272        --with-mpi-lib="-L${MSMPI_ROOT}/lib -lmsmpi" \
    7373        --with-mpi-include="${MSMPI_ROOT}/include" \
  • issm/trunk-jpl/jenkins/ross-win-msys2-mingw-msmpi-basic

    r26034 r26039  
     1MATLAB_PATH=$(cygpath -u $(cygpath -ms "/c/Program Files/MATLAB/R2019b"))
     2
    13ISSM_CONFIG='\
    24        --prefix=${ISSM_DIR} \
     
    2527#List of external pakages to be installed and their installation scripts
    2628EXTERNALPACKAGES="
     29        msmpi           install.sh
    2730        petsc           install-3.14-win-msys2-mingw-msmpi.sh
    2831        triangle        install-win-msys2-mingw.sh
     
    4851
    4952# Number of CPUs used in the nightly runs
    50 NUMCPUS_RUN=1
     53NUMCPUS_RUN=2
    5154
    5255# Nightly run options
  • issm/trunk-jpl/src/m/classes/clusters/generic.m

    r26034 r26039  
    139139                                fprintf(fid,'@echo off\n');
    140140
    141                                 if IssmConfig('_HAVE_PETSC_MPI_'),
    142                                         warning('parallel runs not allowed yet in Windows. Defaulting to 1 cpus');
    143                                         cluster.np=1;
    144                                 end
     141                                % if IssmConfig('_HAVE_PETSC_MPI_'),
     142                                %       warning('parallel runs not allowed yet in Windows. Defaulting to 1 cpus');
     143                                %       cluster.np=1;
     144                                % end
    145145
    146146                                if cluster.np>1,
    147                                         % fprintf(fid,'"C:\\Program Files\\MPICH2\\bin\\mpiexec.exe" -n %i "%s/%s" %s ./ %s ',cluster.np,cluster.codepath,executable,solution,modelname);
    148                                         fprintf(fid,'"C:\\PROGRA~1\\MICROS~1\\Bin\\mpiexec.exe" -n %i "%s/%s" %s ./ %s ',cluster.np,cluster.codepath,executable,solution,modelname);
    149                                 else
    150                                         fprintf(fid,'"%s/%s" %s ./ %s ',cluster.codepath,executable,solution,modelname);
     147                                        % fprintf(fid,'"C:\\Program Files\\MPICH2\\bin\\mpiexec.exe" -n %i "%s/%s" %s ./ %s',cluster.np,cluster.codepath,executable,solution,modelname);
     148                                        fprintf(fid,'"C:\\Program Files\\Microsoft MPI\\Bin\\mpiexec.exe" -n %i "%s/%s" %s ./ %s',cluster.np,cluster.codepath,executable,solution,modelname);
     149                                else
     150                                        fprintf(fid,'"%s/%s" %s ./ %s',cluster.codepath,executable,solution,modelname);
    151151                                end
    152152                                fclose(fid);
     
    305305
    306306                        if ~ispc,
    307 
    308307                                %figure out what shell extension we will use:
    309308                                if isempty(strfind(cluster.shell,'csh')),
     
    319318                                else
    320319                                        if ~batch,
    321                                         launchcommand=['source ' cluster.etcpath '/environment.' shellext ' && cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ...
     320                                                launchcommand=['source ' cluster.etcpath '/environment.' shellext ' && cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ...
    322321                                                ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz  && source  ' modelname '.queue '];
    323322                                        else
    324                                         launchcommand=['source ' cluster.etcpath '/environment.' shellext ' && cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ...
     323                                                launchcommand=['source ' cluster.etcpath '/environment.' shellext ' && cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ...
    325324                                                ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz '];
    326325                                        end
  • issm/trunk-jpl/src/m/solve/waitonlock.m

    r21766 r26039  
    22%WAITONLOCK - wait for a file
    33%
    4 %   This routine will return when a file named 'lockfilename' is written to disk.
    5 %   Also check for outlog file be cause it might bewritten several seconds
    6 %   after the lock file.
     4%   This routine will return when a file named 'lockfilename' is written to
     5%   disk. Also check for outlog file be cause it might be written several
     6%   seconds after the lock file.
    77%   If the time limit given in input is exceeded, return 0
    88%
Note: See TracChangeset for help on using the changeset viewer.