This is done to provide the functionality when the compiler doesn't
support inline asm. I do not know how testing is done with the atomics
in  opal/asm/base atomics so its possible some of them are incorrect.

-Nathan

On Fri, Apr 01, 2016 at 02:39:39PM +0530, Sreenidhi Bharathkar Ramesh wrote:
>    (Sorry, typo in previous email.  Please read that as)
>    I have another question: why is any given operation implemented twice for
>    the same architecture? 
>    Ref:  opal/asm/base/AMD64.asm and opal/include/opal/sys/amd64/atomic.h,
>     say function opal_atomic_cmpset_32()
>    Thanks!
>    On Fri, Apr 1, 2016 at 2:26 PM, Sreenidhi Bharathkar Ramesh
>    <sreenidhi-bharathkar.ram...@broadcom.com> wrote:
> 
>      Hi Paul,
>      Thanks for the response, I understand.
>      I have another question: why is any given operation implemented twice
>      for the same architecture? 
>      Ref:  opal/asm/base/ARM.asm and opal/include/opal/sys/amd64/atomic.h
>      Please let me know.
>      Thanks,
>      - Sreenidhi.
>      On Thu, Mar 31, 2016 at 2:28 AM, Paul Hargrove <phhargr...@lbl.gov>
>      wrote:
> 
>        Sreenihdi,
>        Maintenance of the "other" files is, at least, required for older
>        compilers (including several non-GNU ones) which have support for GCC
>        inline ASM constructs but do not include the __sync functions.
>        Additionally, the __sync functions always include a full memory fence
>        while there are places where Open MPI only needs Acquire or Release. 
>        In that sense the use of the GCC builtin atomics is not always an
>        "optimization".
>        -Paul
>        On Wed, Mar 30, 2016 at 4:19 AM, Sreenidhi Bharathkar Ramesh
>        <sreenidhi-bharathkar.ram...@broadcom.com> wrote:
> 
>          Hello,
>          I did few more experiments.  Built-in atomics are disabled by
>          default and can be enabled by "--enable-builtin-atomics".  With this
>          option, a different atomic file is include  (I mean, different from
>          the other three mentioned in the earlier email).
>          opal/include/opal/sys/sync_builtin/atomic.h
>           By enabling "--enable-builtin-atomics", the OpenMPI library will
>          not only get the latest optimizations from GCC __sync functions, but
>          also get all additional functions, such as <__sync_or_and_fetch>
>           <__sync_and_and_fetch> etc.  Also, this way, the arch/*.asm files
>          need not be maintained.
>          Seems there is more of an advantage to have
>          "--enable-builtin-atomics".  Am I missing something ?  Please let me
>          know your thoughts.
>          Thanks,
>          - Sreenidhi.
>          On Wed, Mar 30, 2016 at 10:33 AM, Sreenidhi Bharathkar Ramesh
>          <sreenidhi-bharathkar.ram...@broadcom.com> wrote:
> 
>            Hello,
>            With respect to atomic operations in assembly, I can see three
>            source files, for the same AMD64 architecture.
>            1. opal/asm/base/AMD64.asm
>            2. opal/include/opal/sys/amd64/atomic.h
>            3. opal/include/opal/sys/atomic_impl.h
>            What is the need for three files ?  How are they inter-related ?
>            Please let me know.
>            Thanks,
>            - Sreenidhi.
> 
>          _______________________________________________
>          devel mailing list
>          de...@open-mpi.org
>          Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/devel
>          Link to this post:
>          http://www.open-mpi.org/community/lists/devel/2016/03/18733.php
> 
>        --
>        Paul H. Hargrove                          phhargr...@lbl.gov
>        Computer Languages & Systems Software (CLaSS) Group
>        Computer Science Department               Tel: +1-510-495-2352
>        Lawrence Berkeley National Laboratory     Fax: +1-510-486-6900
>        _______________________________________________
>        devel mailing list
>        de...@open-mpi.org
>        Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/devel
>        Link to this post:
>        http://www.open-mpi.org/community/lists/devel/2016/03/18734.php

> _______________________________________________
> devel mailing list
> de...@open-mpi.org
> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/devel
> Link to this post: 
> http://www.open-mpi.org/community/lists/devel/2016/04/18737.php

Attachment: pgpBbz7xnn5Cm.pgp
Description: PGP signature

Reply via email to