Skip to content

Commit

Permalink
[OpenMPI] add a new port (#7142)
Browse files Browse the repository at this point in the history
* [OpenMPI] add a new port

* [OpenMPI] enable VCPKG_CONCURRENCY

* [OpenMPI] fix prefix

* [OpenMPI] fix license installation, compatible with single config build

* [many ports] enable portable mpi implementation

* [bond] Update Haskell stack SHA512
  • Loading branch information
cenit authored and vicroms committed Jul 31, 2019
1 parent a2f9cee commit 455223d
Show file tree
Hide file tree
Showing 13 changed files with 132 additions and 17 deletions.
12 changes: 6 additions & 6 deletions ports/bond/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Source: bond
Maintainer: bond@microsoft.com
Version: 8.1.0-2
Description: Bond is a cross-platform framework for working with schematized data. It supports cross-language de/serialization and powerful generic mechanisms for efficiently manipulating data. Bond is broadly used at Microsoft in high scale services.
Homepage: https://github.com/Microsoft/bond
Build-Depends: rapidjson, boost-config, boost-utility, boost-assign
Source: bond
Maintainer: bond@microsoft.com
Version: 8.1.0-2
Description: Bond is a cross-platform framework for working with schematized data. It supports cross-language de/serialization and powerful generic mechanisms for efficiently manipulating data. Bond is broadly used at Microsoft in high scale services.
Homepage: https://github.com/Microsoft/bond
Build-Depends: rapidjson, boost-config, boost-utility, boost-assign
4 changes: 2 additions & 2 deletions ports/boost-mpi/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-mpi
Version: 1.70.0-1
Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-foreach, boost-function, boost-graph, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-mpl, boost-optional, boost-property-map, boost-python (windows), boost-serialization, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, msmpi
Version: 1.70.0-2
Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-foreach, boost-function, boost-graph, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-mpl, boost-optional, boost-property-map, boost-python (windows), boost-serialization, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, mpi
Homepage: https://github.com/boostorg/mpi
Description: Boost mpi module
2 changes: 1 addition & 1 deletion ports/boost-vcpkg-helpers/generate-ports.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ foreach ($library in $libraries)
}
elseif ($library -eq "mpi")
{
$deps += @("msmpi")
$deps += @("mpi")
}

