Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Medcoupling #24378

Merged
merged 46 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
0689be5
initial commit of medcoupling
Krande Oct 30, 2023
1885969
add empty line at bottom and license_file
Krande Oct 30, 2023
ee8e62a
remove outdated petsc variable declaration
Krande Oct 30, 2023
0cedede
add multiple fixes as proposed in review
Krande Oct 30, 2023
680915d
Yes please. Windows support here we come
Krande Oct 30, 2023
c05b6a6
use version tags instead of hashes
Krande Oct 30, 2023
e661266
update sha256 for medcoupling tar
Krande Oct 30, 2023
bdb4163
point to appropriate home git address
Krande Oct 30, 2023
c31dd6c
set correct license_family
Krande Oct 30, 2023
eb0b17c
update config hash
Krande Oct 30, 2023
b2c4b51
Trigger Build with updated libmed
Krande Nov 17, 2023
1cf18ec
Update recipes/medcoupling/bld.bat
Krande Nov 19, 2023
0488bdc
Update recipes/medcoupling/bld.bat
Krande Nov 19, 2023
cce8c32
Update recipes/medcoupling/meta.yaml
Krande Nov 19, 2023
1393db3
Update recipes/medcoupling/meta.yaml
Krande Nov 19, 2023
d8d18fe
Update build.sh
hmaarrfk Nov 20, 2023
8451db1
MED_INT_IS_LONG
hmaarrfk Nov 20, 2023
a659a7b
Add patch to allow overwriting of MED_INT_IS_LONG
hmaarrfk Nov 20, 2023
c2af3a9
Update build.sh
Krande Dec 28, 2023
2a23e9f
add zlib to fix finding hdf5
Krande Dec 28, 2023
1f28875
add patches for finding threads and forcing med int 8
Krande Dec 29, 2023
7fe2584
remove overlapping patch file
Krande Dec 29, 2023
b754a36
add bigobj compilation option for windows
Krande Dec 29, 2023
a309e99
remove the share/cmake/medfile-4.1.1 directory
Krande Dec 29, 2023
2b5fe4a
remove unused patches
Krande Dec 29, 2023
6f94360
add /bigobj compile flag to fix windows build
Krande Dec 30, 2023
469a4ff
move dlls to bin folder
Krande Dec 30, 2023
578be84
add hdf5 as a run dependency
Krande Dec 30, 2023
d7390f3
Update meta.yaml
Krande Jan 13, 2024
ab20977
remove deps from runtime requirements
Krande Jan 15, 2024
ad10928
removed libmed from runtime requirements
Krande Jan 15, 2024
e151b6d
Update recipes/medcoupling/meta.yaml
Krande Jan 15, 2024
03b24e8
Update recipes/medcoupling/meta.yaml
Krande Jan 15, 2024
844f8d3
Update recipes/medcoupling/meta.yaml
Krande Jan 15, 2024
05a1c04
Update recipes/medcoupling/meta.yaml
Krande Jan 15, 2024
1d6cd50
Update recipes/medcoupling/meta.yaml
Krande Jan 15, 2024
8b1347c
do not remove cmake files from libmed
Krande Jan 16, 2024
ac49b48
use 64bit IDS on windows
Krande Jan 16, 2024
9243c3c
use salome debug for extra build printing
Krande Jan 16, 2024
29edf70
specify MED_INT_IS_LONG=ON on windows
hmaarrfk Jan 16, 2024
bec5cca
nit MED_INT_IS_LONG
hmaarrfk Jan 16, 2024
ddcff95
bump to trigger ci re-run
Krande Mar 11, 2024
7daae95
use 32 bit integer on windows
Krande Mar 12, 2024
61a4027
Update meta.yaml
Krande Mar 12, 2024
e05032a
pass /bigobj to compiler using c++ flag use libboost devel instead of…
Krande Mar 14, 2024
171be9f
simplify build scripts
Krande Mar 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions recipes/medcoupling/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
@echo off


cmake -B build -G "Ninja" . ^
-Wno-dev ^
-D CMAKE_BUILD_TYPE="Release" ^
-D PYTHON_ROOT_DIR="%PREFIX%" ^
-D CMAKE_CXX_FLAGS="/bigobj" ^
-D PYTHON_EXECUTABLE:FILEPATH="%PYTHON%" ^
-D CONFIGURATION_ROOT_DIR="%SRC_DIR%/deps/config" ^
-D SALOME_CMAKE_DEBUG=ON ^
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
-D SALOME_CMAKE_DEBUG=ON ^
-D SALOME_CMAKE_DEBUG=ON ^
-D MED_INT_IS_LONG=ON ^

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really thought it was this one...

-D SALOME_USE_MPI=OFF ^
-D MEDCOUPLING_BUILD_STATIC=OFF ^
-D MEDCOUPLING_BUILD_TESTS=OFF ^
-D MEDCOUPLING_BUILD_DOC=OFF ^
-D MEDCOUPLING_USE_64BIT_IDS=OFF ^
-D MEDCOUPLING_USE_MPI=OFF ^
-D MEDCOUPLING_MEDLOADER_USE_XDR=OFF ^
-D MEDCOUPLING_INSTALL_PYTHON=%SP_DIR% ^
-D XDR_INCLUDE_DIRS="" ^
-D MEDCOUPLING_ENABLE_PYTHON=ON ^
-D MEDCOUPLING_ENABLE_PARTITIONER=ON ^
-D MEDCOUPLING_PARTITIONER_PARMETIS=OFF ^
-D MEDCOUPLING_PARTITIONER_METIS=OFF ^
-D MEDCOUPLING_PARTITIONER_SCOTCH=OFF ^
-D MEDCOUPLING_PARTITIONER_PTSCOTCH=OFF ^
%CMAKE_ARGS%

