On Wed, Aug 13, 2008 at 7:43 PM, stejin <
steffen...@web.de> wrote:
>
> I managed to compile and run CellDotNet + SciMarkCell on my PS3 after
> some initial difficulties.
>
> I first compiled CellDotNet with the Microsoft C# compiler (via Visual
> Studio 2005) and executed on PS3/Mono. This worked fine. SciMarkCell
> also compiled against CellDotNet.exe and I was able to run the
> benchmarks.
Cool.
I haven't tried to use mono/mcs to compile, but I'm sure that they
would appreciate a bug report :-).
>
>
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Next I got
>
>
> CellDotNet/Spe/BitVectorTest.cs(67,28): error CS0121: The call is
> ambiguous between the following methods or properties:
> `CellDotNet.Spe.BitVector.AddAll(System.Collections.Generic.IEnumerable<int>)'
> and
> `CellDotNet.Spe.BitVector.AddAll(System.Collections.Generic.IEnumerable<uint>)'
>
> CellDotNet/Spe/BitVectorTest.cs(110,28): error CS0121: The call is
> ambiguous between the following methods or properties:
> `CellDotNet.Spe.BitVector.RemoveAll(System.Collections.Generic.IEnumerable<int>)'
> and
> `CellDotNet.Spe.BitVector.RemoveAll(System.Collections.Generic.IEnumerable<uint>)'
>
> CellDotNet/Spe/BitVectorTest.cs(124,28): error CS0121: The call is
> ambiguous between the following methods or properties:
> `CellDotNet.Spe.BitVector.RemoveAll(System.Collections.Generic.IEnumerable<int>)'
> and
> `CellDotNet.Spe.BitVector.RemoveAll(System.Collections.Generic.IEnumerable<uint>)'
>
> Here are the calls in BitVectorTest
>
> [Test]
>
> public void TestBitVector_AddAllIEnumerable()
>
> {
>
> BitVector b1 = new BitVector();
>
>
> uint[] array = new uint[] { 7, 9, 333 };
>
>
>
> b1.AddAll(array);
Seems like mcs thinks uint[] can be implicitly cast as
IEnumerable<int>, which doesn't sound right to me...
Yet another mcs bug report candidate...
>
>
> This was the last hurdle. I am now able to compile both CellDotNet and
> SciMarkCell on my PS3 using Monodevelop.
Great!
>
> Next, I will study the API and start experimenting. I want to use it
> for pricing financial derivative instruments mainly involving Monte
> Carlo and binomial trees.
>
>
> Could you share your views about Cell BE performance based on your
> research?
Sure. First of all it's important to be aware that the compiler is not
all that mature in terms of robustness and optimizations, so you need
to be prepared to use some time improving it and fixing problems.
There are articles out there about cell performance which goes into
great depth, but here is the short version of what we found for the
benchmarks that we did. Vectorization is in general probably the most
important optimization that the programmer can perform. For the
compiler:
- Instruction scheduling in order to increase dual issue and decrease
stalls is important. Unfortunately we never did get that really
working, but there is some code in there to do it, and the results
were promising.
- Lack of branch prediction takes its toll, but we never really
attacked that issue except by providing intrinsic methods like
SpuMath.CompareGreaterThanAndSelect which can be used to avoid some
small branches.
- There are other aspects of the compiler wich really could use some
work, it all depends on how much you want to dig in...
For inspection and debugging of the generated code, debugging.html has
some instruction. (the part about blob functions is outdated,
though...)
Of course, if you are bandwidth bound, these optimizations might not
make so much difference...
> What are the results of your experiments with benchmarks?
A couple of highlights:
- Vectorization makes a huge difference.
- Monte carlo PI benchmark on cell significantly outperforms the
.net/mono versions, while the other benchmarks are not so favorable,
but also not that bad.
- The compiler still needs love :-)
> Maybe you could upload your thesis/research paper?
> If you have time, please also post SciMarkCell stats from your test
> systems.
The thesis is in danish, but I've put it in the downloads section
(
http://code.google.com/p/celldotnet/downloads/list) along with the
abstract. The performance figures/tables near the end hopefully makes
some sense, even if it's in danish. Here are a few works which might
come handy:
Løkkeudrulning = loop unrolling
Stall pga. data afhængighed = stalls caused by data dependency
If you feel like working on the compiler, let me know, because then we
should probably coordinate the efforts...
rasmus
>
> Cheers,
> Steffen
>
>
>
>
>
>
>
> >
>