[xsd-users] Parallelization of the serializer
Yury Zaytsev
yury.zaytsev at traveltainment.de
Fri Jul 17 08:56:57 EDT 2015
Hi,
I have found out that the runtime of my program that serializes a very
large number of objects in a loop using the streaming serializer is
entirely dominated by the calls to s.next(), that is at this point there
is nothing I can really optimize at a higher level. Therefore, I would
like to serialize in parallel from several threads.
This brings me to the question of what can I safely assume about the
thread-safety of the serializer? A naive attempt to cilk_for my
serialization loop has lead to a segfault, so I assume that it simply
isn't thread-safe :-)
I realize that in theory, I can create a pool of serializers and spin on a
lock in my worked threads until one becomes available, but this sounds
like a substantial amount of work (as compared to a simple OpenMP or Cilk
Plus solution).
So, as an alternative, would it be possible to make the serializer
compatible with a Cilk Plus ostream reducer without too much investments?
https://www.cilkplus.org/tutorial-reducer-ostream
https://www.cilkplus.org/docs/doxygen/include-dir/group___reducers_ostream.html
Another approach could be to use Cilk Plus holders to store the
serializers, but I haven't quite figured this out yet.
Have I overlooked anything? I would appreciate pointers to other
approaches to parallelize with a minimal amount of extra work :-)
All the best,
--
Dr. Yury V. Zaytsev
Senior Software Developer
IT Data Production
TravelTainment GmbH
Carlo-Schmid-Straße 12
52146 Würselen/Aachen, Germany
yury.zaytsev at traveltainment.de
http://www.traveltainment.de
Amtsgericht Aachen, HRB 15873
Geschäftsführer: Bernhard Steffens (Vorsitzender),
Dr. Oliver Rengelshausen
More information about the xsd-users
mailing list