Closed janw20 closed 4 months ago
Hi @janw20, thank you for your pull request! I had a look at your changes and they look pretty much as they should. I will comment on a few minor details, but after fixing them we can merge the PR quite soon.
We probably also want to improve the following points (not necessarily in this PR):
pineappl.f90
into code coverage*.mod
along with the rest of the CAPI; for why this isn't trivial see the discussion and pointers here: https://fortran-lang.discourse.group/t/installing-fortran-module-files/1135/5Hi @cschwan, thanks for your comments, I added the terminating newlines. I started learning Rust but I'm not very proficient yet, so I don't know if I can contribute to how the Fortran module would be compiled with cargo-c. But I think it would be nice if it would be installed together with the C API.
@cschwan is certainly more expert than myself (he did it) but, ttbomu,the only two things you should be concerned about for C installation are:
https://github.com/NNPDF/pineappl/blob/11cc43d2f54e0046688210a004dedcab26fc5958/pineappl_capi/Cargo.toml#L25-L26 and https://github.com/NNPDF/pineappl/blob/master/pineappl_capi/cbindgen.toml
They are both declarative and pretty much straightforward.
For Fortran I guess there are additional problems, not related to Rust or cargo-c
, but to Fortran itself. Most likely, the discussion pointed out by @cschwan is a great starting point (and my guess is that the main issue is the portability of the possible alternatives...)
No worries, @janw20, my comment above was more about writing down the ideas so they don't get lost. I created dedicated Issues for them now: #257 and #258.
This looks good and I'm merging it now. Thanks again, @janw20!
Hi, I was working on using PineAPPL with an existing Fortran code, and during that, I completed the Fortran interface to the PineAPPL C API, wrote a file to test this and added an example how to use the interface with LHAPDF, and also I implemented the convolute_with_two function in the Python interface.