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

Python binding ectrans4py #6

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
cc10e4c
Remove non-standard SIZEOF from GPU subtree (#161)
samhatfield Oct 16, 2024
67daec3
Remove flattened arrays
lukasm91 Oct 3, 2024
a7681ae
add cleanup functionality
lukasm91 Oct 3, 2024
3cde5bc
modify ectrans-benchmark temporarily
lukasm91 Oct 3, 2024
8622da1
fix overflows
lukasm91 Jun 24, 2024
91b2759
Revert "modify ectrans-benchmark temporarily"
lukasm91 Oct 17, 2024
9be2c89
including sams review
lukasm91 Oct 17, 2024
c9d0e9b
reset d/f/fg/r/g after s because deallocation of s can use d in some …
lukasm91 Oct 17, 2024
27a35b6
Merge branch 'fix-overflow' into HEAD
lukasm91 Oct 18, 2024
df45b42
Dumping whole layers (#163)
lukasm91 Oct 18, 2024
fcc022c
add missing check
lukasm91 Oct 17, 2024
a452121
Fix define (#166)
lukasm91 Oct 22, 2024
374e0c0
cosmetic
wdeconinck Sep 13, 2024
175e17c
Merge remote-tracking branch 'upstream/develop' into cleanup-part1
lukasm91 Oct 24, 2024
35cac11
Fix glob pattern (#167)
lukasm91 Oct 28, 2024
2e299cf
most of the review comments addressed
lukasm91 Oct 30, 2024
01619b3
Move around code to address compilation issue
lukasm91 Oct 30, 2024
1c5f52e
use acc_init instead
lukasm91 Oct 30, 2024
8495f60
fix typo
lukasm91 Oct 30, 2024
6be9a83
Relocate str2int and print_help
samhatfield Nov 4, 2024
1e2801f
Swap acc_init for $acc init
samhatfield Nov 4, 2024
9bcf386
Merge pull request #169
wdeconinck Nov 11, 2024
876e43e
Merge remote-tracking branch 'public/develop' into cleanup-part1
lukasm91 Nov 18, 2024
62c4091
suggestions from sam
lukasm91 Nov 18, 2024
7f26194
Allow to run GPU path with LMPOFF
wdeconinck Oct 22, 2024
c3b4231
Add transi_gpu_dp and ectrans_test_transi_program_gpu
wdeconinck Aug 27, 2024
05ec8cd
Fix logic where none of the optional KVSET<xxx> is provided
wdeconinck Aug 27, 2024
900c128
Add more print statements in transi test
wdeconinck Oct 22, 2024
841ba19
Disable VorDivToUV in transi GPU test
wdeconinck Oct 23, 2024
44fd989
Disable trans_delete and trans_finalize for GPU_VERSION. This must be…
wdeconinck Oct 23, 2024
156ea96
Merge pull request #139
wdeconinck Nov 19, 2024
926ed3a
Add build-hpc workflow
reuterbal Nov 21, 2024
9031006
Restrict ci-hpc to main branches, PRs and on-demand dispatch
reuterbal Nov 22, 2024
fbf0a4e
Fix indentation
samhatfield Nov 25, 2024
96499a0
Make HAVE_CPU or HAVE_GPU mandatory
samhatfield Nov 25, 2024
8aa3021
Reform testing structure to allow GPU testing
samhatfield Nov 25, 2024
dfa5a2f
Add CPU-only guard for --nfld 0 test
samhatfield Nov 25, 2024
b8af468
Add -cuda to the link options of ecTrans libraries
samhatfield Nov 26, 2024
82d6790
Force hpcx-openmpi/2.14.0-cuda module for build-hpc workflow
samhatfield Nov 26, 2024
a9dee8f
Copy all members of derived types
samhatfield Nov 29, 2024
f802954
Guard ASYNCs to stop Cray compiler complaints
samhatfield Dec 2, 2024
62897a4
simplify ifdef __CRAY
lukasm91 Dec 3, 2024
5f4228a
Merge remote-tracking branch 'public/develop' into cleanup-part1
lukasm91 Dec 3, 2024
b15b471
modify ectrans-benchmark temporarily
lukasm91 Dec 3, 2024
6cb2b93
fixes after Sams changes
lukasm91 Dec 3, 2024
ee82a4c
Revert "modify ectrans-benchmark temporarily"
lukasm91 Dec 3, 2024
d707e9d
re-enable cleanup in transi
lukasm91 Dec 3, 2024
5b369ae
Merge pull request #151 from lukasm91/cleanup-part1
samhatfield Dec 3, 2024
4b655f8
Merge commit '27a35b67' into fix-overflow
lukasm91 Dec 5, 2024
5a1d597
Merge remote-tracking branch 'public/develop' into fix-overflow
lukasm91 Dec 5, 2024
f214d16
missing imports, fix diffs
lukasm91 Dec 9, 2024
806e906
MPI_FLOAT and MPI_DOUBLE don't exist in Fortran
wdeconinck Dec 9, 2024
c14ee84
Fixup _CRAYFTN-specific copy ins
samhatfield Dec 9, 2024
094eca2
Merge pull request #162 from lukasm91/fix-overflow
samhatfield Dec 13, 2024
4db7b34
Missing gstats profilers.
PaulMullowney Dec 15, 2024
2a87188
compact legendre polynomials
lukasm91 Dec 16, 2024
5a0a34e
Merge pull request #188 from PaulMullowney/trgtol_gstats
samhatfield Dec 18, 2024
0fe6301
Fix precision of PGW argument in gpu/TRANS_INQ
samhatfield Dec 19, 2024
18ec8c7
Bump version to 1.5.1
samhatfield Dec 19, 2024
163ae8e
Merge pull request #192 from ecmwf-ifs/hotfix/1.5.1
wdeconinck Dec 19, 2024
a0f1455
Merge branch 'main' into develop
wdeconinck Dec 19, 2024
0fbc988
Add support for CMAKE_TEST_LAUNCHER, required for e.g. serial GPU tests
wdeconinck Dec 19, 2024
98f0d50
Update ectrans_compile_options.cmake to fix build error with Intel on…
climbfuji Dec 20, 2024
6b03cd7
Merge pull request #195 from climbfuji/patch-1
samhatfield Dec 20, 2024
7b7c262
Remove redundant use statement
lukasm91 Jan 10, 2025
2f9c4f3
Merge pull request #191 from ecmwf-ifs/feature/cmake_test_launcher
marsdeno Jan 15, 2025
0bb0c5b
GPU: Temporary workaround for SETUP_TRANS(LDSPSETUPONLY=.TRUE.) -- no…
wdeconinck Dec 10, 2024
1665d11
GPU: Temporary workaround for SETUP_TRANS(LDGRIDONLY=.TRUE.) -- not y…
wdeconinck Dec 10, 2024
b705c5c
GPU: ABORT_TRANS for SETUP_TRANS(LDLL=.TRUE.) -- not yet implemented
wdeconinck Dec 10, 2024
b78b40a
GPU: ABORT_TRANS for VORDIV_TO_UV -- not yet implemented
wdeconinck Dec 10, 2024
a43b2ab
transi: disable DR_HOOK_ASSERT_MPI_INITIALIZED when MPI is turned off…
wdeconinck Dec 10, 2024
d17003c
transi: Avoid deleting uninitialized trans handle
wdeconinck Dec 10, 2024
e0cfb0c
transi: Throw errors gracefully for known not-yet-implemented code pa…
wdeconinck Dec 10, 2024
a2fc6e7
Merge pull request #193 from ecmwf-ifs/feature/error_handling
wdeconinck Jan 20, 2025
a754ecd
remove imloc0 from setup_trans
lukasm91 Jan 20, 2025
b6dd0c2
Merge remote-tracking branch 'public/develop' into compact-legendre-p…
lukasm91 Jan 20, 2025
b74250b
Refresh OpenMP CMake presence
samhatfield Nov 5, 2024
f4cf1c1
Refresh setup_trans.F90
samhatfield Nov 5, 2024
2ae9b5f
Allow gpnorm_trans_gpu.F90 to compile with OpenMP
samhatfield Nov 5, 2024
4e73316
Allow fsc_mod.F90 to compile with OpenMP
samhatfield Nov 28, 2024
4e914a2
Allow growing_allocator_mod.F90 to compile with OpenMP
samhatfield Nov 28, 2024
7de1003
Allow gpnorm_trans.F90 to compile with OpenMP
samhatfield Nov 28, 2024
b3efb4b
Allow ltinv_mod.F90 to compile with OpenMP
samhatfield Nov 28, 2024
2e08a7f
Allow prfi1b_mod.F90 to compile with OpenMP
samhatfield Nov 28, 2024
ba54d15
Allow spnsde_mod.F90 to compile with OpenMP
samhatfield Nov 28, 2024
d1e318c
Allow trgtol_mod.F90 to compile with OpenMP
samhatfield Nov 28, 2024
ab23a9d
Remove unnecessary mpif.h import
samhatfield Nov 28, 2024
287d97c
Allow vdtuv_mod.F90 to compile with OpenMP
samhatfield Nov 28, 2024
20e9a11
Allo uvtvd_mod.F90 to compile with OpenMP
samhatfield Dec 4, 2024
f85fc55
Allow updspb_mod.F90 to compile with OpenMP
samhatfield Jan 20, 2025
a71b64b
Tidy up gpu/SETUP_TRANS
samhatfield Dec 4, 2024
3002c3f
Properly handle LDUSEFFTW option for GPUs
samhatfield Dec 4, 2024
0cae7c0
Minor case change
samhatfield Jan 15, 2025
9324bed
Changes to get compliance with flang-new. This builds and runs on 8 H…
PaulMullowney Jan 16, 2025
2f6d01e
Add back FIRSTPRIVATE
samhatfield Jan 17, 2025
ce53d97
Adding missing ACCGPU protections
PaulMullowney Jan 16, 2025
c6bd239
slight fix
PaulMullowney Jan 16, 2025
079a464
Requested fixes
PaulMullowney Jan 17, 2025
26e33e2
Fix indentation
samhatfield Jan 21, 2025
388fd00
Add some more #ifdef ACCGPU guards
samhatfield Jan 21, 2025
883a28e
Merge pull request #180 from samhatfield/refresh_openmp
samhatfield Jan 21, 2025
3e4b947
Merge remote-tracking branch 'public/develop' into compact-legendre-p…
lukasm91 Jan 21, 2025
3fa8856
build-hpc template update and module parametrisation
samhatfield Jan 17, 2025
2f5c2d9
Make troika user a secret
samhatfield Jan 21, 2025
aac64da
Add LUMI-G to CI testing
samhatfield Jan 21, 2025
bb3dfe1
Set output and workdir for LUMI CI
samhatfield Jan 21, 2025
644e476
Add site-specific CMake options
samhatfield Jan 21, 2025
4d7bad2
Limit tests run on LUMI-G
samhatfield Jan 22, 2025
78d0843
Have each run on LUMI-G done in a unique work directory
samhatfield Jan 22, 2025
4850ed1
Only exclude GPU tests on LUMI-G
samhatfield Jan 22, 2025
ddda92b
Cleanup source and build directories in build-hpc workflow
samhatfield Jan 22, 2025
87b6850
Merge pull request #182 from ecmwf-ifs/feature/ci-hpc-updates
samhatfield Jan 22, 2025
fdab7f0
make all const west const
lukasm91 Jan 23, 2025
7e71ea8
Merge pull request #164 from lukasm91/compact-legendre-polynomials
samhatfield Jan 23, 2025
579d6cd
Add missing C_LOC import
samhatfield Jan 23, 2025
c0ff924
Merge pull request #197 from ecmwf-ifs/missing_c_loc_import
samhatfield Jan 23, 2025
b0a07a5
Add approved manual triggering of build-hpc action
samhatfield Jan 23, 2025
522f530
Merge pull request #201 from ecmwf-ifs/add_build-hpc_label_triggering
samhatfield Jan 23, 2025
2411323
equivalent to ectrans in CY48T3_mrg48R1.02:contrib/
AlexandreMary Oct 11, 2022
3e2cefc
Variable LALL_FFTW to perform fftw transforms in one bunch of all fi…
RyadElKhatibMF Nov 13, 2023
63cab62
Added LAM transforms and LAM benchmark.
ddegrauwe May 30, 2024
e4f0a1a
cleaned installation a bit: only one library (trans) instead of separ…
ddegrauwe May 30, 2024
82537df
removed reference to etrans from trans/CMakeLists.txt
ddegrauwe Jun 10, 2024
1bd0e01
moved ellips to fiat
ddegrauwe Sep 3, 2024
dcda941
fixed ETRANS=ON: (i) follow single/double precision mechanism from tr…
ddegrauwe Dec 3, 2024
3db60a2
Added LAM test
ddegrauwe Dec 3, 2024
de52f21
added license information to etrans sources
ddegrauwe Dec 3, 2024
783d90f
removed fft992 sources
ddegrauwe Dec 5, 2024
6c1ac5d
Touch up etrans tests
samhatfield Dec 5, 2024
d5f6e2a
Enable etrans temporarily for testing
samhatfield Jan 28, 2025
8a94d2e
Fix type of KPOINTERS dummy argument
samhatfield Jan 28, 2025
8f57c77
add ectrans python interface ectrans4py
walidchikhi Oct 19, 2024
b2bb7e1
ectrans4py version is same as ectrans
AlexandreMary Oct 30, 2024
74c0005
cleaner python package
AlexandreMary Oct 30, 2024
05513ed
fix extension of ectrans4py/gp2sp_lam4py
AlexandreMary Dec 20, 2024
e4e1bbf
clean MANIFEST.in
AlexandreMary Dec 20, 2024
5d546d4
label 1.2.51
AlexandreMary Dec 20, 2024
5565090
add tests for ectrans4py
AlexandreMary Jan 22, 2025
ac182bb
add sp2gp/gp2sp tests
AlexandreMary Jan 23, 2025
bb8d62e
add info about ectrans4py in README
AlexandreMary Jan 23, 2025
b900eed
adapt compilectrans4py build: fftw and omp
AlexandreMary Jan 27, 2025
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
157 changes: 157 additions & 0 deletions .github/workflows/build-hpc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
name: build-hpc

# Controls when the action will run
on:

# Trigger the workflow on all pushes to main and develop, except on tag creation
push:
branches:
- main
- develop
tags-ignore:
- '**'

# Trigger the workflow on all pull requests
pull_request: ~

# Allow workflow to be dispatched on demand
workflow_dispatch: ~

# Trigger after public PR approved for CI
pull_request_target:
types: [labeled]

env:
ECTRANS_TOOLS: ${{ github.workspace }}/.github/tools
CTEST_PARALLEL_LEVEL: 1
CACHE_SUFFIX: v1 # Increase to force new cache to be created

jobs:
ci-hpc:
name: ci-hpc
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}

strategy:
fail-fast: false # false: try to complete all jobs

matrix:
name:
- ac-gpu nvhpc
- lumi-g cce

include:
- name: ac-gpu nvhpc
site: ac-batch
troika_user_secret: HPC_CI_SSH_USER
sbatch_options: |
#SBATCH --time=00:20:00
#SBATCH --nodes=1
#SBATCH --ntasks=2
#SBATCH --cpus-per-task=32
#SBATCH --gpus-per-task=1
#SBATCH --mem=200G
#SBATCH --qos=dg
modules:
- cmake
- ninja
- prgenv/nvidia
- hpcx-openmpi/2.14.0-cuda
- fftw

- name: lumi-g cce
site: lumi
troika_user_secret: LUMI_CI_SSH_USER
sbatch_options: |
#SBATCH --time=00:20:00
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=8
#SBATCH --gpus-per-task=1
#SBATCH --partition=dev-g
#SBATCH --account=project_465000527
modules:
- CrayEnv
- PrgEnv-cray
- cce/17.0.1
- craype-accel-amd-gfx90a
- rocm/6.0.3
- cray-fftw
- buildtools
output_dir: /scratch/project_465000527/github-actions/ectrans/${{ github.run_id }}
workdir: /scratch/project_465000527/github-actions/ectrans/${{ github.run_id }}
cmake_options: -DOpenMP_C_LIB_NAMES=craymp -DOpenMP_CXX_LIB_NAMES=craymp -DOpenMP_Fortran_LIB_NAMES=craymp -DOpenMP_craymp_LIBRARY=craymp
ctest_options: -E gpu


runs-on: [self-hosted, linux, hpc]
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: ecmwf-actions/reusable-workflows/ci-hpc-generic@v2
with:
site: ${{ matrix.site }}
troika_user: ${{ secrets[matrix.troika_user_secret] }}
sbatch_options: ${{ matrix.sbatch_options }}
output_dir: ${{ matrix.output_dir || '' }}
workdir: ${{ matrix.workdir || '' }}
template_data: |
cmake_options:
- -DENABLE_MPI=ON
- -DENABLE_ACC=ON
- -DENABLE_GPU=ON
- ${{ matrix.cmake_options || '' }}
ctest_options: ${{ matrix.ctest_options || '' }}
dependencies:
ecmwf/ecbuild:
version: develop
ecmwf-ifs/fiat:
version: develop
cmake_options:
- -DENABLE_MPI=ON
- ${{ matrix.cmake_options || '' }}
template: |
{% for module in "${{ join(matrix.modules, ',') }}".split(',') %}
module load {{module}}
{% endfor %}

export CMAKE_TEST_LAUNCHER="srun;-n;1"
export DR_HOOK_ASSERT_MPI_INITIALIZED=0
BASEDIR=$PWD
{% for name, options in dependencies.items() %}
mkdir -p {{name}}
pushd {{name}}
git init
git remote add origin ${{ github.server_url }}/{{name}}
git fetch origin {{options['version']}}
git reset --hard FETCH_HEAD
cmake -G Ninja -S . -B build \
{% for name in dependencies %}
{% set org, proj = name.split('/') %}
-D{{proj}}_ROOT=$BASEDIR/{{name}}/installation \
{% endfor %}
{{ options['cmake_options']|join(' ') }}
cmake --build build
cmake --install build --prefix installation
popd
{% endfor %}
mkdir -p ${{ github.repository }}
pushd ${{ github.repository }}
git init
git remote add origin ${{ github.server_url }}/${{ github.repository }}
git fetch origin ${{ github.sha }}
git reset --hard FETCH_HEAD
popd
cmake -G Ninja -S ${{ github.repository }} -B build \
{% for name in dependencies %}
{% set org, proj = name.split('/') %}
-D{{proj}}_ROOT=$BASEDIR/{{name}}/installation \
{% endfor %}
{{ cmake_options|join(' ') }}
cmake --build build
ctest --test-dir build --output-on-failure {{ ctest_options }}

{% for name in dependencies.keys() %}
rm -r {{name}}
{% endfor %}

rm -r ${{ github.repository }}
rm -r build
10 changes: 10 additions & 0 deletions .github/workflows/label-public-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Manage labels of pull requests that originate from forks
name: label-public-pr

on:
pull_request_target:
types: [opened, synchronize]

jobs:
label:
uses: ecmwf-actions/reusable-workflows/.github/workflows/label-pr.yml@v2
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ build/*
install/*
env.sh
*.DS_Store

*.py[co~]
51 changes: 45 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,26 @@ find_package( ecbuild 3.4 REQUIRED HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CUR
project( ectrans LANGUAGES C CXX Fortran )
include( ectrans_macros )

# CMake 3.29 adds CMAKE_TEST_LAUNCHER defined either as CMake variable or environment.
# This launcher is a semi-colon-separted list of arguments that is used to launch serial tasks,
# and can be defined during the CMake configuration.
# This is e.g. required for GPU tests that need access to slurm resources:
# export CMAKE_TEST_LAUNCHER="srun;-n;1"
# To run the tests then:
# salloc -q <queue> --gpus-per-task=1 -n <nproc> ctest <ctest-args>
# Before cmake 3.29 this could only be achieved with CMAKE_CROSSCOMPILING_EMULATOR.
# This next snippet ensures forward compatibility
if( ${CMAKE_VERSION} VERSION_LESS "3.29" )
if( DEFINED CMAKE_TEST_LAUNCHER )
set(CMAKE_CROSSCOMPILING_EMULATOR ${CMAKE_TEST_LAUNCHER})
elseif(DEFINED ENV{CMAKE_TEST_LAUNCHER})
set(CMAKE_CROSSCOMPILING_EMULATOR $ENV{CMAKE_TEST_LAUNCHER})
endif()
endif()
if( CMAKE_CROSSCOMPILING_EMULATOR )
set( CMAKE_TEST_LAUNCHER ${CMAKE_CROSSCOMPILING_EMULATOR} )
endif()

set(CMAKE_CXX_STANDARD 17)

ecbuild_enable_fortran( REQUIRED NO_MODULE_DIRECTORY )
Expand Down Expand Up @@ -109,6 +129,11 @@ ecbuild_add_option( FEATURE GPU
DESCRIPTION "Compile GPU version of ectrans (Requires OpenACC or sufficient OpenMP offloading support)"
CONDITION (HAVE_HIP OR HAVE_CUDA) AND (HAVE_ACC OR HAVE_OMP) )

# Check CPU or GPU is enabled, and if not, abort
if( (NOT HAVE_CPU) AND (NOT HAVE_GPU) )
ecbuild_critical("Please enable one or both of the CPU and GPU features")
endif()

if( HAVE_GPU )
if( HAVE_ACC )
set( GPU_OFFLOAD "ACC" )
Expand Down Expand Up @@ -142,10 +167,10 @@ ecbuild_add_option( FEATURE GPU_GRAPHS_GEMM
CONDITION HAVE_GPU
DESCRIPTION "Enable graph-based optimisation of Legendre transform GEMM kernel" )

ecbuild_add_option( FEATURE GPU_GRAPHS_FFT
ecbuild_add_option( FEATURE GPU_GRAPHS_FFT
DEFAULT ON
CONDITION HAVE_GPU
DESCRIPTION "Enable graph-based optimisation of FFT kernels" )
DESCRIPTION "Enable graph-based optimisation of FFT kernels" )

if( BUILD_SHARED_LIBS )
set( GPU_STATIC_DEFAULT OFF )
Expand All @@ -156,18 +181,32 @@ ecbuild_add_option( FEATURE GPU_STATIC
DEFAULT ${GPU_STATIC_DEFAULT}
DESCRIPTION "Compile GPU library as static library")

ecbuild_add_option( FEATURE ETRANS
DEFAULT ON
DESCRIPTION "Include Limited-Area-Model Transforms" )


ecbuild_add_option( FEATURE ECTRANS4PY
DEFAULT OFF
CONDITION HAVE_ETRANS
DESCRIPTION "Compile ectrans4py interface routines for python binding w/ ctypesForFortran" )


ectrans_find_lapack()

ecbuild_add_option( FEATURE TESTS
DEFAULT ON
DESCRIPTION "Enable unit testing"
REQUIRED_PACKAGES "MPI COMPONENTS Fortran"
CONDITION HAVE_CPU )
REQUIRED_PACKAGES "MPI COMPONENTS Fortran" )

### Add sources and tests
### Add sources
include( ectrans_compile_options )
add_subdirectory( src )
add_subdirectory( tests )

### Add tests
if( HAVE_TESTS )
add_subdirectory( tests )
endif()

### Export
if( BUILD_SHARED_LIBS )
Expand Down
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
recursive-include cmake
exclude MANIFEST.in
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,28 @@ The benchmark drivers are found in the bin directory.
A brief description of available command-line arguments can be obtained with e.g.
ectrans-benchmark-cpu-sp --help

Building `ectrans4py`
---------------------

The python wheel can be built from the root of the project, assuming above-mentioned variables are defined (`fiat_ROOT` etc...):
```
python -m build --wheel
```
and then:
```
python -m auditwheel
```
The built python wheel is then to be found in directory `wheelhouse/` and can be locally installed by pip:
```
pip install wheelhouse/ectrans4py-<x.y.z>(...).whl
```
The `_skbuild` and `dist` directories can be deleted.

Tests can be run from `tests/test_ectrans4py/`:
```
python -m pytest
```

Reporting Bugs
==============

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.0
1.5.1
3 changes: 3 additions & 0 deletions cmake/ectrans_compile_options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ elseif( CMAKE_Fortran_COMPILER_ID MATCHES "Cray" )
ecbuild_add_fortran_flags("-hnomessage=878") # A module named ... has already been directly or indirectly use associated into this scope
ecbuild_add_fortran_flags("-hnomessage=867") # Module ... has no public objects declared in the module, therefore nothing can be use associated from the module.
ecbuild_add_fortran_flags("-M7256") # An OpenMP parallel construct in a target region is limited to a single thread.
elseif( CMAKE_Fortran_COMPILER_ID MATCHES "IntelLLVM" )
ecbuild_add_fortran_flags("-march=core-avx2 -no-fma" BUILD BIT)
ecbuild_add_fortran_flags("-fp-model precise -fp-speculation=safe")
elseif( CMAKE_Fortran_COMPILER_ID MATCHES "Intel" )
ecbuild_add_fortran_flags("-march=core-avx2 -no-fma" BUILD BIT)
ecbuild_add_fortran_flags("-fast-transcendentals -fp-model precise -fp-speculation=safe")
Expand Down
3 changes: 3 additions & 0 deletions cmake/project_summary.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ ecbuild_info( " LAPACK_LIBRARIES : [${LAPACK_LIBRARIES}]" )
endif()
ecbuild_info( "FFTW" )
ecbuild_info( " FFTW_LIBRARIES : [${FFTW_LIBRARIES}]" )
if( CMAKE_TEST_LAUNCHER )
ecbuild_info( "CMAKE_TEST_LAUNCHER : [${CMAKE_TEST_LAUNCHER}]" )
endif()
ecbuild_info( "---------------------------------------------------------" )


Expand Down
23 changes: 23 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[project]
name = "ectrans4py"
dynamic = ["version"]
description = "ECTRANS interface for Python"
readme = "README.md"
requires-python = ">=3.10"
dependencies=["numpy", "ctypesForFortran<2.0.0"]
classifiers = [
'Development Status :: 3 - Alpha',
'Intended Audience :: Science/Research',
'Programming Language :: Python',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Operating System :: Unix',
]

[build-system]
requires = ["setuptools", "wheel", "scikit-build"]
build-backend = "setuptools.build_meta"

[tool.setuptools.dynamic]
version = {attr = "ectrans4py.__version__"}
25 changes: 25 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import os
import ast
from skbuild import setup

_version_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), "VERSION")
with open(_version_file, "r") as f:
__version__ = f.read().strip()

setup(
name="ectrans4py",
version=__version__,
packages=['ectrans4py'],
cmake_minimum_required_version="3.13",
cmake_args=[
'-DENABLE_ETRANS=ON',
'-DENABLE_ECTRANS4PY=ON',
'-DENABLE_SINGLE_PRECISION=OFF',
'-DENABLE_OMP=ON',
'-DFFTW_USE_STATIC_LIBS=ON',
],
package_dir={"": "src"},
cmake_install_dir="src/ectrans4py",
setup_requires=["scikit-build", "setuptools"],
install_requires=["numpy", "ctypesforfortran==1.1.3"],
)
6 changes: 6 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ add_subdirectory( programs )
if( HAVE_TRANSI )
add_subdirectory(transi)
endif()
if( HAVE_ETRANS )
add_subdirectory(etrans)
endif()
if(HAVE_ECTRANS4PY)
add_subdirectory(ectrans4py)
endif()
Loading