Project

General

Profile

Bug #2002

forced dynamic linking on Cray breaks build on OLCF Eos

Added by Jim Phillips 9 months ago. Updated 9 months ago.

Status:
Rejected
Priority:
High
Assignee:
Category:
Machine Layers
Target version:
Start date:
10/19/2018
Due date:
% Done:

0%


Description

./build charm++ gni-crayxc persistent --no-build-shared --enable-tracing --enable-tracing-commthread -optimize
...
### whether linker works
#include <stdio.h>
int main() {
    printf("Hello, world!\n");
    return 0;
}
CC -I../include -I. -c test.cpp -o test.o
CC -dynamic -o testlink test.o -lrt -lpthread
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Send'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Comm_dup'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Alltoall'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Alltoallv'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Allreduce'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Comm_size'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Abort'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Recv'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Comm_free'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Sendrecv'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Comm_rank'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Bcast'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Comm_split'
/usr/bin/ld: link errors found, deleting executable `testlink'
/usr/bin/sha1sum: testlink: No such file or directory
jimp@eos-ext1:~/oct2018/charm-6.9.0-pre> module swap gcc gcc/6.3.0
jimp@eos-ext1:~/oct2018/charm-6.9.0-pre> cd ../..
jimp@eos-ext1:~> cat > test.cpp
#include <stdio.h>
int main() {
    printf("Hello, world!\n");
    return 0;
}
jimp@eos-ext1:~> CC -I../include -I. -c test.cpp -o test.o
jimp@eos-ext1:~> CC -dynamic -o testlink test.o -lrt -lpthread
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Bcast'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Send'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Alltoall'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Sendrecv'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Recv'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Abort'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Comm_size'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Allreduce'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Comm_dup'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Comm_rank'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Alltoallv'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Comm_free'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Comm_split'
/usr/bin/ld: link errors found, deleting executable `testlink'
/usr/bin/sha1sum: testlink: No such file or directory
jimp@eos-ext1:~> CC -o testlink test.o -lrt -lpthread

After investigation, this is related to the cray-fftw module:

jimp@eos-ext1:~/oct2018> module unload cray-fftw
jimp@eos-ext1:~/oct2018> CC -dynamic -o testlink test.o -lrt -lpthread
jimp@eos-ext1:~/oct2018> module load cray-fftw
jimp@eos-ext1:~/oct2018> CC -dynamic -o testlink test.o -lrt -lpthread
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Bcast'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Send'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Alltoall'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Sendrecv'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Recv'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Abort'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Comm_size'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Allreduce'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Comm_dup'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Comm_rank'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Alltoallv'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Comm_free'
/opt/cray/fftw/3.3.6.5/sandybridge/lib/libfftw3f_mpi.so: undefined reference to `MPI_Comm_split'
/usr/bin/ld: link errors found, deleting executable `testlink'
/usr/bin/sha1sum: testlink: No such file or directory

History

#1 Updated by Jim Phillips 9 months ago

Looks like using an older version of the module works around it:

jimp@eos-ext1:~/oct2018> module swap cray-fftw cray-fftw/3.3.6.2
jimp@eos-ext1:~/oct2018> CC -dynamic -o testlink test.o -lrt -lpthread

#2 Updated by Jim Phillips 9 months ago

Workaround is "export PE_FFTW_PKGCONFIG_LIBS=fftw3f:fftw3".

#3 Updated by Sam White 9 months ago

Should this be marked "rejected" then? It seems like a Cray fftw issue

#4 Updated by Jim Phillips 9 months ago

Sure.

#5 Updated by Evan Ramos 9 months ago

  • Assignee set to Evan Ramos
  • Status changed from New to Rejected

Please reopen this if the plot thickens.

Also available in: Atom PDF