Discussion:
[OMPI users] Build Failed - OpenMPI 1.10.6 / Ubuntu 16.04 / Oracle Studio 12.5
Travis W. Drayna
2017-04-08 13:00:45 UTC
Permalink
Hello,

I am attempting to build OpenMPI 1.10.6 (and also 2.0.x) on several
different Ubuntu 16.04 workstations using the Oracle Developer 12.5
compilers. I have verified that the suncc, sunCC, and sunf95 compilers
work by compiling non-MPI codes.

The configure command is shown here:

../configure --enable-shared CC=suncc CXX=sunCC FC=sunf95
CXXFLAGS=-L/usr/lib/x86_64-linux-gnu
--prefix=/home/SOFTWARE/openmpi/1.10.6/sun/12.5


The build fails while trying to compile 'timer_linux_component.c':

"../../../../../opal/include/opal/sys/amd64/atomic.h", line 136:
warning: parameter in inline asm statement unused: %3
"../../../../../opal/include/opal/sys/amd64/atomic.h", line 182:
warning: parameter in inline asm statement unused: %2
"../../../../../opal/include/opal/sys/amd64/atomic.h", line 203:
warning: parameter in inline asm statement unused: %2
"../../../../../opal/include/opal/sys/amd64/atomic.h", line 224:
warning: parameter in inline asm statement unused: %2
"../../../../../opal/include/opal/sys/amd64/atomic.h", line 245:
warning: parameter in inline asm statement unused: %2
"../../../../../opal/include/opal/sys/amd64/timer.h", line 61:
warning: initializer does not fit or is out of range: 0x80000007
"../../../../../opal/mca/timer/linux/timer_linux_component.c", line
166: warning: implicit function declaration: clock_getres
"../../../../../opal/mca/timer/linux/timer_linux_component.c", line
166: undefined symbol: CLOCK_MONOTONIC
"../../../../../opal/mca/timer/linux/timer_linux_component.c", line
188: warning: implicit function declaration: clock_gettime
"../../../../../opal/mca/timer/linux/timer_linux_component.c", line
188: undefined symbol: CLOCK_MONOTONIC
"../../../../../opal/mca/timer/linux/timer_linux_component.c", line
197: undefined symbol: CLOCK_MONOTONIC
cc: acomp failed for
../../../../../opal/mca/timer/linux/timer_linux_component.c
Makefile:1691: recipe for target 'timer_linux_component.lo' failed
make[2]: *** [timer_linux_component.lo] Error 1
make[2]: Leaving directory
'/home/teb-admin/INSTALL/openmpi-1.10.6/BUILD_SUN/opal/mca/timer/linux'
Makefile:2234: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
'/home/teb-admin/INSTALL/openmpi-1.10.6/BUILD_SUN/opal'
Makefile:1777: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1


The compiler seems unable to find 'librt.so' which can be found in the
following locations on the system:

/lib/i386-linux-gnu/librt.so.1
/lib/x86_64-linux-gnu/librt.so.1
/lib32/librt.so.1
/libx32/librt.so.1
/usr/lib/x86_64-linux-gnu/librt.so
/usr/lib32/librt.so
/usr/libx32/librt.so


I've tried various combinations of CFLAGS, LDFLAGS, and LIBS on the
configure command with no luck. Any help is greatly appreciated.
g***@rist.or.jp
2017-04-08 13:42:57 UTC
Permalink
Travis,

per the logs, the issue is the compiler does not find the definition of
CLOCK_MONOTONIC nor clock_gettime(),

and this looks like a missing include header file.

on my box, these are defined in <time.h>, but ubuntu could be different.

can you please confirm <time.h> should be used

(man clock_gettime should be enough for that)

<time.h> might not be (indirectly) pulled on ubuntu, so what if you
manually

#include <time.h>

at the beginning of opal/mca/timer/linux/timer_linux_component.c ?

Cheers,

