Skip to content

Commit

Permalink
idg (#22)
Browse files Browse the repository at this point in the history
* Added idg conda package

* idg workflow file deleted to re-add on main branch

* Cast build number to int to perform addition

* Fix build nr cast

* Fix build nr cast #2
  • Loading branch information
mpluess authored Mar 27, 2024
1 parent 554e45c commit 001b528
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build_base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ env:
HVOX_VERSION: 0.0.1.dev48 # `pbr` version because they don't have an official release tag yet
PYCSOU_VERSION: 1.0.7.dev1679 # `pbr` version because they just refer to `v2-dev` branch which has this version

# WSClean
IDG_VERSION: 1.2.0

# additional karabo dependencies
AOTOOLS_VERSION: 1.0.6
SEQFILE_VERSION: 0.2.0
Expand Down
17 changes: 17 additions & 0 deletions idg/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

mkdir build; cd build

if [ -z $mpi ]; then
mpi='nompi'
fi

if [ $mpi = 'nompi' ]; then
BUILD_WITH_MPI="OFF"
else
BUILD_WITH_MPI="ON"
fi

cmake -DCMAKE_INSTALL_PREFIX=$PREFIX -DBUILD_LIB_CUDA="ON" -DBUILD_WITH_MPI=$BUILD_WITH_MPI ..

make install
4 changes: 4 additions & 0 deletions idg/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
mpi:
- nompi
- mpich
- openmpi
61 changes: 61 additions & 0 deletions idg/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
package:
name: {{ PACKAGE_NAME|lower }}
version: {{ IDG_VERSION_ALT }}

source:
git_url: https://gitlab.com/astron-idg/idg.git
git_tag: {{ IDG_VERSION }}

# ensure mpi is defined (needed for conda-smithy recipe-lint)
{% set mpi = mpi or 'nompi' %}

{% if mpi == 'nompi' %}
# prioritize nompi variant via build number
{% set build = build | int + 100 %}
{% endif %}

build:
number: {{ build }}

{% if mpi != 'nompi' %}
{% set mpi_prefix = "mpi_" + mpi %}
{% else %}
{% set mpi_prefix = "nompi" %}
{% endif %}
string: "{{ mpi_prefix }}_h{{ PKG_HASH }}_{{ build }}"

{% if mpi != 'nompi' %}
run_exports:
- {{ PACKAGE_NAME|lower }} * {{ mpi_prefix }}_*
{% endif %}

requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- cmake
- make
- fftw3f
- libblas
- libcblas

host:
- fftw3f
- libblas
- libcblas
- {{ mpi }} # [mpi != 'nompi']

run:
- fftw3f
- {{ mpi }} # [mpi != 'nompi']

about:
home: https://idg.readthedocs.io
license: GPLv3
summary: 'Image Domain Gridding'
doc_url: https://idg.readthedocs.io
dev_url: https://gitlab.com/astron-idg/idg

extra:
recipe-maintainers:
- [email protected]

0 comments on commit 001b528

Please sign in to comment.