Thursday, December 2, 2010

Singular memory

As you probably know: Singular uses omalloc by Olaf Bachmann. It allows fast allocation of memory blocks of the same size.

Just a while ago we released new Singular: 3-1-2. Among other stuff it has the following experimental (and undocumented) feature: one can print out omalloc status (every single memory-related number) AND will try to test omalloc consistency.

In order to call it - simply type:
system("omMemoryTest");


Here follows its output on my machine:

> system("omMemoryTest");

[om_Info]:
MaxBytesSystem : 794624
CurrentBytesSystem : 794624
MaxBytesSbrk : 270336
CurrentBytesSbrk : 270336
MaxBytesMmap : 524288
CurrentBytesMmap : 524288
UsedBytes : 156976
AvailBytes : 493880
UsedBytesMalloc : 126568
AvailBytesMalloc : 0
MaxBytesFromMalloc : 126568
CurrentBytesFromMalloc : 126568
MaxBytesFromValloc : 524288
CurrentBytesFromValloc : 524288
UsedBytesFromValloc : 30408
AvailBytesFromValloc : 493880
MaxPages : 24
UsedPages : 23
AvailPages : 105
MaxRegionsAlloc : 1
CurrentRegionsAlloc : 1

[om_Opts]:
MinTrack : 0
MinCheck : 0
MaxTrack : 5
MaxCheck : 10
Keep : 100
HowToReportErrors : 2
MarkAsStatic : 0
PagesPerRegion : 128
OutOfMemoryFunc : 0x54e510
MemoryLowFunc : (nil)
ErrorHook : 0x877110


[om_ErrorStatus] : 'no error' (omError_NoError)
[om_InternalErrorStatus]: 'no error' (omError_NoError)


The later two lines indicate that no error was found.

PURPOSE: calling this function after a suspicious kernel function might indicate a memory corruption in it.

Tuesday, October 26, 2010

Patching with a svn/git diff...

I joined Singular development when CVS was used and contributed to the switch to Subversion (http://www.singular.uni-kl.de/svn/) which is currently being used.

AFAIK, before CVS there was RCS used, which resulted in such funny file versions as: 1.1.1.1 ;-)

At the moment we are working on Singular refactoring from bottom up and rely on git (http://developer.berlios.de/projects/singular/) for keeping our development branch (spielwiese) up to date with the official SVN Trunk (master).

Our git repo was imported by me using git-svn, which as it turned out, don't care for newly created SVN branches (such as Alexandr Dreyer's psico). (Btw, can there anything be done about that???). On the other side we don't commit to SVN from git.

That is why i needed an indirect connection in both ways, and the easiest found way was the following one:

  1. generate diff: "svn diff" / "git diff [--no-prefix]"
  2. and apply it with "patch -p0/-p1".

See http://stackoverflow.com/questions/659467/how-to-apply-svn-diff-to-git and http://tamsler.blogspot.com/2009/02/patching-with-git-diff.html.

Unfortunately, the method is too forgetfull as it leaves out all of the meta info (commit messages/authors/datestamps etc). Any comments on that?

Anyway, i hope that helps...

Thursday, October 21, 2010

Algebra talks

Next Wednesday I'll be "on stage" for talks most of the day. (Should have attended the Lee Strasberg Institute instead of the Fraunhofer Institute ;-) ) I've just finished my presentation of the new Industrial Algebra project for the ITWM's round-robin seminar.

So, I'm right in time, but there still work due: on the morning of the very same day I'll give a talk about Sage at our Hackerbrunch. Perhaps, I can persuade some of my colleagues to switch from Matlab and Mathematica to this free (...as in freedom) software. Currently, I'm trying to teach my Sage installation the finite element stuff from FEMhub. Showing that at the Hackerbrunch would be cool, because that's the things they need.

Nice corollary: I just realized that the FEMhub people maintain a Sage-compatible cmake package.

Wednesday, October 13, 2010

At the Singular Point

Today I was asked to become part of this new Singular Blog. Being a Singular developer, too, for so many years I immediately agreed. Also because I already enjoyed private and scientific blogging. (See The PolyBoRi Blog here at Blogspot.)

About blogging: first of all, it's fun! We ain't web-based journalists earning money here, not one blog per day (Tried it, failed). Instead, we express our philosophy as well as the emotions behind the software whenever we feel to do so. Software developers are us, and we are amused about sophisticated code snippets and annoyed by weird bugs. Let's spread the message and    hopefully    lead more people to the Singular point.

Welcome!

Welcome to Singular Team' newly created for blog for all of you interested in Singular and its development.

Let me explain: Singular is a computer algebra system for polynomial computations, with special emphasis on commutative and non-commutative algebra, algebraic geometry, and singularity theory. It is free and open-source under the GNU General Public Licence.

The aim with the blog is mostly to cover what is currently happening concerning the Singular development.

Also please let us know if there is anything you always wanted to know about Singular but were afraid to ask ;-)

Have fun!