lattice / quda

QUDA is a library for performing calculations in lattice QCD on GPUs.
https://lattice.github.io/quda
Other
292 stars 99 forks source link

Split large object files into different compilation units #373

Closed mathiaswagner closed 9 years ago

mathiaswagner commented 9 years ago

Looking at the object files generated by quda this turns out to be among the bigger ones. See (only files larger than 1MB)

-rw-rw-r-- 1 mathias mathias   32M Oct  5 03:03 copy_color_spinor.o
-rw-rw-r-- 1 mathias mathias   22M Oct  5 03:20 gauge_fix_ovr.o
-rw-rw-r-- 1 mathias mathias   19M Oct  5 03:06 dslash_twisted_clover.o
-rw-rw-r-- 1 mathias mathias   17M Oct  5 03:04 dslash_twisted_mass.o
-rw-rw-r-- 1 mathias mathias   17M Oct  5 03:05 reduce_quda.o
-rw-rw-r-- 1 mathias mathias   16M Oct  5 03:15 dslash_ndeg_twisted_mass.o
-rw-rw-r-- 1 mathias mathias   16M Oct  5 03:03 dslash_mobius.o
-rw-rw-r-- 1 mathias mathias   13M Oct  5 03:03 llfat_quda.o
-rw-rw-r-- 1 mathias mathias   12M Oct  5 03:02 dslash_domain_wall_4d.o
-rw-rw-r-- 1 mathias mathias   11M Oct  5 03:00 extended_color_spinor_utilities.o
-rw-rw-r-- 1 mathias mathias  9.8M Oct  5 03:00 copy_gauge_extended.o
-rw-rw-r-- 1 mathias mathias  9.6M Oct  5 02:59 copy_gauge_double.o
-rw-rw-r-- 1 mathias mathias  9.5M Oct  5 03:00 copy_gauge_half.o
-rw-rw-r-- 1 mathias mathias  9.2M Oct  5 02:59 copy_gauge_single.o
-rw-rw-r-- 1 mathias mathias  8.2M Oct  5 03:01 dslash_clover.o
-rw-rw-r-- 1 mathias mathias  7.5M Oct  5 03:01 dslash_domain_wall.o
-rw-rw-r-- 1 mathias mathias  7.0M Oct  5 02:59 dslash_improved_staggered.o
-rw-rw-r-- 1 mathias mathias  6.2M Oct  5 03:00 dslash_wilson.o
-rw-rw-r-- 1 mathias mathias  4.7M Oct  5 03:00 gauge_plaq.o
-rw-rw-r-- 1 mathias mathias  4.3M Oct  5 02:59 gauge_fix_fft.o
-rw-rw-r-- 1 mathias mathias  3.9M Oct  5 03:00 clover_invert.o
-rw-rw-r-- 1 mathias mathias  3.7M Oct  5 02:59 pgauge_det_trace.o
-rw-rw-r-- 1 mathias mathias  3.4M Oct  5 02:59 unitarize_links_quda.o
-rw-rw-r-- 1 mathias mathias  3.4M Oct  5 02:58 dslash_clover_asym.o
-rw-rw-r-- 1 mathias mathias  3.3M Oct  5 02:57 gauge_update_quda.o
-rw-rw-r-- 1 mathias mathias  3.0M Oct  5 02:57 extract_gauge_ghost_extended.o
-rw-rw-r-- 1 mathias mathias  2.9M Oct  5 02:57 blas_quda.o
-rw-rw-r-- 1 mathias mathias  2.7M Oct  5 02:58 hisq_paths_force_quda.o
-rw-rw-r-- 1 mathias mathias  2.3M Oct  5 02:57 dslash_staggered.o
-rw-rw-r-- 1 mathias mathias  2.0M Oct  5 02:57 gauge_ape.o
-rw-rw-r-- 1 mathias mathias  1.5M Oct  5 02:57 clover_deriv_quda.o
-rw-rw-r-- 1 mathias mathias  1.5M Oct  5 02:56 dslash_pack.o
-rw-rw-r-- 1 mathias mathias  1.3M Oct  5 02:58 pgauge_heatbath.o
-rw-rw-r-- 1 mathias mathias  1.2M Oct  5 02:56 field_strength_tensor.o
-rw-rw-r-- 1 mathias mathias  1.1M Oct  5 02:56 copy_clover.o

It should be easy to split that into multiple object similar to `copy_gauge'.

Shall we still go for these kind of optimization?

At least the cmake build should hopefully track the newly generated dependencies ...

maddyscientist commented 9 years ago

I've already split the copy_color_spinor .cu file in the multigrid branch: due to the explosion in number of colors it swells to over 200 MB - urgh.

mathiaswagner commented 9 years ago

So we know how to create a merge conflict. Can we cherry pick that change?

maddyscientist commented 9 years ago

Probably not. As I've said before the multigrid branch is major change: for that reason perhaps we should be aiming to get it merged into develop even before it's mature to keep the development vaguely sane.

maddyscientist commented 9 years ago

And I think I wouldn't favour any more file fragmentation until we have a hierarchical source file structure.

mathiaswagner commented 9 years ago

Agreed.