Re: GHC on Cray XMT?

2007-02-27 Thread Peter Tanski

Chad Scherrer wrote:

The new Cray XMT seems to target exactly the same kind of analytic
problems where Haskell excels:

http://www.cray.com/products/xmt/

I'm not a hardware guy, but this seems like a natural fit with the
recent advances in SMP Haskell. I know some compiler experts, but none
of them have experience with Haskell.

Can anyone tell me how big an undertaking it would this be to get GHC
going on one of these? It seems to me like the fact that the absence
of cache on XMT processors should simplify things, since there are
less issues reasoning about locality.
Porting GHC to a new architecture may be easy or very involved.  See  
http://hackage.haskell.org/trac/ghc/wiki/Building/Porting.  Porting  
to the Cray XMT would appear to be very difficult but a real Plum!.   
I am not sure how close its UNICOS operating system is to BSD (GHC  
has ports to FreeBSD and OpenBSD)--that is just the main programming  
environment; working with the processors may require a smaller  
microkernel environment.  According to the XMT Datasheet the main  
programming is done on Linux-based nodes.  Linux is GHC's home OS,  
so that would seem to make it a little easier.


For an experience porting Glasgow Parallel Haskell (GPH) to an MPP,  
you might want look at the work of Kei Davis (http://www.c3.lanl.gov/ 
~kei/), who ported an older version of GHC to the Thinking Machines  
CM-5 SPMD (http://www.c3.lanl.gov/~kei/lanlwork.html and especially,  
MPP Parallel Haskell (Preliminary Draft), 1996, at http:// 
www.c3.lanl.gov/~kei/ifl96.ps).  Kei Davis's work is also referenced  
on the Glasgow Parallel Haskell site, under PORTS (http:// 
www.macs.hw.ac.uk/~dsg/gph/).  I mention his work in particular  
because the CM-5 port involved a slightly new (Solaris-like) OS and a  
specialised message passing system, CMMD, instead of PVM used by  
Glasgow Parallel Haskell.  That would be quit a lot of work since you  
would have to modify the RTS--the old GUM (Parallel Haskell support)  
stuff is still in there but it is somewhat bit-rotted.


The amount of work required might get worse or better as GHC's future  
is native assembly output--worse, because you would have to work  
through the assembly code and efficient C-code generation would  
require more work with a nasty Perl script called the Mangler;  
better, depending on whether someone essentially rewrites the ugly  
spider-web of code in GHC's Native Code Generator (NCG).  But all  
this stuff is for a native port: if you have access to an XMT, you  
might want to simply follow the directions on Porting GHC to a new  
platform (http://hackage.haskell.org/trac/ghc/wiki/Building/ 
Porting#PortingGHCtoanewplatform) and see what problems you run into.


Cheers,
Peter Tanski



___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


using a stage1 as a compiler for a later ghc?

2007-02-27 Thread Isaac Dupree
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I'm on a system with main ghc = 6.4.2.
I've built a ghc 6.6 stage1.
Is there any problem using that ghc-inplace as a compiler for GHC HEAD?
(which is done e.g. by ./configure
-
--with-ghc=/home/isaac/hardly-mine-at-all/build/ghc-6.6/compiler/stage1/ghc-inplace
?)

(which I want to do because, theoretically 6.6 should be faster here,
since it supports -fasm unlike the ubuntu-edgy-powerpc-ghc-6.4.2, and
also considering how my gcc likes to crash randomly a few times during
anything as extensive as compiling ghc...)

Isaac
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF5LXeHgcxvIWYTTURAoo2AKDHUAo+7759LwBbXh5cP7zklMfKkgCdGoK9
ZQvjhkVTVUt512kpMPquDzc=
=zn7+
-END PGP SIGNATURE-
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


How to debug a segfault.

2007-02-27 Thread David Brown
I'm developing a program with GHC-6.6.  I've been on amd64, and
haven't had problems, but now when I run the program on on x86 (after
cleaning and recompiling), I'm getting a segfault.

gdb isn't very helpful at all:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1212873040 (LWP 26946)]
0x080b45b8 in s2EI_info ()
(gdb) bt
#0  0x080b45b8 in s2EI_info ()
#1  0x081757a8 in ?? ()
#2  0x0004 in ?? ()
#3  0xb7875278 in ?? ()

I am using some various bindings to some C libraries, some I have
written and some written by others.  But, I'm not able to figure out
where to even begin looking for the problem.

Any advice on how I might be able to better debug this?  Would
compiling unregistered help (I'll have to figure out how to build
libraries for that)?

Thanks,
David Brown

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users