if errorlevel 1 exit 1
cmake --build build --target install
if errorlevel 1 exit 1
Krande marked this conversation as resolved.
Show resolved Hide resolved

:: Move dll files from %PREFIX%/Library/Lib to %PREFIX%/Library/Bin
:: This is needed for the python bindings to work

cd %LIBRARY_LIB%
move *.dll %LIBRARY_BIN%
34 changes: 34 additions & 0 deletions recipes/medcoupling/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

set -ex

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

cmake -B build . \
-DCMAKE_BUILD_TYPE="Release" \
-DPYTHON_ROOT_DIR="${PREFIX}" \
Krande marked this conversation as resolved.
Show resolved Hide resolved
-DPYTHON_EXECUTABLE:FILEPATH="$PYTHON" \
-Wno-dev \
-DCONFIGURATION_ROOT_DIR="${SRC_DIR}/deps/config" \
-DSALOME_CMAKE_DEBUG=ON \
-DMED_INT_IS_LONG=ON \
Copy link
Contributor

@hmaarrfk hmaarrfk Jan 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think we could add this to libmed cmake build -DMED_MEDINT_TYPE=long

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, libmed cmake file has that line, i'm going to try to cleanup a few things in
conda-forge/libmed-feedstock#57

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, libmed cmake file has that line, i'm going to try to cleanup a few things in conda-forge/libmed-feedstock#57

Thanks, I really appreciate your help!

-DSALOME_USE_MPI=${on_mpi} \
-DMEDCOUPLING_BUILD_TESTS=OFF \
-DMEDCOUPLING_BUILD_DOC=OFF \
-DMEDCOUPLING_USE_64BIT_IDS=ON \
-DMEDCOUPLING_USE_MPI=${on_mpi} \
-DMEDCOUPLING_MEDLOADER_USE_XDR=OFF \
-DXDR_INCLUDE_DIRS="" \
-DMEDCOUPLING_PARTITIONER_PARMETIS=OFF \
-DMEDCOUPLING_PARTITIONER_METIS=OFF \
-DMEDCOUPLING_PARTITIONER_SCOTCH=OFF \
-DMEDCOUPLING_PARTITIONER_PTSCOTCH=${on_mpi} \
-DMPI_C_COMPILER:PATH="$(which mpicc)" \
${CMAKE_ARGS}

cd build
make install -j$CPU_COUNT
2 changes: 2 additions & 0 deletions recipes/medcoupling/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
mpi:
- nompi
72 changes: 72 additions & 0 deletions recipes/medcoupling/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{% set version = "9.10.0" %}

package:
name: medcoupling
version: '{{ version }}'

source:
- fn: 'medcoupling_{{ version }}.tar.gz'
url: https://git.salome-platform.org/gitweb/?p=tools/medcoupling.git;a=snapshot;h=V{{ version.replace('.', '_') }};sf=tgz
sha256: 02087a4e59ffcdab6fc68460ffd86b03a80b5c0faa695b0bfb2142f1d0d3e5ea
- fn: 'config_{{ version }}.tar.gz'
url: https://git.salome-platform.org/gitweb/?p=tools/configuration.git;a=snapshot;h=V{{ version.replace('.', '_') }};sf=tgz
folder: deps/config
sha256: d58f6749514ce49b00590a96d6dc9090a76a07c13690e2453403643afb40346c


build:
skip: True # [osx]
detect_binary_files_with_prefix: true
# string: py{{ CONDA_PY }}_mpi_{{ mpi }}_h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [mpi != "nompi"]
# string: py{{ CONDA_PY }}_nompi_h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [mpi == "nompi"]
number: 0

requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- make # [not win]
- ninja # [win]
Krande marked this conversation as resolved.
Show resolved Hide resolved
- cmake
- swig >=4.0.2

host:
- python
- numpy
- libboost-devel
- zlib
- hdf5
- libxml2
Krande marked this conversation as resolved.
Show resolved Hide resolved
- libmed
Krande marked this conversation as resolved.
Show resolved Hide resolved
- petsc # [mpi != 'nompi']
Krande marked this conversation as resolved.
Show resolved Hide resolved
- {{ mpi }} # [mpi != 'nompi']

run:
- python
- {{ pin_compatible('numpy') }}
- {{ mpi }} # [mpi != 'nompi']

test:
imports:
- medcoupling
Krande marked this conversation as resolved.
Show resolved Hide resolved
- MEDRenumber
- MEDCouplingRemapper
- MEDLoader
- MEDPartitioner
- MEDCoupling # [linux]
- MEDCouplingCompat # [win or osx]

about:
home: https://git.salome-platform.org/gitweb/?p=tools/medcoupling.git
license: LGPL-2.1-or-later
license_family: LGPL
license_file: COPYING
summary: 'The MEDCoupling tool gathers several powerful functionalities around the input and output data of simulation codes (meshes and fields mainly)'
description: |
The MEDCoupling tool gathers several powerful functionalities around the input and output data of simulation codes (meshes and fields mainly)
doc_url: https://docs.salome-platform.org/latest/dev/MEDCoupling/developer/index.html
dev_url: https://git.salome-platform.org/gitweb/?p=tools/medcoupling.git;a=summary

extra:
recipe-maintainers:
- Krande