https://bugzilla.redhat.com/show_bug.cgi?id=2238263



--- Comment #16 from Cristian Le <[email protected]> ---
> `%global _vpath_builddir %{_vendor}-%{_target_os}-build-${mpi:-serial}`

Oh interesting, it is a really neat approach, and it should be documented in
the packaging guidelines. I am adopting a slight variant, and adding some
comments for other packagers who want to use it as reference:

> # Note: The following works beause:
> # - %%global: macros are evaluated explicitly at definition, $variables are 
> not expanded
> # - %%define: macros are evaluated in-place, $variables are also expanded
> %global _vpath_builddir %{_target_platform}_${mpi:-serial}

I am experimenting with using `%{?}` and `%define` to do in-place expansion so
that the `%cmake` build step can look cleaner and more consistent with non-mpi
builds, e.g. `-DCP2K_USE_MPI=%{?$mpi:ON}%{!?$mpi:OFF}`
Otherwise, maybe using environment variable expansion:
`${MPI_LIB:+-DCMAKE_INSTALL_LIBDIR:PATH=$MPI_LIB}`. So far no much luck other
than delving into writing lua macros.

Can you check that the test are properly run in parallel? Looking at the
timings for `mpich` variant, it looks really bad [1].

I do not see that PROCESSORS [1] property is set, and I don't think the
upstream definition [2] takes into account `ctest -j2` that is used by default
in `%ctest`. From what I read in `ProcessorCount`[3], it gets the system's max
number of processors. If you know of similar discussions, let me know, I have a
similar design issue to solve.

[1] Github: https://github.com/LecrisUT/fedora-cp2k/pulls Copr:
https://copr.fedorainfracloud.org/coprs/lecris/cp2k/builds/
[2]
https://cmake.org/cmake/help/latest/prop_test/PROCESSORS.html#prop_test:PROCESSORS
[3]
https://github.com/cp2k/dbcsr/blob/579110dc00580dcdc06d3beef31bccd0378cf1dc/tests/CMakeLists.txt#L2C1-L14C9
[4] https://cmake.org/cmake/help/latest/module/ProcessorCount.html


-- 
You are receiving this mail because:
You are always notified about changes to this product and component
You are on the CC list for the bug.
https://bugzilla.redhat.com/show_bug.cgi?id=2238263

Report this comment as SPAM: 
https://bugzilla.redhat.com/enter_bug.cgi?product=Bugzilla&format=report-spam&short_desc=Report%20of%20Bug%202238263%23c16
_______________________________________________
package-review mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to