Gilles

----- Original Message -----

Hello,

I am attempting to build OpenMPI 1.10.6 (and also 2.0.x) on several
different Ubuntu 16.04 workstations using the Oracle Developer 12.5
compilers. I have verified that the suncc, sunCC, and sunf95 compilers
work by compiling non-MPI codes.

The configure command is shown here:

../configure --enable-shared CC=suncc CXX=sunCC FC=sunf95
CXXFLAGS=-L/usr/lib/x86_64-linux-gnu --prefix=/home/SOFTWARE/openmpi/1.
10.6/sun/12.5


The build fails while trying to compile 'timer_linux_component.c':

"../../../../../opal/include/opal/sys/amd64/atomic.h", line 136:
warning: parameter in inline asm statement unused: %3
"../../../../../opal/include/opal/sys/amd64/atomic.h", line 182:
warning: parameter in inline asm statement unused: %2
"../../../../../opal/include/opal/sys/amd64/atomic.h", line 203:
warning: parameter in inline asm statement unused: %2
"../../../../../opal/include/opal/sys/amd64/atomic.h", line 224:
warning: parameter in inline asm statement unused: %2
"../../../../../opal/include/opal/sys/amd64/atomic.h", line 245:
warning: parameter in inline asm statement unused: %2
"../../../../../opal/include/opal/sys/amd64/timer.h", line 61:
warning: initializer does not fit or is out of range: 0x80000007
"../../../../../opal/mca/timer/linux/timer_linux_component.c",
line 166: warning: implicit function declaration: clock_getres
"../../../../../opal/mca/timer/linux/timer_linux_component.c",
line 166: undefined symbol: CLOCK_MONOTONIC
"../../../../../opal/mca/timer/linux/timer_linux_component.c",
line 188: warning: implicit function declaration: clock_gettime
"../../../../../opal/mca/timer/linux/timer_linux_component.c",
line 188: undefined symbol: CLOCK_MONOTONIC
"../../../../../opal/mca/timer/linux/timer_linux_component.c",
line 197: undefined symbol: CLOCK_MONOTONIC
cc: acomp failed for ../../../../../opal/mca/timer/linux/timer_
linux_component.c
Makefile:1691: recipe for target 'timer_linux_component.lo'
failed
make[2]: *** [timer_linux_component.lo] Error 1
make[2]: Leaving directory '/home/teb-admin/INSTALL/openmpi-1.10.
6/BUILD_SUN/opal/mca/timer/linux'
Makefile:2234: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/teb-admin/INSTALL/openmpi-1.10.
6/BUILD_SUN/opal'
Makefile:1777: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1


The compiler seems unable to find 'librt.so' which can be found in
the following locations on the system:

/lib/i386-linux-gnu/librt.so.1
/lib/x86_64-linux-gnu/librt.so.1
/lib32/librt.so.1
/libx32/librt.so.1
/usr/lib/x86_64-linux-gnu/librt.so
/usr/lib32/librt.so
/usr/libx32/librt.so


I've tried various combinations of CFLAGS, LDFLAGS, and LIBS on the
configure command with no luck. Any help is greatly appreciated.
Travis W. Drayna
2017-04-08 15:06:10 UTC
Permalink
Gilles,

Thank you for the quick response. Your suggestion fixed the first issue.
The 'man clock_gettime' command brings up the man pages on both systems.

I added '#include <time.h>' to the beginning of
opal/mca/timer/linux/timer_linux_component.c and the build now makes it
past the first error.


The new failure point is on both test systems is the following:

