#9863: Error in sage/graphs/genus.pyx on ia64-Linux-suse
-----------------------+----------------------------------------------------
Reporter: mpatel | Owner: mvngu
Type: defect | Status: new
Priority: blocker | Milestone: sage-4.6
Component: doctest | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-----------------------+----------------------------------------------------
Comment(by drkirkby):
Replying to [comment:12 mderickx]:
> I also think that testing equality might by to strikt. While reading the
source code I read how get_memory_usage() works. And on linux it works by
asking top or prstat or the /proc filesystem how much memory the entire
python process is using in which sage is running.
{{{prstat}}} is '''never''' used on Linux - only on Solaris. To my
knowledge, prstat does not exist on anything other than Solaris.
{{{top}}} used to be commonly used on SunOS then Solaris systems, though
it was never part of the operating system. But it has become increasing
less useful with modern systems, so on Solaris at least, it is considered
unreliable.
The bit of code in Sage which uses {{{prstat}}} is only run on Solaris
(aka SunOS) is:
{{{
elif U == 'sunos':
# Sun's 'prstat' command appends K, M or G depending on whether
# the memory usage is in KB. MB or GB. So we need to strip off
# the letter, and convert to a consistent unit of MB.
memory_in_KB_MB_or_GB = top().split()[3]
if memory_in_KB_MB_or_GB.endswith("K"):
m = float(memory_in_KB_MB_or_GB.strip("K")) / 1024
elif memory_in_KB_MB_or_GB.endswith("M"):
m = float(memory_in_KB_MB_or_GB.strip("M"))
elif memory_in_KB_MB_or_GB.endswith("G"):
m = float(memory_in_KB_MB_or_GB.strip("G")) * 1024
}}}
I wrote that bit, since {{{top}}} is not standard on Solaris, and even if
installed, it is not very useful with modern Solaris versions.
These small numbers however are not going to be coming from the output of
the {{{top}}} command either.
Dave
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9863#comment:14>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.