BozoChess on a new machine

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

BozoChess on a new machine

Post by sje »

Eventually, BozoChess will be multithreaded. Because the Free Pascal thread scheme is somewhat different between Unix and Windows deployment targets, I've had to get a Windows box for testing. This is against my long standing tradition of allowing no Microsoft products in my humble home, but I just can't do the proper testing otherwise. Ah, the sacrifices one has to make for science.

The new box, purchased from an establishment with a name sounding something like "Mal-Wart", has a 3.1 GHz AMD Athlon II X4 CPU (64 bit quad core, 2 MB L2 cache) and 4 GB of RAM. See http://www.acer.com.tw/ac/en/US/content ... .SGM02.002

I installed Ubuntu Linux on a separate partition of the 1 TB HD and got everyone talking on the LAN. Also, I installed Free Pascal on both the Windows 7 side and on the Ubuntu side.

Honestly, with Mac OS/X and Ubuntu Linux available, I just don't understand why anyone would want to muck around with Windows. I had to do such work myself for many years, but only because I was paid to do so.

Anyway, I did some performance testing using Free Pascal with the Ubuntu side of the new machine and found that the Athlon chip runs with a throughput of about 95% of my five year old 2.66 GHz dual twincore Xeon 5150 Mac Pro. This is actually fairly good considering that the AMD chip retails for only about US$100.

More on this as work progresses.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: BozoChess on a new machine

Post by sje »

sje wrote:Anyway, I did some performance testing using Free Pascal with the Ubuntu side of the new machine and found that the Athlon chip runs with a throughput of about 95% of my five year old 2.66 GHz dual twincore Xeon 5150 Mac Pro.
The above 95% figure drops to about 85% when doing transposition assisted perft calculations. This is due in part to the fact that the Athlon chip has zero L3 cache, one of the reasons that it's less expensive than its big brother Phenom model.
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: BozoChess on a new machine

Post by Don »

sje wrote:Eventually, BozoChess will be multithreaded. Because the Free Pascal thread scheme is somewhat different between Unix and Windows deployment targets, I've had to get a Windows box for testing. This is against my long standing tradition of allowing no Microsoft products in my humble home, but I just can't do the proper testing otherwise. Ah, the sacrifices one has to make for science.
I feel your hurt brother.

I too have had to make the sacrifice in order to ensure Komodo runs on Windows. I have configured a laptop to dual boot to Windows 7 for those few times I must drop down to DOS.

Have you looked at virtualbox? I don't know if it supports a guest OS with multiple cores but that could be one possibility.

The new box, purchased from an establishment with a name sounding something like "Mal-Wart", has a 3.1 GHz AMD Athlon II X4 CPU (64 bit quad core, 2 MB L2 cache) and 4 GB of RAM. See http://www.acer.com.tw/ac/en/US/content ... .SGM02.002

I installed Ubuntu Linux on a separate partition of the 1 TB HD and got everyone talking on the LAN. Also, I installed Free Pascal on both the Windows 7 side and on the Ubuntu side.

Honestly, with Mac OS/X and Ubuntu Linux available, I just don't understand why anyone would want to muck around with Windows. I had to do such work myself for many years, but only because I was paid to do so.

Anyway, I did some performance testing using Free Pascal with the Ubuntu side of the new machine and found that the Athlon chip runs with a throughput of about 95% of my five year old 2.66 GHz dual twincore Xeon 5150 Mac Pro. This is actually fairly good considering that the AMD chip retails for only about US$100.

More on this as work progresses.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: BozoChess on a new machine

Post by sje »

Don wrote:I too have had to make the sacrifice in order to ensure Komodo runs on Windows. I have configured a laptop to dual boot to Windows 7 for those few times I must drop down to DOS.

Have you looked at virtualbox? I don't know if it supports a guest OS with multiple cores but that could be one possibility.
Well, I looked into Wine under Ubuntu, but that still seems too hackish for my taste. The dual boot using a separate machine is the best way to do things for compatibility testing.

There are still problems. Setting up an SMB file server under Windows is a bug infested crock. Accessing this monstrosity via Mac OS/X means errors with mixed case file names, errors with non alphanumeric characters in file names, errors with multiple simultaneous access, errors with error recovery, and errors with unmounting a hung server. None of these problem appear with file serving under OS/X or Linux. Microsoft just doesn't give a crap about non Windows systems and it shows. Hell, I'll bet they're proud of it!

Anyway, I've gotten Bozo compiled and running under Windows 7 and all results (other than timings) from decent platforms have been duplicated. But note: I haven't done any thread coding yet. This will be the big test.

Windows 7 is like an eighty year old woman who thinks she can look like she's twenty if she can slap on enough layers of make-up.
ZirconiumX
Posts: 1334
Joined: Sun Jul 17, 2011 11:14 am

Re: BozoChess on a new machine

Post by ZirconiumX »

Windows 7 is like an eighty year old woman who thinks she can look like she's twenty if she can slap on enough layers of make-up.
Code-wise Win7 is exactly like Vista, but with extra *stolen* ideas slapped on.

For instance, the dock at the bottom has been on Mac OS X for donkey's years*, and it has been on UNIX for even longer**.

The only good/annoying thing about Winbulldozer is that there are loads of programs for it.

Matthew:out

* Since Rhapsody, 1997
** Since CDE, sometime around 1993.
Some believe in the almighty dollar.

I believe in the almighty printf statement.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: BozoChess on a new machine