Making all in mca/osc/sm
make[2]: Entering directory
'/home/xxx-admin/INSTALL/openmpi-1.10.6/BUILD_SUN/ompi/mca/osc/sm'
CC osc_sm_comm.lo
CC osc_sm_component.lo
"../../../../../opal/include/opal/sys/amd64/atomic.h", line
136"../../../../../opal/include/opal/sys/amd64/atomic.h", : warning:
parameter in inline asm statement unused: %3
line 136: warning: parameter in inline asm statement unused: %3
"../../../../../opal/include/opal/sys/amd64/atomic.h",
"../../../../../opal/include/opal/sys/amd64/atomic.h", line 182:
warning: line 182: warning: parameter in inline asm statement unused: %2
parameter in inline asm statement unused: %2
"../../../../../opal/include/opal/sys/amd64/atomic.h", line 203:
warning: parameter in inline asm statement unused: %2
"../../../../../opal/include/opal/sys/amd64/atomic.h", line 203:
warning: parameter in inline asm statement unused: %2
"../../../../../opal/include/opal/sys/amd64/atomic.h", line 224:
warning: parameter in inline asm statement unused: %2
"../../../../../opal/include/opal/sys/amd64/atomic.h", line 224:
warning: parameter in inline asm statement unused: %2
"../../../../../opal/include/opal/sys/amd64/atomic.h", line 245:
warning: parameter in inline asm statement unused: %2
"../../../../../opal/include/opal/sys/amd64/atomic.h", line 245:
warning: parameter in inline asm statement unused: %2
"../../../../../ompi/mca/osc/sm/osc_sm_component.c", line 332:
undefined struct/union member: my_sense
"../../../../../ompi/mca/osc/sm/osc_sm_component.c", line 358:
undefined struct/union member: mtx
"../../../../../ompi/mca/osc/sm/osc_sm_component.c", line 358:
warning: argument #1 is incompatible with prototype:
prototype: pointer to union {struct __pthread_mutex_s {..}
__data, array[40] of char __size, long __align} :
"/usr/include/pthread.h", line 749
argument : pointer to int
"../../../../../ompi/mca/osc/sm/osc_sm_component.c", line 364:
improper member use: cond
"../../../../../ompi/mca/osc/sm/osc_sm_component.c", line 364:
warning: argument #1 is incompatible with prototype:
prototype: pointer to union {struct {..} __data, array[48] of
char __size, long long __align} : "/usr/include/pthread.h", line 968
argument : pointer to struct opal_condition_t {struct
opal_object_t {..} super, volatile int c_waiting, volatile int
c_signaled}
"../../../../../ompi/mca/osc/sm/osc_sm_component.c", line 370:
undefined struct/union member: sense
"../../../../../ompi/mca/osc/sm/osc_sm_component.c", line 370:
improper member use: my_sense
"../../../../../ompi/mca/osc/sm/osc_sm_component.c", line 371:
improper member use: count
cc: acomp failed for ../../../../../ompi/mca/osc/sm/osc_sm_component.c
Makefile:1754: recipe for target 'osc_sm_component.lo' failed
make[2]: *** [osc_sm_component.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory
'/home/xxx-admin/INSTALL/openmpi-1.10.6/BUILD_SUN/ompi/mca/osc/sm'
Makefile:3261: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
'/home/xxx-admin/INSTALL/openmpi-1.10.6/BUILD_SUN/ompi'
Makefile:1777: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1


Thanks again,
Travis
Gilles Gouaillardet
2017-04-09 01:31:17 UTC
Permalink
So it seems
OPAL_HAVE_POSIX_THREADS
is not defined, and that should never happen !

Can you please compress and post (or upload into gist or similar) your
- config.log
- opal/include/opal_config.h

Cheers,

Gilles
Post by Travis W. Drayna
Gilles,
Thank you for the quick response. Your suggestion fixed the first issue.
The 'man clock_gettime' command brings up the man pages on both systems.
I added '#include <time.h>' to the beginning of opal/mca/timer/linux/timer_linux_component.c
and the build now makes it past the first error.
Making all in mca/osc/sm
make[2]: Entering directory '/home/xxx-admin/INSTALL/
openmpi-1.10.6/BUILD_SUN/ompi/mca/osc/sm'
CC osc_sm_comm.lo
CC osc_sm_component.lo
"../../../../../opal/include/opal/sys/amd64/atomic.h", line
parameter in inline asm statement unused: %3
line 136: warning: parameter in inline asm statement unused: %3
"../../../../../opal/include/opal/sys/amd64/atomic.h",
line 182: warning: parameter in inline asm statement unused: %2
parameter in inline asm statement unused: %2
parameter in inline asm statement unused: %2
parameter in inline asm statement unused: %2
parameter in inline asm statement unused: %2
parameter in inline asm statement unused: %2
parameter in inline asm statement unused: %2
parameter in inline asm statement unused: %2
"../../../../../ompi/mca/osc/sm/osc_sm_component.c", line 332: undefined
struct/union member: my_sense
"../../../../../ompi/mca/osc/sm/osc_sm_component.c", line 358: undefined
struct/union member: mtx
prototype: pointer to union {struct __pthread_mutex_s {..} __data,
array[40] of char __size, long __align} : "/usr/include/pthread.h", line 749
argument : pointer to int
"../../../../../ompi/mca/osc/sm/osc_sm_component.c", line 364: improper
member use: cond
prototype: pointer to union {struct {..} __data, array[48] of char
__size, long long __align} : "/usr/include/pthread.h", line 968
argument : pointer to struct opal_condition_t {struct opal_object_t
{..} super, volatile int c_waiting, volatile int c_signaled}
"../../../../../ompi/mca/osc/sm/osc_sm_component.c", line 370: undefined
struct/union member: sense
"../../../../../ompi/mca/osc/sm/osc_sm_component.c", line 370: improper
member use: my_sense
"../../../../../ompi/mca/osc/sm/osc_sm_component.c", line 371: improper
member use: count
cc: acomp failed for ../../../../../ompi/mca/osc/sm/osc_sm_component.c
Makefile:1754: recipe for target 'osc_sm_component.lo' failed
make[2]: *** [osc_sm_component.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/home/xxx-admin/INSTALL/
openmpi-1.10.6/BUILD_SUN/ompi/mca/osc/sm'
Makefile:3261: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/xxx-admin/INSTALL/
openmpi-1.10.6/BUILD_SUN/ompi'
Makefile:1777: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
Thanks again,
Travis
Travis
2017-04-09 12:54:11 UTC
Permalink
Gilles,

I've attached the config.log and opal_config.h files. When I built
successfully with GCC 5.4.0 I verified that OPAL_HAVE_POSIX_THREADS = 1.
But this does not appear to be the case when the Oracle 12.5 compiler
suite is used.

Thanks again,
Travis
Post by Gilles Gouaillardet
So it seems
OPAL_HAVE_POSIX_THREADS
is not defined, and that should never happen !
Can you please compress and post (or upload into gist or similar) your
- config.log
- opal/include/opal_config.h
Cheers,
Gilles
Travis
2017-04-11 18:53:03 UTC
Permalink
Gilles,

Thanks again for your help. Here are the basic steps for getting OpenMPI
to build successfully using Oracle Studio 12.5 on Ubuntu 16.04.

Edit the file ‘opal/mca/timer/linux/timer_linux_component.c’ and add
‘'#include <time.h>' to
the beginning of the declarations. This fixes an ‘undefined symbol:
CLOCK_MONOTONIC’
error.
cd solstudio/12.5/lib/compilers/amd64
mv ld ld_orig
ln –s /usr/bin/ld
Run configure and build the compiler. The CXX flag avoids a C and C++
compatibility error.
mkdir BUILD_SUN
cd BUILD_SUN
../configure --enable-shared CC=suncc CXX=sunCC FC=sunf95
CXXFLAGS=-L/usr/lib/x86_64-linux-gnu
--prefix=/h/group/SOFTWARE/openmpi/1.10.6/sun/12.5
make -j 6
make install
Loading...