Le vendredi 8 janvier 2010 23:40, David Haller a écrit :
Hello,
On Fri, 08 Jan 2010, Jean Delvare wrote:
Le vendredi 8 janvier 2010 19:07, Dave Plater a écrit :
All I can give is the excerpt from INSTALL.txt : Known issues and warnings .........................
The most time consuming task for building the documentation is running LilyPond to build images of music, and there cannot be several simultaneously running `lilypond-book' instances, so `-j' `make' option does not significantly speed up the build process. To help speed it up, the makefile variable CPU_COUNT may be set in `local.make' or on the command line to the number of `.ly' files that LilyPond should process simultaneously, e.g. on a bi-processor or dual core machine
make -j3 CPU_COUNT=3 doc
The recommended value of CPU_COUNT is one plus the number of cores or processors, but it is advisable to set it to a smaller value if your system has not enough RAM to run that many simultaneous LilyPond instances.
"there cannot be several simultaneously running `lilypond-book' instances"
This is the key problem, that should be addressed by the developers.
lilypond-book has an option to run more that one job, which _is_ set to $CPU_COUNT in the Makefile.
I could imagine that without even looking at the code. But that's the problem, not the solution. Good build systems are when the work is split into small tasks, so that these tasks can be run in parallel, with "make" handling the dependencies so that things are processed in the right order. Here, lilypond-book is moving the task splitting one level deeper, so "make" is basically useless. The proper fix would be to let several _instances_ of lilypond-book run in parallel, with each instance doing a part of the job and possibly one instance merging the results. Similar to gcc being used to build many small object files and then all object files being linked together.
One could only parse $(MAKEFLAGS) instead, at least I don't find a make-Variable containing the number of jobs.
It is indeed in $(MAKEFLAGS), but I wouldn't recommend using it. If you have to pass $CPU_COUNT to lilypond-book, this means that "make" can't do the parallelization. If it really can't then the -j is useless. If there are other tasks to achieve and "make" _can_ do some parallelization, then the number of tasks will be twice as much as what you asked for (if not worse...) and your build system will go on its knees. For the time being, "make CPU_COUNT=3 doc" (without -j3) seems better. -- Jean Delvare Suse L3 -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org