Generate `
Expand Down
4 changes: 2 additions & 2 deletions ports/hdf5/CONTROL
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Source: hdf5
Version: 1.10.5-7
Version: 1.10.5-8
Homepage: https://www.hdfgroup.org/downloads/hdf5/
Description: HDF5 is a data model, library, and file format for storing and managing data
Build-Depends: zlib, szip

Feature: parallel
Description: parallel support for HDF5
Build-Depends: msmpi
Build-Depends: mpi

Feature: cpp
Description: Builds cpp lib
2 changes: 1 addition & 1 deletion ports/hypre/CONTROL
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ Source: hypre
Version: 2.11.2-2
Homepage: https://computation.llnl.gov/projects/hypre-scalable-linear-solvers-multigrid-methods
Description: SCALABLE LINEAR SOLVERS AND MULTIGRID METHODS
Build-Depends: msmpi
Build-Depends: mpi
4 changes: 2 additions & 2 deletions ports/kealib/CONTROL
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Source: kealib
Version: 1.4.11
Version: 1.4.11-1
Build-Depends: hdf5[cpp], zlib, szip
Homepage: https://bitbucket.org/chchrsc/kealib
Description: kealib is gdal model using HDF5 standard.

Feature: parallel
Description: Use parallel support for HDF5
Build-Depends: hdf5[parallel], msmpi
Build-Depends: hdf5[parallel], mpi
4 changes: 4 additions & 0 deletions ports/mpi/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Source: mpi
Version: 1
Description: Message Passing Interface (MPI) is a standardized and portable message-passing standard designed by a group of researchers from academia and industry to function on a wide variety of parallel computing architectures. The standard defines the syntax and semantics of a core of library routines useful to a wide range of users writing portable message-passing programs in C, C++, and Fortran. There are several well-tested and efficient implementations of MPI, many of which are open-source or in the public domain.
Build-Depends: msmpi (windows), openmpi (!windows)
3 changes: 3 additions & 0 deletions ports/mpi/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include(vcpkg_common_functions)

set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
4 changes: 4 additions & 0 deletions ports/msmpi/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
include(vcpkg_common_functions)

if(VCPKG_CMAKE_SYSTEM_NAME)
message(FATAL_ERROR "This port is only for building msmpi on Windows Desktop")
endif()

set(MSMPI_VERSION "10.0.12498")
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/msmpi-${MSMPI_VERSION})

Expand Down
4 changes: 4 additions & 0 deletions ports/openmpi/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Source: openmpi
Version: 4.0.1
Homepage: https://www.open-mpi.org/
Description: The Open MPI Project is an open source Message Passing Interface implementation that is developed and maintained by a consortium of academic, research, and industry partners. Open MPI is therefore able to combine the expertise, technologies, and resources from all across the High Performance Computing community in order to build the best MPI library available. Open MPI offers advantages for system and software vendors, application developers and computer science researchers.
100 changes: 100 additions & 0 deletions ports/openmpi/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
include(vcpkg_common_functions)

if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME)
message(FATAL_ERROR "This port is only for openmpi on Unix-like systems")
endif()

vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)

set(OpenMPI_FULL_VERSION "4.0.1")
set(OpenMPI_SHORT_VERSION "4.0")

vcpkg_download_distfile(ARCHIVE
URLS "https://download.open-mpi.org/release/open-mpi/v${OpenMPI_SHORT_VERSION}/openmpi-${OpenMPI_FULL_VERSION}.tar.gz"
FILENAME "openmpi-${OpenMPI_FULL_VERSION}.tar.gz"
SHA512 760716974cb6b25ad820184622e1ee7926bc6fda87db6b574f76792bc1ca99522e52195866c14b7cb2df5a4981efdaf9f71d2c5533cc0e8e45c2c4b3b74cbacc
)

if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
list(APPEND BUILD_TYPES "release")
endif()
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
list(APPEND BUILD_TYPES "debug")
endif()

set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-debug/openmpi-${OpenMPI_FULL_VERSION})
set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-release/openmpi-${OpenMPI_FULL_VERSION})
set(OUT_PATH_DEBUG ${SOURCE_PATH_RELEASE}/../../make-build-${TARGET_TRIPLET}-debug)
set(OUT_PATH_RELEASE ${SOURCE_PATH_RELEASE}/../../make-build-${TARGET_TRIPLET}-release)
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-debug/)
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-release/)
file(MAKE_DIRECTORY ${OUT_PATH_DEBUG})
file(MAKE_DIRECTORY ${OUT_PATH_RELEASE})

foreach(BUILD_TYPE IN LISTS BUILD_TYPES)
vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE})
#vcpkg_apply_patches(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/openmpi-${OpenMPI_FULL_VERSION} PATCHES patch.file)
endforeach()

vcpkg_find_acquire_program(PERL)
get_filename_component(PERL_PATH ${PERL} DIRECTORY)
vcpkg_add_to_path(${PERL_PATH})

set(BASH bash)

if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
message(STATUS "Configuring ${TARGET_TRIPLET}-dbg")
vcpkg_execute_required_process(
COMMAND ${BASH} --noprofile --norc -c "${SOURCE_PATH_DEBUG}/configure --prefix=${OUT_PATH_DEBUG} --enable-debug"
WORKING_DIRECTORY "${SOURCE_PATH_DEBUG}"
LOGNAME "config-${TARGET_TRIPLET}-dbg"
)
message(STATUS "Building ${TARGET_TRIPLET}-dbg")
vcpkg_execute_required_process(
COMMAND ${BASH} --noprofile --norc -c "make -j ${VCPKG_CONCURRENCY}"
NO_PARALLEL_COMMAND ${BASH} --noprofile --norc -c "make"
WORKING_DIRECTORY "${SOURCE_PATH_DEBUG}"
LOGNAME "make-build-${TARGET_TRIPLET}-dbg"
)
message(STATUS "Installing ${TARGET_TRIPLET}-dbg")
vcpkg_execute_required_process(
COMMAND ${BASH} --noprofile --norc -c "make install"
WORKING_DIRECTORY "${SOURCE_PATH_DEBUG}"
LOGNAME "make-install-${TARGET_TRIPLET}-dbg"
)
file(COPY ${OUT_PATH_DEBUG}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
message(STATUS "Installing ${TARGET_TRIPLET}-dbg done")
endif()

if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
message(STATUS "Configuring ${TARGET_TRIPLET}-rel")
vcpkg_execute_required_process(
COMMAND ${BASH} --noprofile --norc -c "${SOURCE_PATH_RELEASE}/configure --prefix=${OUT_PATH_RELEASE}"
WORKING_DIRECTORY "${SOURCE_PATH_RELEASE}"
LOGNAME "config-${TARGET_TRIPLET}-rel"
)
message(STATUS "Building ${TARGET_TRIPLET}-rel")
vcpkg_execute_required_process(
COMMAND ${BASH} --noprofile --norc -c "make -j ${VCPKG_CONCURRENCY}"
NO_PARALLEL_COMMAND ${BASH} --noprofile --norc -c "make"
WORKING_DIRECTORY "${SOURCE_PATH_RELEASE}"
LOGNAME "make-build-${TARGET_TRIPLET}-rel"
)
message(STATUS "Installing ${TARGET_TRIPLET}-rel")
vcpkg_execute_required_process(
COMMAND ${BASH} --noprofile --norc -c "make install"
WORKING_DIRECTORY "${SOURCE_PATH_RELEASE}"
LOGNAME "make-install-${TARGET_TRIPLET}-rel"
)
file(COPY ${OUT_PATH_RELEASE}/lib DESTINATION ${CURRENT_PACKAGES_DIR})
file(COPY ${OUT_PATH_RELEASE}/include DESTINATION ${CURRENT_PACKAGES_DIR})
file(COPY ${OUT_PATH_RELEASE}/share DESTINATION ${CURRENT_PACKAGES_DIR})
file(COPY ${OUT_PATH_RELEASE}/bin DESTINATION ${CURRENT_PACKAGES_DIR})
message(STATUS "Installing ${TARGET_TRIPLET}-rel done")
endif()

if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
file(INSTALL ${SOURCE_PATH_DEBUG}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openmpi RENAME copyright)
else()
file(INSTALL ${SOURCE_PATH_RELEASE}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openmpi RENAME copyright)
endif()
2 changes: 1 addition & 1 deletion ports/parmetis/CONTROL
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ Source: parmetis
Version: 4.0.3-3
Homepage: https://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview
Description: Parallel Graph Partitioning and Fill-reducing Matrix Ordering
Build-Depends: metis, msmpi
Build-Depends: metis, mpi
4 changes: 2 additions & 2 deletions ports/vtk/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: vtk
Version: 8.2.0-4
Version: 8.2.0-5
Description: Software system for 3D computer graphics, image processing, and visualization
Homepage: https://github.com/Kitware/VTK
Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, libjpeg-turbo, proj4, lz4, libtheora, atlmfc (windows), eigen3, double-conversion, pugixml, libharu, sqlite3, netcdf-c
Expand All @@ -14,7 +14,7 @@ Build-Depends: qt5

Feature: mpi
Description: MPI functionality for VTK
Build-Depends: msmpi, hdf5[parallel]
Build-Depends: mpi, hdf5[parallel]

Feature: python
Description: Python functionality for VTK
Expand Down

0 comments on commit 455223d

Please sign in to comment.