-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add method(s) to support larger EKOs #244
Conversation
Commit 53acd7f implements a first candidate for |
@alecandido @felixhekhorn please have a look at https://github.com/NNPDF/pineappl/pull/244/files#diff-b5009bd7e6df3b2ec6c5ae2bca2a3e23ae3402990d34a878da2f81f9ee21bd56R71-R255 which introduces two new types, You first
I think these two types best belong into NNPDF/eko#260, but here's a good playground to test them. I'm not completely convinced of the names, if you have better suggestions let me know. I've already written a modified version of |
In commits c8e85f8, 7935cea and 5d1a4e9 I added backwards compatibility, in the sense that previous file formats are now also supported. Since commit 695e0d5 It seems to work quite well already, but the evolution of E906 fails - some bins in the evolved grids are zero. I will investigate this tomorrow. |
V0(MetadataV0), | ||
V1(MetadataV1), | ||
V2(MetadataV2), |
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.
can we please change these names and use, e.g., V012, V013 ? since eventually we may have an offical eko data version (if we find a way to stabilize 🙈 ): https://github.com/NNPDF/eko/blob/master/src/eko/version.py
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.
Yes, absolutely! You just need to tell me which ones they are. V2
is from v0.13, V1
already has the sliced operators, but has a different metadata.yaml
format and V0
stores one big operator. See also the EKOs PineAPPL uses for testing: https://data.nnpdf.science/pineappl/test-data/.
Now that we have an impl Grid {
pub fn evolve_with_slices<'a>(
&self,
eko_slices: impl IntoIterator<Item = (OperatorSliceInfo, ArrayView4<'a, f64>)>,
order_mask: &[bool],
) -> Result<FkTable, GridError> {
// implementation
}
} Instead of a callback we have an |
Instead of using a cartesian product of two PIDs which is subsequently filtered use two iterators of PIDs first filtered and subsequently zipped. This is a change of O(n^2) to O(n) which makes a big difference if n is large enough. This is the case for dijet grids, for example.
Before commit ef962fa, evolving
and after it
That's an improvement by a factor of more than three! Profiling shows that roughly 72% of the CPU cycles is spent on pineappl/pineappl/src/evolution.rs Line 1086 in ef962fa
that's pretty good as well; we want the time to be spent on doing the linear algebra, not on the rest of the code, which is only organizational. For this grid memory consumption is less than 150 MByte (resident). |
On my desktop PC the numbers are similar:
vs.
|
Grid::evolve_slice
to support larger EKOs
Note to myself: adding a test with scale varied EKOs should be top priority, everything else can be added afterwards. |
Commits 90d9efd and 1e417a0 add a first Python interface for |
I'm not going to test myself in the short term, but thanks for this. However, I still believe it's more promising to avoid passing arrays through the Python interface (as much as possible, of course). So, I'd rather invest in driving the Rust loader (differently from grids, the EKO is on disk, and this is all happening to avoid loading it entirely - so, communicating through files is not a limitation). |
I've just merged this branch. The Python interface will be added in a separate PR. |
TODO list:
mod eko
to EKOGrid::evolve
: implemented in commit 0292ac8Grid::evolve
: commit 9124624