yt-project / yt

Main yt repository
http://yt-project.org
Other
465 stars 276 forks source link

build results vary from parallelism #4611

Open bmwiedemann opened 1 year ago

bmwiedemann commented 1 year ago

Bug report

Bug summary

After fixing #4609, there is some other remaining issue and my tools said, it is about the number of cores I give the build-VM.

Code for reproduction

build once each in a 1-core-VM and a 2-core-VM

osc co openSUSE:Factory/python-yt && cd $_
for N in 1 2 ; do
    osc build --noservice --vm-type=kvm -j$N --keep-pkg=RPMS.$N
    md5sum `find /var/tmp/build-root/standard-x86_64/home/abuild/rpmbuild/ -name \*.c|sort` > $N.md5
done
diff -u ?.md5

Actual outcome

bounding_volume_hierarchy.cpython-310-x86_64-linux-gnu.so and other binaries vary

/home/abuild/rpmbuild/BUILD/yt-4.1.4/build/lib.linux-x86_64-cpython-311/yt/utilities/lib/bounding_volume_hierarchy.cpp        2039-08-30 07:17:28.000000000 +0000
@@ -7059,7 +7059,7 @@            
                                 goto __pyx_L18;
                                 __pyx_L18:;
                                 #ifdef _OPENMP
-                                #pragma omp critical(__pyx_parallel_lastprivates1)                              
+                                #pragma omp critical(__pyx_parallel_lastprivates0)                                  
                                 #endif /* _OPENMP */
                                 {   
                                     __pyx_parallel_temp0 = __pyx_v_i;

Expected outcome

It should be possible to create bit-identical results (currently, that works only by doing all builds in 1-core-VMs)

Version Information

This bug was found while working on reproducible builds for openSUSE.

welcome[bot] commented 1 year ago

Hi, and welcome to yt! Thanks for opening your first issue. We have an issue template that helps us to gather relevant information to help diagnosing and fixing the issue.

neutrinoceros commented 1 year ago

I half-remember similar problems being raised in the past by downstream packagers (sometimes parallel builds may even crash). Any leads on what we should be on the look out for ?

bmwiedemann commented 1 year ago

From the context, it could come somewhere out of cython - it would not be the first compiler that has trouble with parallel processing.

But I know too little about your setup. python-scikit-learn seems to have a similar problem.

neutrinoceros commented 1 year ago

related issue: #4278