Paul,

please disregard this PR for now, i will make a new one shortly ...


Cheers,


Gilles


On 5/25/2016 4:25 PM, Paul Hargrove wrote:
Thanks Gilles.

I will retest and follow up in the PR.

-Paul

On Tue, May 24, 2016 at 11:56 PM, Gilles Gouaillardet <gil...@rist.or.jp <mailto:gil...@rist.or.jp>> wrote:

    Paul,


    this works fine on RHEL7 but not on RHEL6

    here is the relevant configure output

    < checking for library containing clock_gettime... -lrt
    ---
    > checking for library containing clock_gettime... none required


    the reason is clock_gettime was moved from librt into libc between
    RHEL6 and RHEL7


    i made a proof of concept at
    https://github.com/open-mpi/ompi-release/pull/1191 i am still testing

    (it also fixes a typo in pthread_join invokation)


    Cheers,


    Gilles



    On 5/25/2016 2:15 PM, Paul Hargrove wrote:
    The following error did *not* occur on the same system with the
    previous RC.

    I have configured 1.10.3rc3 on a normal x86-64/Linux system with:
       --prefix=[...] --enable-debug --enable-static --disable-shared

    When I try to use the resulting build to compile the examples:

    $ make -k
    mpicc -g    hello_c.c   -o hello_c
    mpicc -g    ring_c.c   -o ring_c
    mpicc -g    connectivity_c.c   -o connectivity_c
    make[1]: Entering directory
    `/scratch/phargrov/OMPI/openmpi-1.10.3rc3-linux-x86_64-static/BLD/examples'
    make[2]: Entering directory
    `/scratch/phargrov/OMPI/openmpi-1.10.3rc3-linux-x86_64-static/BLD/examples'
    mpic++ -g    hello_cxx.cc   -o hello_cxx
    mpic++ -g    ring_cxx.cc   -o ring_cxx
    make[2]: Leaving directory
    `/scratch/phargrov/OMPI/openmpi-1.10.3rc3-linux-x86_64-static/BLD/examples'
    make[2]: Entering directory
    `/scratch/phargrov/OMPI/openmpi-1.10.3rc3-linux-x86_64-static/BLD/examples'
    mpifort -g hello_mpifh.f -o hello_mpifh
    
/scratch/phargrov/OMPI/openmpi-1.10.3rc3-linux-x86_64-static/INST/lib/libmpi.a(ompi_mpi_init.o):
    In function `ompi_warn_fork':
    ompi_mpi_init.c:(.text+0x282): undefined reference to
    `pthread_atfork'
    
/scratch/phargrov/OMPI/openmpi-1.10.3rc3-linux-x86_64-static/INST/lib/libopen-pal.a(lt1-malloc.o):
    In function `ptmalloc_init':
    malloc.c:(.text+0x5f3): undefined reference to `pthread_atfork'
    collect2: error: ld returned 1 exit status
    make[2]: *** [hello_mpifh] Error 1
    mpifort -g ring_mpifh.f -o ring_mpifh
    
/scratch/phargrov/OMPI/openmpi-1.10.3rc3-linux-x86_64-static/INST/lib/libmpi.a(ompi_mpi_init.o):
    In function `ompi_warn_fork':
    ompi_mpi_init.c:(.text+0x282): undefined reference to
    `pthread_atfork'
    
