Author: Vincent Diepeveen
Date: 16:39:37 07/20/99
Go up one level in this thread
On July 20, 1999 at 17:58:34, Robert Pawlak wrote:
>I'd be interested to hear what some of the people directly involved with the
>development of chess software think about Linux.
Linux freaks better skip this suffering in linux, or they will
shake till their feets.
Linux is a very young OS where only a few dudes are actively PAID
(usual by some big company) to develop it.
So way less people work professionally at it than work for windows,
unix.
That's important to realize. A lot of things aren't working yet under
linux, and most are.
All the simple things are working correctly probably.
a main problem of linux is the fact that it's like one big can
of spaghetti where a few professional programmers are busy expanding
the spaghetti, without the rest of the world knowing they fixed that
gap, or without leaving a description clearly how they did it,
or if they leave a description, then you have to know thousands of
things before something gets done.
In the past all problems were much worse than they are now, so
Linux definitely progresses.
There are currently however some big problems (for NT too btw, but
to a lesser extend) with parallellism when doing this using IPC
(inter process communication).
Let me tell about my probs with linux.
It starts with installing linux at my home computer. Man
that took time. installation procedure, although a lot better than
in the past, still sucks bigtime. It's like giving someone a big manual
from a boeing 747 and say to him: "please fly this plane for me".
no doubt it can fly that jumbo, but how? Lot of non-trivial things.
Compiling 2.0.xx kernel to a parallel kernel was a real disaster.
First of all one cannot allocate at the older linux systems
more than 4 mb of shared memory. lucky at newer systems that's
already extended to 32 mb of shared memory.
Still a big bummer for me, as i wanted to use 450mb hashtables
in paderborn at the quad xeon of Bob.
To pass the functions:
mmap()
at unix systems MMAP can be used to allocate shared, anonymeous memory.
To my big surprise someone (tim mann) figured out for me why i didn't
get it to work. shared anonymeous memory is simply not implemented in linux
yet!
So mmap for sure couldn't do the job for me,
so i got to shmget. Directly i figured out that it couldn't
allocate more than 32 mb memory.
Big big bummer.
Some hackers found out i could only use more memory when recompiling
kernel (shmmax part). However above 128 mb i would have to change
really *a lot* to the kernel parameters. Considering Bob also
gets new kernels regurarly this is not a solution anyway.
After some months Bob found out that one could allocate more
than 32 mb memory when using kernel 2.2.x or above
and then echoing at startup of a machine
something to the kernel/shmmax would allow this.
I upgrade therefore also at home to kernel 2.2.xx.
To my big surprise this was a lot easier than the old kernels.
it compiled within an hour correctly!
Still this trick to allocate more memory didn't work, as
it only could allocate *ipc_private* memory (so for its own
process, other processes can't see that). After some weeks of
hacking i figured out a way to do it, as you get locally
in that process a shared memory number, and just passing that
*somehow* to the other processes does the job.
Lucky me that i have a mother process which starts all other
processes, otherwise that would have caused extra problems!
Took me in short a lot of freaks experts and other people and
some hacking, *just to allocate more than 32 mb
shared memory under linux*, something which succeeded in windows-NT
within 15 minutes, by just getting to the docs, cut'n pasting
an example and it was ready to rock.
I rewrite my spinloop in my program to a shorter spinloop to
fix some race problems.
So far so good. World champs starts and my diep gets crushed.
Parallellism worked fine though, except for 1 game,
although i later would find out that it might not even have
been my parallellism causing the crash.
So i start happily at my single cpu pro200 some processes and
see how it runs.
then i discover suddenly that the schedulers in both OSes (NT
and linux) suck bigtime!
type in linux:
man sched_setscheduler
all those nice schedulers are simply not implemented yet!
If they would work however linux would be ahead of NT on that...
>Specifically, do you think that it is now/will be a platform worth developing
>for. From a layman's standpoint, I would think that it would not be too
>difficult to port an engine written in ANSI C over to Linux, then use Tkl or
>something like it to build an interface.
my engine always ran under unix,linux and windows.
However commercially seen linux is of course nothing yet. It's
simply a toy. I didn't sell a single linux version of DIEP so far.
Of course my linux interface doesn't have a graphical interface.
I'm not that stupid to waste time at it!
>Also, do you think that the development tools are sufficiently mature to
>undertake something like this?
development tools under linux are there, but man. just to get them,
imagine the effort!
biggest complaint is the compiler: gcc, which sucks bigtime.
all linux compilers are very slow. It's logical that they are, but
man, nearly 3 years after pentium pro i would hope for finally a linux
compiler doing correctly the pentium pro instructions.
they're all producing 486 code now!
Can you imagine?
We're having the PIII now. So after
pentium pro first came:
PII
PIII
Merced specs are getting written now
So we're 3 generations of processors later and still we don't have
a compiler that can produce faster code that only works at pentium
pro, PII, or PIII. it all works still at the 486, which is a big
shame a few pro instructions would speedup my program directly 20%.
However if i now compile my program with
-mpentiumpro -march mpentiumpro
then it outputs 486 code and is 25% slower. big big shame.
>But, I realize that not all engines are coded in C... As a side question, what
>is the percentage of chess engines coded in C, and in assembler?
>Bob P.
We have a saying in netherlands which translated is:
"whose bread you eat, his word you speak".
So for now it's compared to windows NT/95/98
a) linux is slower as gcc is slower than msvc
b) i can't sell any program (chess and non-chessgame)
now or in the near future
for linux (although it's very easy to make a protection for
linux and very tough to protect for windows)
If only 1 of the 2 would be true, then linux would be in my eyes a major
success.
If you are interested in buying a linux version, let me know.
I bet you are not :)
So conclusion: linux gets slowly better (easier to install,
easier to work with), but it's far off right now from windows.
Nothing can beat the compatibility and easyness of windows so far.
big luck for all OS developers now is that seemingly windows-guys not taking
advantage of their advantage towards all other systems that compete with
them in that area, so linux gets a lot of years for free to get better,
without windows getting an inch better from gameplaying perspective.
Greetings,
Vincent
This page took 0.01 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.