Advertisement
Guest User

Untitled

a guest
Jun 8th, 2020
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 3.85 KB | None | 0 0
  1. Unlike gcc, icc can pretty much parallelize everything while detecting cases like the mutexes used by the ɢɪʟ for deciding not to parallelize.
  2.  
  3. The requirement is to use a less conservative approach using -par-threshold97 while using -par-schedule-auto -qoverride-limits -parallel -ipo1 -O3 ‑ip inside icc.cfg and CFLAGS at the same time.
  4.  
  5. The build does produce the main python C library, but the python interpreter using it doesn’t even start :
  6. Program received signal SIGSEGV, Segmentation fault.
  7. 0x00007fffff6128b0 in _PyEval_EvalFrameDefault () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0
  8. (gdb) bt
  9. #0  0x00007fffff6128b0 in _PyEval_EvalFrameDefault () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0
  10. #1  0x00007fffff3d55bc in _PyEval_EvalCodeWithName () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0
  11. #2  0x00007fffff3d474b in _PyFunction_Vectorcall () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0
  12. #3  0x00007fffff60da57 in call_function () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0
  13. #4  0x00007fffff613fb4 in _PyEval_EvalFrameDefault () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0
  14. #5  0x00007fffff3d55bc in _PyEval_EvalCodeWithName () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0
  15. #6  0x00007fffff4bbbb2 in builtin___build_class__ () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0
  16. #7  0x00007fffff42d72a in cfunction_vectorcall_FASTCALL_KEYWORDS () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0
  17. #8  0x00007fffff60da57 in call_function () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0
  18. #9  0x00007fffff613fb4 in _PyEval_EvalFrameDefault () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0
  19. #10 0x00007fffff3d55bc in _PyEval_EvalCodeWithName () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0
  20. #11 0x00007fffff4ea2ff in exec_code_in_module () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0
  21. #12 0x00007fffff4e9fdf in PyImport_ImportFrozenModuleObject () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0
  22. #13 0x00007fffff4e9d8f in PyImport_ImportFrozenModule () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0
  23. #14 0x00007fffff5e3643 in init_importlib () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0
  24. #15 0x00007fffff5e442c in pycore_init_import_warnings () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0
  25. #16 0x00007fffff5e45ac in pyinit_config () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0
  26. #17 0x00007fffff5e4922 in pyinit_core () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0
  27. #18 0x00007fffff5eb67c in Py_InitializeFromConfig () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0
  28. #19 0x00007fffff5d8fd0 in pymain_init () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0
  29. #20 0x00007fffff50e099 in pymain_main () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0
  30. #21 0x00007fffff50e071 in Py_BytesMain () from /home/example/rpmbuild/BUILD/Python-3.8.3/libpython3.8.so.1.0
  31. #22 0x00000000004011b5 in main ()
  32.  
  33. The point of doing this is about significant speedups at some intensive workloads like those handling large strings.
  34.  
  35. The configure script is already detecting case where icc is used in order to append ‑fp‑model fast=1. It looks like the same should be done where (on the specific files) it’s relevant (but I’m not having enough time to determines where not even to debug this).
  36.  
  37. A better approach in order to fix this would be to ensure thread safety at the relevant places if we consider gcc might one day be able to automatically parallelize at that level which means disabling the compiler option for icc is only a temporary fix at best.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement