Mishima-san, the root cause is macro expansion does not always occur as one would have expected ...
could you please give a try to the attached patch ? it compiles (at least with gcc) and i made zero tests so far .... Cheers, Gilles On 2014/09/01 10:44, tmish...@jcity.maeda.co.jp wrote: > Hi folks, > > I tried to build openmpi-1.8.2 with PGI fortran and -i8(64bit fortran int) > option > as shown below: > > ./configure \ > --prefix=/home/mishima/opt/mpi/openmpi-1.8.2-pgi14.7_int64 \ > --enable-abi-breaking-fortran-status-i8-fix \ > --with-tm \ > --with-verbs \ > --disable-ipv6 \ > CC=pgcc CFLAGS="-tp k8-64e -fast" \ > CXX=pgCC CXXFLAGS="-tp k8-64e -fast" \ > F77=pgfortran FFLAGS="-i8 -tp k8-64e -fast" \ > FC=pgfortran FCFLAGS="-i8 -tp k8-64e -fast" > > Then I saw this compile error in making oshmem at the last stage: > > if test ! -r pshmem_real8_swap_f.c ; then \ > pname=`echo pshmem_real8_swap_f.c | cut -b '2-'` ; \ > ln -s ../../../../oshmem/shmem/fortran/$pname > pshmem_real8_swap_f.c ; \ > fi > CC pshmem_real8_swap_f.lo > if test ! -r pshmem_int4_cswap_f.c ; then \ > pname=`echo pshmem_int4_cswap_f.c | cut -b '2-'` ; \ > ln -s ../../../../oshmem/shmem/fortran/$pname > pshmem_int4_cswap_f.c ; \ > fi > CC pshmem_int4_cswap_f.lo > PGC-S-0058-Illegal lvalue (pshmem_int4_cswap_f.c: 39) > PGC/x86-64 Linux 14.7-0: compilation completed with severe errors > make[3]: *** [pshmem_int4_cswap_f.lo] Error 1 > make[3]: Leaving directory > `/home/mishima/mis/openmpi/openmpi-pgi14.7/int64/openmpi-1.8.2/oshmem/shmem/fortran/profile' > make[2]: *** [all-recursive] Error 1 > make[2]: Leaving directory > `/home/mishima/mis/openmpi/openmpi-pgi14.7/int64/openmpi-1.8.2/oshmem/shmem/fortran' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory > `/home/mishima/mis/openmpi/openmpi-pgi14.7/int64/openmpi-1.8.2/oshmem' > make: *** [all-recursive] Error 1 > > I confirmed that it worked if I added configure option of --disable-oshmem. > So, I hope that oshmem experts would fix this problem. > > (additional note) > I switched to use gnu compiler and checked with this configuration, then > I got the same error: > > ./configure \ > --prefix=/home/mishima/opt/mpi/openmpi-1.8.2-gnu_int64 \ > --enable-abi-breaking-fortran-status-i8-fix \ > --disable-ipv6 \ > F77=gfortran \ > FC=gfortran \ > CC=gcc \ > CXX=g++ \ > FFLAGS="-m64 -fdefault-integer-8" \ > FCFLAGS="-m64 -fdefault-integer-8" \ > CFLAGS=-m64 \ > CXXFLAGS=-m64 > > make > .... > if test ! -r pshmem_int4_cswap_f.c ; then \ > pname=`echo pshmem_int4_cswap_f.c | cut -b '2-'` ; \ > ln -s ../../../../oshmem/shmem/fortran/$pname > pshmem_int4_cswap_f.c ; \ > fi > CC pshmem_int4_cswap_f.lo > pshmem_int4_cswap_f.c: In function 'shmem_int4_cswap_f': > pshmem_int4_cswap_f.c:39: error: invalid lvalue in unary '&' > make[3]: *** [pshmem_int4_cswap_f.lo] Error 1 > > Regards > Tetsuya Mishima > > _______________________________________________ > 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/2014/08/15764.php
Index: oshmem/shmem/fortran/shmem_int4_cswap_f.c =================================================================== --- oshmem/shmem/fortran/shmem_int4_cswap_f.c (revision 32657) +++ oshmem/shmem/fortran/shmem_int4_cswap_f.c (working copy) @@ -2,6 +2,8 @@ * Copyright (c) 2013 Mellanox Technologies, Inc. * All rights reserved. * Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2014 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -38,7 +40,7 @@ MCA_ATOMIC_CALL(cswap(FPTR_2_VOID_PTR(target), (void *)&out_value, - (const void*)(&OMPI_FINT_2_INT(*cond)), + (const void*)(OMPI_PFINT_2_PINT(cond)), FPTR_2_VOID_PTR(value), sizeof(out_value), OMPI_FINT_2_INT(*pe))); Index: oshmem/shmem/fortran/shmem_int8_cswap_f.c =================================================================== --- oshmem/shmem/fortran/shmem_int8_cswap_f.c (revision 32657) +++ oshmem/shmem/fortran/shmem_int8_cswap_f.c (working copy) @@ -2,6 +2,8 @@ * Copyright (c) 2013 Mellanox Technologies, Inc. * All rights reserved. * Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2014 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -38,7 +40,7 @@ MCA_ATOMIC_CALL(cswap(FPTR_2_VOID_PTR(target), (void *)&out_value, - (const void*)(&OMPI_FINT_2_INT(*cond)), + (const void*)(OMPI_PFINT_2_PINT(cond)), FPTR_2_VOID_PTR(value), sizeof(out_value), OMPI_FINT_2_INT(*pe))); Index: ompi/mpi/fortran/base/fint_2_int.h =================================================================== --- ompi/mpi/fortran/base/fint_2_int.h (revision 32657) +++ ompi/mpi/fortran/base/fint_2_int.h (working copy) @@ -11,6 +11,8 @@ * All rights reserved. * Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -37,6 +39,7 @@ #define OMPI_SINGLE_NAME_CONVERT(a) a #define OMPI_INT_2_FINT(a) a #define OMPI_FINT_2_INT(a) a + #define OMPI_PFINT_2_PINT(a) a #define OMPI_ARRAY_FINT_2_INT_ALLOC(in, n) #define OMPI_ARRAY_FINT_2_INT(in, n) #define OMPI_2_DIM_ARRAY_FINT_2_INT(in, n, dim2) @@ -53,6 +56,7 @@ #define OMPI_SINGLE_NAME_CONVERT(a) &c_##a #define OMPI_INT_2_FINT(a) a #define OMPI_FINT_2_INT(a) (int) (a) + #define OMPI_PFINT_2_PINT(a) (int *) (a) /* This is for OUT parameters. Does only alloc */ #define OMPI_ARRAY_FINT_2_INT_ALLOC(in, n) \ @@ -109,6 +113,7 @@ #define OMPI_SINGLE_NAME_CONVERT(a) &c_##a #define OMPI_INT_2_FINT(a) (MPI_Fint)(a) #define OMPI_FINT_2_INT(a) (a) + #define OMPI_PFINT_2_PINT(a) a /* This is for OUT parameters. Does only alloc */ #define OMPI_ARRAY_FINT_2_INT_ALLOC(in, n) \