Open MPI with D

Jude Young 10equals2 at gmail.com
Fri Nov 25 07:25:52 PST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/25/2011 09:15 AM, Martin Nowak wrote:
> On Fri, 25 Nov 2011 15:55:15 +0100, Max Samukha
> <maxter at spambox.com> wrote:
> 
>> On 11/25/2011 02:27 PM, Andrei Alexandrescu wrote:
>>> On 11/25/11 2:13 AM, Jude Young wrote:
>>>> Is there an easy way to turn D style (string[] args) into C
>>>> style?
>>> 
>>> Hm, I expected this would work:
>>> 
>>> extern(C) int __argc; extern(C) char** __argv;
>>> 
>>> The symbols do exist at least on OSX (no linker error) but they
>>> are both zero, so apparently druntime doesn't initialize them.
>>> 
>>> 
>>> Andrei
>>> 
>> 
>> If you want a reference to an externally defined variable, you
>> need another "extern" and (if the variable is non-TLS) -
>> __gshared:
>> 
>> __gshared extern extern(C) int __argc;
> 
> It also took me terribly long to find out that one for getting
> environ. We could probably get rid of setErrno and getErrno which
> add extra C sources to druntime.
> 
>> 
>> 
>> 
>> 
>> 
> 
I'll have to check these out.  In the meantime, More successes! =D

running hello_d with 5 threads
Hello, world, I am 1 of 5
Hello, world, I am 2 of 5
Hello, world, I am 5 of 5
Hello, world, I am 3 of 5
Hello, world, I am 4 of 5

running ring_d with 5 threads
Process 0 sending 15 to 1, tag 201 (5 processes in ring)
Process 0 sent to 1
Process 0 decremented value: 14
Process 0 decremented value: 13
Process 0 decremented value: 12
Process 0 decremented value: 11
Process 0 decremented value: 10
Process 0 decremented value: 9
Process 0 decremented value: 8
Process 0 decremented value: 7
Process 0 decremented value: 6
Process 0 decremented value: 5
Process 0 decremented value: 4
Process 0 decremented value: 3
Process 0 decremented value: 2
Process 0 decremented value: 1
Process 0 decremented value: 0
Process 0 exiting
Process 1 exiting
Process 2 exiting
Process 3 exiting
Process 4 exiting

running connectivity_d with 25 threads
Connectivity test on 25 processes PASSED.

All of the basic examples included now work.
I just need to find more examples and other things so that I can make
sure that everything else is working properly.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOz7OAAAoJENcHIWLyQiSlhLcIAMkwOtJMe84H6/i63pNPwEoX
6BVGqZo9VlsFYPDuATAH1Wn9Gp2LanRwI3zm3XC+YDM2LUbb1VESA6PRzhHMEcN7
zEMApYiFhnEUNC1qauBz2TW83KfrzRLVFewOL9ot/LDHyUVKsr3BJ4H4CqrtLVv4
vrPQy6PdzgrXaTSlZwRj4P1WNwVnYud/0fwAT17Vzq85dglHFEfy0C1/bTeNO1Lu
XLkpO0JiK7y6l0ep9flp803N4qv5ROpD3EgtqhZ0vx49ShW6qwuT2X6NhXgqs3xG
P+UhJRgGh1z7i+LeRxdtjxfUMr4x6eqIID21rz+cXH5Po8z0YGpyskXV279zsd4=
=Ap9p
-----END PGP SIGNATURE-----


More information about the Digitalmars-d mailing list