Post by sje »

ZirconiumX wrote:
Windows 7 is like an eighty year old woman who thinks she can look like she's twenty if she can slap on enough layers of make-up.
Code-wise Win7 is exactly like Vista, but with extra *stolen* ideas slapped on.
I think of Windows 7 as MS-DOS 11.0.

Eventually, Ubuntu and other open source alternatives will put Microsoft out of business. When? I can't say, other than it will likely be sooner than most expect. You don't believe me? Consider the list of defunct US computer companies given at http://en.wikipedia.org/wiki/Category:D ... ted_States

Back in the day, many of these firms were considered to be immune to failing and more than a few had incredibly arrogant attitudes towards their lesser brethren. Now they are all gone; examples of "pride going before a fall".
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: BozoChess on a new machine

Post by Don »

sje wrote:
ZirconiumX wrote:
Windows 7 is like an eighty year old woman who thinks she can look like she's twenty if she can slap on enough layers of make-up.
Code-wise Win7 is exactly like Vista, but with extra *stolen* ideas slapped on.
I think of Windows 7 as MS-DOS 11.0.
For a long time windows was DOS in almost every sense of the word. Technically I think that is no longer the case but I still use the terms interchangeably.

Eventually, Ubuntu and other open source alternatives will put Microsoft out of business. When? I can't say, other than it will likely be sooner than most expect. You don't believe me? Consider the list of defunct US computer companies given at http://en.wikipedia.org/wiki/Category:D ... ted_States

Back in the day, many of these firms were considered to be immune to failing and more than a few had incredibly arrogant attitudes towards their lesser brethren. Now they are all gone; examples of "pride going before a fall".
I like what you are saying, but unfortunately I think this will be a long time coming if at all. Even now Microsoft is receiving royalty payments for Linux operating systems, specifically Android, due to pressure from Microsoft in the form of lawsuits. Microsoft is one of the most predatory corporations in existence and I think there is a reasonably good chance that they will eventually find a way to kill Linux. The trend however gives me hope, Linux has continued to gain popularity but you can be sure they are working on ways to kill it.

A common way these days is to simply get some judge to rule that Linux is violating all of their software patents. It's sounds crazy, but with massive amounts of money and power you can make almost anything happen.

The other factor that inhibits superior technology such as Linux is the very conservative nature of humans. Microsoft has positioned themselves (in the minds of the average consumer) as the only reasonable choice. They appeal to everyone's sense of being part of the crowd and not being different and MS is viewed as a "benevolent dictator", the company that is looking out for your needs and wants to make you happy. Of course you also have their advertising campaign which tries to position them as the most innovative company in existence when in fact they do most things years after someone else does it first (such as multi-tasking, graphical interface, etc.)

Nevertheless there is still some hope because occasionally rebelling against conservatism ends up being the cool thing to do. Linux could catch on if it becomes "fashionable" and "cool", and that would probably happen due to some celebrity with rock star status (it could be a rock star) becoming associated with it perhaps combined with condescending statements about Windows. I would hate to see Linux succeed due to snob appeal but that could very well happen.

Another thing that could happen, and I'm surprised it hasn't yet, is that Microsoft could embrace Linux, perhaps in an effort to kill it. They could produce their own distribution but leave it crippled in some way, perhaps turning it into a toy scaled down product for children or positioning it as "not serious" in some way. They might manage to make a strong association in peoples minds that Linux is not a serious OS.

Android managed to take an open source GPL product, modify it, and keep it closed source, I have not studied how this actually works and how they got away with it, but if Google could do this I'm sure Microsoft could do it even better. With some effort they could take Linux over and smear it's name.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

After a week

Post by sje »

After a week or so, the new machine seems to be doing okay with no hardware problems.

The key caps on the included keyboard cannot be physically repositioned for the Dvorak layout, so I swapped in a refurbished Apple Pro keyboard which works fine although it's missing a few Windows specific keys. I swapped in a Logitech corded USB mouse for the included mouse, but this is just a matter of personal preference. No special drivers were needed for either the keyboard or the rodent.

The network interface is the usual 1 Gbps twisted pair connection. Inside the box are a pair of low-height PCIe slots, and one of them might get a PCIe x1 Asus wireless-N card, just like the Ubuntu box I've got running the perft(13) calculation.

There was only one software problem with Ubuntu. I had a difficult time at first getting the Linux grub boot loader screen displayed, in part due to my very old VGA LCD monitor not handling the high refresh rate default output by the NVIDIA integrated graphics. I was able to fix the problem, but I'm embarrassingly unable to remember exactly how I accomplished this. It may have been that somehow beer was involved.

On the Windows 7 side of things, it took hours to identify and remove the useless bloatware which was part of the default installation. I think I got all of it, but I'm not really sure. I tried to get the Windows Media Player working with my 20+ GB music collection, but encountered so many difficulties that I gave up on that and installed Apple's iTunes instead. The audio is okay with the included external speakers; it is much better with headphones.

The Windows 7 installation includes a copy of an older version of the C/C++ Visual Studio IDE. I have no use for this at present as it is not capable of handing POSIX threads, something needed for Symbolic and my other C++ code.

For compiling BozoChess. I use the Windows command prompt window which also serves as the BozoChess execution environment. The alternative is to use the Free Pascal IDE or the much more sophisticated Lazarus IDE (also free). But I need neither of these as Bozo is built with the simple one line command:

Code: Select all

fpc -O3 bozochess.pas