pantry/projects/open-mpi.org/package.yml

101 lines
2.6 KiB
YAML
Raw Normal View History

distributable:
url: https://download.open-mpi.org/release/open-mpi/v{{version.marketing}}/openmpi-{{version}}.tar.bz2
strip-components: 1
versions:
github: open-mpi/ompi/tags
dependencies:
open-mpi.org/hwloc: '*'
libevent.org: '*'
gnu.org/gcc: '*' # for gfortran
gnu.org/inetutils: '*' # for rsh
runtime:
env:
OPAL_PREFIX: '{{prefix}}'
OMPI_CC: gcc
OMPI_CXX: g++
OMPI_FC: gfortran
OMPI_CFLAGS: $CFLAGS
OMPI_CXXFLAGS: $CXXFLAGS
OMPI_FCFLAGS: $FCFLAGS -I{{prefix}}/include
OMPI_CPPFLAGS: $CPPFLAGS
OMPI_LDFLAGS: $LDFLAGS
OMPI_F77FLAGS: $FCFLAGS -I{{prefix}}/include
OMPI_F90FLAGS: $FCFLAGS -I{{prefix}}/include
build:
2023-10-02 07:39:38 +03:00
dependencies:
zlib.net: ^1
gnu.org/binutils: '*'
python.org: ^3
linux:
gnu.org/make: '*'
script:
- ./configure $CONFIGURE_ARGS
- make --jobs {{ hw.concurrency }} all
- make --jobs {{ hw.concurrency }} install
- run: sed -i "s|$PKGX_DIR|\${pcfiledir}/../../../..|g" *.pc
working-directory: '{{prefix}}/lib/pkgconfig'
- run: sed -i "s|linker_flags=.*|linker_flags=|g" *-wrapper-data.txt
working-directory: '{{prefix}}/share/openmpi'
- install {{prefix}}/lib/*.mod {{prefix}}/include/
env:
CXXFLAGS: $CXXFLAGS -std=c++11
darwin:
CFLAGS: $CFLAGS -Wl,-rpath,{{pkgx.prefix}}
CXXFLAGS: $CXXFLAGS -Wl,-rpath,{{pkgx.prefix}}
FCFLAGS: $FCFLAGS -Wl,-rpath,{{pkgx.prefix}}
LDFLAGS: $LDFLAGS -headerpad_max_install_names
CONFIGURE_ARGS:
- --disable-debug
- --disable-dependency-tracking
- --prefix="{{prefix}}"
- --libdir="{{prefix}}/lib"
- --disable-silent-rules
- --enable-ipv6
- --enable-mca-no-build=reachable-netlink
- --sysconfdir="{{prefix}}/etc"
- --with-libevent="{{deps.libevent.org.prefix}}"
- --with-sge
- --disable-dlopen
provides:
- bin/mpic++
- bin/mpiCC
- bin/mpicc
- bin/mpicxx
- bin/mpiexec
- bin/mpif77
- bin/mpif90
- bin/mpifort
- bin/mpirun
- bin/ompi_info
- bin/opal_wrapper
test:
dependencies:
freedesktop.org/pkg-config: '*'
script:
- mpicc hello.c -o hello
- ./hello
- mpirun ./hello
- mpifort hellof.f90 -o hellof
- ./hellof
- mpirun ./hellof
- mpifort hellousempi.f90 -o hellousempi
- ./hellousempi
- mpirun ./hellousempi
- mpifort hellousempif08.f90 -o hellousempif08
- ./hellousempif08
- mpirun ./hellousempif08
- pkg-config --modversion ompi
env:
linux/x86-64: # GHA hosts run as root
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1