[AD] Some findings of using Allegro on a multi-processor machine. |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Here is something to add to the discussion of Allegro and Multiprocessor
PCs.
Once when at a friend's house, I noticed that one of my Allegro games had a
problem on his PC (Allegro 4.1.9). Every so often, the game would stop
responding to mouse and keyboard input. The mouse-cursor would sometimes
dissappear as well. This lasted anywhere from a few seconds to more than a
minute, and then, mouse and keyboard control would be restored for a similar
period of time. I've tried my game on many PCs before and I've never seen
this happen, so at the time, wasn't sure what was going on. I later read a
discussion here about Allegro having difficulties on multi-processor
machines. "This was it", I thought. I remembered that my friend's machine
was the only machine I had tried it on that had a motherboard that could
support multiple CPUs (I wasn't entirely sure if there really was >1 CPU,
but then again, Windows 98 may not be able to recognise a second CPU), and I
was pretty sure that the other machines I had tried it on were only
single-CPU.
Here are some specs of his machine.
CPU: Pentium III 852MHz (not sure if one or two CPUs)
L2 Cache: 256kB ECC synchronous ATC
System Mainboard : ASUSTeK Computer INC. P2B-D
System Chipset : Intel Corporation 82443BX/ZX 440BX/ZX CPU to PCI Bridge
(AGP Implemented)
System BIOS : Award Software, Inc. ASUS P2B-D ACPI BIOS Revision 1012B
RAM: 512MB SDRAM
Hard drive: Two 10 MB hard-drives
Graphics card: NVIDIA GeForce2 MX/MX 400
Sound: CMI8738/C3DX PCI Audio Device
Keyboard : Standard 101/102-Key or Microsoft Natural Keyboard
Mouse : PS/2 Compatible Mouse Port connected mouse
OS: Windows 98 SE (hence ambiguity about # of CPUs)
If anyone wants, I could mail more detailed specs I obtained using Sisoft
Sandra.
I don't get to visit him often, and the only way to test things on his
machine is to send him statically linked EXE's (I don't think he can handle
swapping DLLs around) over a dialup-connection, so I can't report on the
effects of any changes, but it seems that a few other people here have
noticed this too, so it looks like it is an issue after all and that there
are others out there with similar machines to try out fixes with.
One thing that does strike me as strange is that although Windows 98 SE only
makes use of one processor, the problem still showed up.
So anyway, I got to visit him again recently, and to help pin down the
problem, I compiled six versions of my game and tried to corner the problem
(note that the version I first tried on his machine was compiled with
Allegro 4.1.9, MSVC 6 (SP5), GFX_DIRECTX).
Allegro 4.1.11, MSVC 6 (SP5), GFX_DIRECTX
Allegro 4.1.11, MSVC 6 (SP5), GFX_DIRECTX_WIN
Allegro 4.1.11, MSVC 6 (SP5), GFX_GDI
Allegro 4.0.3, GCC 3.2 (Cygwin compiling in MinGW mode), GFX_DIRECTX
Allegro 4.0.3, GCC 3.2 (Cygwin compiling in MinGW mode), GFX_DIRECTX_WIN
Allegro 4.0.3, GCC 3.2 (Cygwin compiling in MinGW mode), GFX_GDI
Anyway, I found that the only version that demonstrated the problem was the
first version (the fullscreen 4.1.x version (GFX_DIRECTX) ). All 4.0.3
versions ran fine, as did all windowed versions (GFX_DIRECTX_WIN and
GFX_GDI).
So it looks like this is a bug that has crept in sometime during the
development of the 4.1.x branch. Or it could be a bug in the MSVC runtime
code (alas, I did not get the chance to compile with the WIP branch on GCC
or the stable branch on MSVC).
AE.