-
Notifications
You must be signed in to change notification settings - Fork 36
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
ACCORD-NWP CY50 contributions #172
base: develop
Are you sure you want to change the base?
Conversation
|
…ate (trans, etrans, biper); only single include directory
(cherry picked from commit 8d9307f)
7953e2f
to
417bc1c
Compare
@ddegrauwe - I amended your commits which had ddegrauw@login05.leonardo.local as the "email address". Now you only need to sign the CLA once :) |
LIBS | ||
fiat | ||
parkind_${prec} | ||
trans_${prec} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think something like
OpenMP::OpenMP_Fortran
is needed here, as omp_lib is used in the driver
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think something like
OpenMP::OpenMP_Fortran
is needed here, as omp_lib is used in the driver
I wonder if that wouldn't be the reason why we had to disable the PROGRAMS via an option when compiling in a Docker image for the build of the ectrans4py Python wheel ?
@@ -0,0 +1,20 @@ | |||
if(HAVE_ETRANS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this check is redundant because it's done in the CMakeLists.txt one level up.
Copyright statements are missing in every file I quickly browsed through. |
There are tests missing for etrans and ectrans4py. |
@@ -45,6 +46,7 @@ MODULE TPM_FFTW | |||
TYPE(FFTW_PLAN),POINTER :: FFTW_PLANS(:) => NULL() | |||
INTEGER(KIND=JPIM) :: N_MAX=0 ! maximum number of latitudes | |||
INTEGER(KIND=JPIM) :: N_MAX_PLANS=4 ! maximum number of plans for each active latitudes | |||
LOGICAL :: LALL_FFTW=.FALSE. ! T=do kfields ffts in one batch, F=do kfields ffts one at a time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This new logical variable LALL_FFTW
is configurable via a new optional argument to SETUP_TRANS
: LD_ALL_FFTW
This variable is then passed to EXEC_FFTW(..., LD_ALL)
The routine EXEC_FFTW
itself however apparently does not make use of this variable, i.e. an unused argument. Unless I missed something, this variable is not used.
So I propose to revert all changes related to this variable in TPM_FFTW
, and SETUP_TRANS
.
Changing the API to external facing routines like SETUP_TRANS
is something we should not do lightly.
It would involve also adding tests to exercise the new API, and one also needs to consider the GPU codepath, where FFTW is not used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about https://github.com/ecmwf-ifs/ectrans/blob/develop/src/trans/cpu/internal/tpm_fftw.F90#L276? It's used there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies, I see now that LD_ALL is used in EXEC_FFTW after all.
CMakeLists.txt
Outdated
ecbuild_add_option( FEATURE PROGRAMS | ||
DEFAULT ON | ||
DESCRIPTION "Build src/programs" ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need an option to disable the programs?
If there is a good reason to do so, we should be consistent with other packages (e.g. eccodes) which use the feature "BUILD_TOOLS" for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See answer to comment by Olivier above
Configuration with -DENABLE_ETRANS=ON seems broken. Possibly something went wrong with the rebase?
I noticed that this PR patches a posteriori targets like The approach should be that new etrans_dp and etrans_sp targets should be created that link with trans_dp and trans_sp rather than patch them. |
Can the addition of ectrans4py be put on a backlog? |
@ddegrauwe could you do the suggested transformation for etrans ? |
I think we didn't want to create separate libraries for etrans, and at the same time that etrans be as little intrusive to trans as possible. If you have something better to propose... (I have very little cmake experience). |
What do you mean ? |
|
I'll put the lam transforms in a separate library, following the single/double precision mechanism from the global transforms. Is it really necessary to have a "common" part (as in common to sp/dp)? What's the problem with just having sp/dp variants for all files? I'll also add copyright statements (ECMWF+MeteoFrance; I'm not sure if ACCORD is a legal entity that can hold copyrights). I'll also implement a test for the LAM transforms. |
The common part is not only common to sp/dp (cpu), but also to gpu_sp and gpu_dp. See this PR with latest changes in this regard: #141 |
…ans/cpu/; (ii) create separate ectrans_etrans_* libraries instead of patching ectrans_* libraries; (iii) re-introduced FFT992, but put it under a switch WITH_FFT992 everywhere; compiling/running with FFT992 instead of FFTW is probably still broken; (iv) temporarily added ellips.F90, which in fact should go into fiat.
0bf8f90
to
73111ab
Compare
Regarding ectrans4py: These are simple wrappings to ectrans functions, and the python binding is done using Another option could be to make it a standalone project, out of ectrans though relying on it, but I think it would be a pity. |
OK @AlexandreMary fair enough, I won't object. I'd urge to have some tests for this soon. If nobody has time for this now that can come later but it would be great to have soon. That would also serve as use a minimal documentation. |
This PR takes the branch from PR #171 and rebases it against develop for a clean merge.
This is a draft as further changes are required, e.g. adding an import for
TW
intoFTINV
etc.