source: issm/trunk-jpl/scripts/win-msys2-create_local_msmpi_dir.sh@ 26034

Last change on this file since 26034 was 26034, checked in by jdquinn, 4 years ago

CHG: Modifications to build system and additional configurations in support of Windows 10 MSYS2 MinGW build

  • Property svn:executable set to *
File size: 1.8 KB
Line 
1#!/bin/bash
2#
3# Creates a local MS-MPI directory to be used for supplying header and library
4# paths to ISSM configuration as well as the configuration of certain external
5# packages.
6#
7# Local MS-MPI include and library paths are made available as environment
8# variables LOCAL_MSMPI_INC and LOCAL_MSMPI_LIB, respectively (script can be
9# sourced again).
10#
11# Paths may need to be modified in the future if Microsoft changes the
12# directory structure and/or file naming in the MS-MPI package. Paths are
13# based on Microsoft MPI v10.0,
14# https://www.microsoft.com/en-us/download/details.aspx?id=57467
15#
16LOCAL_MSMPI_ROOT="${ISSM_DIR}/MSMPI"
17LOCAL_MSMPI_INC="${LOCAL_MSMPI_ROOT}/include"
18LOCAL_MSMPI_LIB="${LOCAL_MSMPI_ROOT}/lib"
19MSMPI_RUNTIME_LIB="/c/Windows/System32/msmpi.dll"
20MSMPI_INC="/c/PROGRA~2/MICROS~2/MPI/Include"
21MSMPI_LIB="${ISSM_DIR}/externalpackages/windows/MSMPI/lib"
22
23cd ${ISSM_DIR}
24
25if [ -d ${LOCAL_MSMPI_ROOT} ]; then
26 echo "'${LOCAL_MSMPI_ROOT}' already exists!"
27 echo "If you need to recreate local MS-MPI directory, remove '${LOCAL_MSMPI_ROOT}' and rerun this script."
28else
29 mkdir ${LOCAL_MSMPI_ROOT} ${LOCAL_MSMPI_INC} ${LOCAL_MSMPI_LIB}
30
31 # Make SVN ignore local MS-MPI directory so that we do not accidentally
32 # commit it
33 svn propset svn:ignore ${LOCAL_MSMPI_ROOT} . &>/dev/null
34
35 # Copy MS-MPI header files
36 cp $MSMPI_INC/mpi.h ${LOCAL_MSMPI_INC}
37 cp $MSMPI_INC/mpi.f90 ${LOCAL_MSMPI_INC}
38 cp $MSMPI_INC/mpif.h ${LOCAL_MSMPI_INC}
39 cp $MSMPI_INC/mpio.h ${LOCAL_MSMPI_INC}
40 cp $MSMPI_INC/x64/mpifptr.h ${LOCAL_MSMPI_INC}
41
42 # Copy MS-MPI libraries
43 cp ${MSMPI_RUNTIME_LIB} ${LOCAL_MSMPI_LIB}
44
45 cd ${LOCAL_MSMPI_LIB}
46
47 # Create link to runtime library with MSYS prefix
48 ln -s ./msmpi.dll ./msys-msmpi.dll
49
50 # Create link to runtime library with lib prefix
51 ln -s ./msmpi.dll ./libmsmpi.dll
52fi
Note: See TracBrowser for help on using the repository browser.