/scratch/phargrov/OMPI/openmpi-1.10.3rc3-linux-x86_64-static/INST/lib/libopen-pal.a(lt1-malloc.o):
    In function `ptmalloc_init':
    malloc.c:(.text+0x5f3): undefined reference to `pthread_atfork'
    collect2: error: ld returned 1 exit status
    make[2]: *** [ring_mpifh] Error 1
    make[2]: Leaving directory
    `/scratch/phargrov/OMPI/openmpi-1.10.3rc3-linux-x86_64-static/BLD/examples'
    make[1]: *** [mpi] Error 2
    make[1]: Leaving directory
    `/scratch/phargrov/OMPI/openmpi-1.10.3rc3-linux-x86_64-static/BLD/examples'
    make: *** [all] Error 2

    Comparing the configure output from RC2 and RC3 is informative:

         checking if word-sized integers must be word-size aligned... no
         checking if C compiler and POSIX threads work as is... no
         checking if C++ compiler and POSIX threads work as is... no
        -checking if Fortran compiler and POSIX threads work as is... no
        +checking if Fortran compiler and POSIX threads work as is... yes
         checking if C compiler and POSIX threads work with
        -Kthread... no
         checking if C compiler and POSIX threads work with
        -kthread... no
         checking if C compiler and POSIX threads work with
        -pthread... yes
         checking if C++ compiler and POSIX threads work with
        -Kthread... no
         checking if C++ compiler and POSIX threads work with
        -kthread... no
         checking if C++ compiler and POSIX threads work with
        -pthread... yes
        -checking if Fortran compiler and POSIX threads work with
        -Kthread... no
        -checking if Fortran compiler and POSIX threads work with
        -kthread... no
        -checking if Fortran compiler and POSIX threads work with
        -pthread... yes
         checking for pthread_mutexattr_setpshared... yes
         checking for pthread_condattr_setpshared... yes
         checking for PTHREAD_MUTEX_ERRORCHECK_NP... yes


    So, while RC2's configure determined that Fortran+pthreads needed
    -pthread, it appears that RC3 has instead determined that
    Fortran+pthreads "work as is".

    Here is the related portion of config.log from RC2:

        configure:63400: checking if Fortran compiler and POSIX
        threads work as is
        configure:63481: gcc -std=gnu99 -g -finline-functions
        -fno-strict-aliasing -I. -c conftest.c
        conftest.c: In function 'pthreadtest_f':
        conftest.c:27:5: warning: passing argument 1 of
        'pthread_join' makes integer from pointer without a cast
         pthread_join(&newthread, 0);
         ^
        In file included from conftest.c:3:0:
        /usr/include/pthread.h:242:12: note: expected 'pthread_t' but
        argument is of type 'pthread_t *'
         extern int pthread_join (pthread_t __th, void
        **__thread_return);
              ^
        configure:63488: $? = 0
        configure:63498: gfortran -g conftestf.f conftest.o -o
        conftest  -lm -lutil
        conftest.o: In function `pthreadtest_f':
        conftest.c:(.text+0xa8): undefined reference to
        `__pthread_register_cancel'
        conftest.c:(.text+0xc3): undefined reference to `pthread_create'
        conftest.c:(.text+0xd5): undefined reference to `pthread_join'
        conftest.c:(.text+0xe4): undefined reference to
        `__pthread_unregister_cancel'
        collect2: error: ld returned 1 exit status
        configure:63505: $? = 1


    And here it is for RC3:

        configure:63623: checking if Fortran compiler and POSIX
        threads work as is
        configure:63704: gcc -std=gnu99 -g -finline-functions
        -fno-strict-aliasing -I. -c conftest.c
        conftest.c: In function 'pthreadtest_f':
        conftest.c:27:5: warning: passing argument 1 of
        'pthread_join' makes integer from pointer without a cast
         pthread_join(&newthread, 0);
         ^
        In file included from conftest.c:3:0:
        /usr/include/pthread.h:242:12: note: expected 'pthread_t' but
        argument is of type 'pthread_t *'
         extern int pthread_join (pthread_t __th, void
        **__thread_return);
              ^
        configure:63711: $? = 0
        configure:63721: gfortran -g conftestf.f conftest.o -o
        conftest  -lrt -lm -lutil
        configure:63728: $? = 0
        configure:63802: result: yes


    It appears that the only important difference here is that "-lrt"
    has now appeared on the gfortran link line (which I assume pulls
    in libpthread).
    This "-lrt" appears to be the result of the new probe for
    clock_gettime().

    I am not sure exactly what breaks down after that.

    -Paul

-- Paul H. Hargrove phhargr...@lbl.gov <mailto:phhargr...@lbl.gov>
    Computer Languages & Systems Software (CLaSS) Group
    Computer Science Department       Tel: +1-510-495-2352
    <tel:%2B1-510-495-2352>
    Lawrence Berkeley National Laboratory     Fax: +1-510-486-6900
    <tel:%2B1-510-486-6900>


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


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




--
Paul H. Hargrove phhargr...@lbl.gov <mailto: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: https://www.open-mpi.org/mailman/listinfo.cgi/devel
Link to this post: 
http://www.open-mpi.org/community/lists/devel/2016/05/19029.php

Reply via email to