November 26, 2011 Re: Open MPI with D | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On 11/25/2011 09:34 PM, Andrei Alexandrescu wrote:
> Oh, I see. Thanks for enlightening me. So apparently I defined those
> variables...
>
> Andrei
>
Could you or Walter add some information about extern vs extern(C) to the docs?
| |||
November 26, 2011 Re: Open MPI with D | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Max Samukha | On Saturday, November 26, 2011 5:40:27 AM, Max Samukha wrote:
> On 11/25/2011 09:34 PM, Andrei Alexandrescu wrote:
>
>> Oh, I see. Thanks for enlightening me. So apparently I defined those variables...
>>
>> Andrei
>>
>
> Could you or Walter add some information about extern vs extern(C) to the docs?
I'm sure they can, but the best way to make it happen is to a) make sure there's a bugzilla report documenting the problem, and b) checking out the docs and making a pull request with the desired changes.
| |||
November 27, 2011 Re: Open MPI with D | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Brad Roberts | On 11/26/2011 10:01 PM, Brad Roberts wrote:
> On Saturday, November 26, 2011 5:40:27 AM, Max Samukha wrote:
>> On 11/25/2011 09:34 PM, Andrei Alexandrescu wrote:
>>
>>> Oh, I see. Thanks for enlightening me. So apparently I defined those
>>> variables...
>>>
>>> Andrei
>>>
>>
>> Could you or Walter add some information about extern vs extern(C) to the docs?
>
> I'm sure they can, but the best way to make it happen is to a) make
> sure there's a bugzilla report documenting the problem, and b) checking
> out the docs and making a pull request with the desired changes.
Why? It would take half a minute to fix the docs.
| |||
June 11, 2012 Re: Open MPI with D | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Jude Young | On Friday, 25 November 2011 at 15:27:03 UTC, Jude Young wrote:
> On 11/25/2011 09:15 AM, Martin Nowak wrote:
>> On Fri, 25 Nov 2011 15:55:15 +0100, Max Samukha
>> <maxter@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.
Hi All,
Jude Young,
Could you please share source code of your examples for me?
I'm interested to learn more about parallel programming on D via MPI.
And your sources can help me.
Thank you.
| |||
June 14, 2012 Re: Open MPI with D | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Pavel Politsyn | Oops, missed this post... All of the source is on my github. https://github.com/1100110/OpenMPI It's not really complete, but it's good enough to play with. There are a few gotchas regarding types, but just stick to C types and youre golden. On Mon, 11 Jun 2012 10:04:56 -0500, Pavel Politsyn <mrdarksys@gmail.com> wrote: > On Friday, 25 November 2011 at 15:27:03 UTC, Jude Young wrote: >> On 11/25/2011 09:15 AM, Martin Nowak wrote: >>> On Fri, 25 Nov 2011 15:55:15 +0100, Max Samukha >>> <maxter@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. > > Hi All, > > Jude Young, > Could you please share source code of your examples for me? > I'm interested to learn more about parallel programming on D via MPI. > And your sources can help me. > > Thank you. -- Using Opera's revolutionary email client: http://www.opera.com/mail/ | |||
June 14, 2012 Re: Open MPI with D | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Pavel Politsyn | On Mon, 11 Jun 2012 10:04:56 -0500, Pavel Politsyn <mrdarksys@gmail.com> wrote: > On Friday, 25 November 2011 at 15:27:03 UTC, Jude Young wrote: >> On 11/25/2011 09:15 AM, Martin Nowak wrote: >>> On Fri, 25 Nov 2011 15:55:15 +0100, Max Samukha >>> <maxter@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. > > Hi All, > > Jude Young, > Could you please share source code of your examples for me? > I'm interested to learn more about parallel programming on D via MPI. > And your sources can help me. > > Thank you. Also it seems that I heard it through the grapevine that ?Dejan Lekic? had a version of OpenMPI for D. His might be more complete, but i've never been able to get in touch with him to see his version. -- Using Opera's revolutionary email client: http://www.opera.com/mail/ | |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply