building Sage docs on small VMs

61 views
Skip to first unread message

Dima Pasechnik

unread,
Nov 4, 2019, 8:00:32 AM11/4/19
to sage-devel
How does one switch off multiprocessing in docbuild?
(it's ludicrous not being able to build docs on a VM with 2GB of memory)

[dochtml] [reference] valuations: 1 todos, 14 index, 1495
citations, 13 modules
[dochtml] [reference] ... done (483 todos, 2097 index, 1506 citations,
2047 modules)
[dochtml] [reference] preparing documents... skipping loading of indexes... done
[dochtml] [reference] The inventory files are in
local/share/doc/sage/inventory/en/reference.
[dochtml] Build finished. The built documents can be found in
/home/dimpase/sage/local/share/doc/sage/inventory/en/reference
[dochtml] Building reference manual, second pass.
[dochtml]
[dochtml] Error building the documentation.
[dochtml] Traceback (most recent call last):
[dochtml] File "/home/dimpase/sage/local/lib/python2.7/runpy.py",
line 174, in _run_module_as_main
[dochtml] "__main__", fname, loader, pkg_name)
[dochtml] File "/home/dimpase/sage/local/lib/python2.7/runpy.py",
line 72, in _run_code
[dochtml] exec code in run_globals
[dochtml] File
"/home/dimpase/sage/local/lib/python2.7/site-packages/sage_setup/docbuild/__main__.py",
line 2, in <module>
[dochtml] main()
[dochtml] File
"/home/dimpase/sage/local/lib/python2.7/site-packages/sage_setup/docbuild/__init__.py",
line 1693, in main
[dochtml] builder()
[dochtml] File
"/home/dimpase/sage/local/lib/python2.7/site-packages/sage_setup/docbuild/__init__.py",
line 332, in _wrapper
[dochtml] getattr(get_builder(document), name)(*args, **kwds)
[dochtml] File
"/home/dimpase/sage/local/lib/python2.7/site-packages/sage_setup/docbuild/__init__.py",
line 526, in _wrapper
[dochtml] build_many(build_ref_doc, L)
[dochtml] File
"/home/dimpase/sage/local/lib/python2.7/site-packages/sage_setup/docbuild/__init__.py",
line 280, in build_many
[dochtml] _build_many(target, args, processes=NUM_THREADS)
[dochtml] File
"/home/dimpase/sage/local/lib/python2.7/site-packages/sage_setup/docbuild/utils.py",
line 257, in build_many
[dochtml] if reap_workers(waited_pid, waited_exitcode):
[dochtml] File
"/home/dimpase/sage/local/lib/python2.7/site-packages/sage_setup/docbuild/utils.py",
line 227, in reap_workers
[dochtml] w.start()
[dochtml] File
"/home/dimpase/sage/local/lib/python2.7/multiprocessing/process.py",
line 130, in start
[dochtml] self._popen = Popen(self)
[dochtml] File
"/home/dimpase/sage/local/lib/python2.7/multiprocessing/forking.py",
line 121, in __init__
[dochtml] self.pid = os.fork()
[dochtml] OSError: [Errno 12] Cannot allocate memory
[dochtml]
[dochtml] Note: incremental documentation builds sometimes cause spurious
[dochtml] error messages. To be certain that these are real errors, run
[dochtml] "make doc-clean" first and try again.
make[3]: *** [Makefile:2041: doc-html] Error 1
make[3]: Leaving directory '/home/dimpase/sage/build/make'
make[2]: *** [Makefile:1852: all-start] Error 2
make[2]: Leaving directory '/home/dimpase/sage/build/make'

real 14m21.762s
user 13m16.489s
sys 0m30.801s
***************************************************************
Error building Sage.

Thierry

unread,
Nov 5, 2019, 4:51:48 AM11/5/19
to sage-...@googlegroups.com
Hi,


On Mon, Nov 04, 2019 at 01:00:17PM +0000, Dima Pasechnik wrote:
> How does one switch off multiprocessing in docbuild?
> (it's ludicrous not being able to build docs on a VM with 2GB of memory)

Not an answer but a workaround: to build Sage doc for SDL on
pentium3-emulated VM, i do:

false ; while [ ! ${?} = 0 ] ; do make doc ; done

Ciao,
Thierry
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAAWYfq3-nciiFX_WQ8D%3DrUc5%2BMifgVYZKNj7ben7a3h2SYd%3Dcg%40mail.gmail.com.

Dima Pasechnik

unread,
Nov 5, 2019, 3:22:59 PM11/5/19
to sage-devel
On Tue, Nov 5, 2019 at 9:51 AM Thierry <sage-goo...@lma.metelu.net> wrote:
>
> Hi,
>
>
> On Mon, Nov 04, 2019 at 01:00:17PM +0000, Dima Pasechnik wrote:
> > How does one switch off multiprocessing in docbuild?
> > (it's ludicrous not being able to build docs on a VM with 2GB of memory)
>
> Not an answer but a workaround: to build Sage doc for SDL on
> pentium3-emulated VM, i do:
>
> false ; while [ ! ${?} = 0 ] ; do make doc ; done
>

doesn't terminate for me.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/20191105095145.4jmj5eqvli2fplq6%40metelu.net.

E. Madison Bray

unread,
Nov 6, 2019, 7:50:23 AM11/6/19
to sage-devel
On Mon, Nov 4, 2019 at 2:00 PM Dima Pasechnik <dim...@gmail.com> wrote:
>
> How does one switch off multiprocessing in docbuild?
> (it's ludicrous not being able to build docs on a VM with 2GB of memory)

The variable you're looking for I think is SAGE_NUM_THREADS=1 (note: I
think it will still fork at least once even with this).

Dima Pasechnik

unread,
Nov 6, 2019, 9:03:02 AM11/6/19
to sage-devel
still fails in the same way.
What doesn't fail is

SAGE_NUM_THREADS=1 ./sage -docbuild reference html

I don't know how this is different from "make doc"


> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAOTD34YyK2oosscfK80%2Ba7gX06%3DEXS%3Dyu3JJf1DEzvWcJhZprA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages