Skip to content

Add option to disable building/running tests with assembly code dependencies #244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
opoplawski opened this issue Nov 8, 2016 · 7 comments
Assignees

Comments

@opoplawski
Copy link

Attempting to create a Fedora package for OpenCoarrays but I'm getting:

/usr/bin/gfortran   -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -I/usr/lib64/gfortran/modules/mpich -DNDEBUG CMakeFiles/hello_multiverse.dir/hello_multiverse.F90.o  -o hello_multiverse  ../../../mpi/libcaf_mpi.a 
../../../mpi/libcaf_mpi.a(mpi_caf.c.o): In function `error_stop':
/builddir/build/BUILD/OpenCoarrays-1.7.4/src/mpi/mpi_caf.c:3776: undefined reference to `MPI_Abort'

Full build log:
build.txt

It seems that the binary isn't being linked to the mpi library.

@zbeekman
Copy link
Collaborator

zbeekman commented Nov 8, 2016

How are you building it? Invoking CMake directly? If so you need to set CC=mpicc and FC=mpif90. Also which MPI are you building against?

@opoplawski
Copy link
Author

Ah, I see the error now - I wasn't actually passing in CC=mpicc and FC=mpif90 although I thought I was.

Now I get:

/usr/lib64/mpich/bin/mpif90   -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fs
tack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -I/usr/lib64/gfortran/modules/mpich
 -DNDEBUG CMakeFiles/coarray_navier_stokes.dir/coarray-shear_coll.F90.o  -o coarray_navier_stokes  ../../../../../../src/tests/integration/pde_solvers/navier-stokes/libfft_
sse.a ../../../../mpi/libcaf_mpi.a
make[2]: Leaving directory '/builddir/build/BUILD/OpenCoarrays-1.7.4/build-mpich'
/usr/bin/ld: ../../../../../../src/tests/integration/pde_solvers/navier-stokes/libfft_sse.a(trig.o): relocation R_X86_64_32 against `.rodata' can not be used when making a
shared object; recompile with -fPIC
/usr/bin/ld: ../../../../../../src/tests/integration/pde_solvers/navier-stokes/libfft_sse.a(plan.o): relocation R_X86_64_32 against `.rodata.str1.4' can not be used when ma
king a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status

@opoplawski
Copy link
Author

Ah, I see libfft_sse.a/_avx.a are pre-built. That won't work for us.

@zbeekman
Copy link
Collaborator

zbeekman commented Nov 8, 2016

Those files are both only used for the Navier Stokes test, and not actually needed for the correct functioning of OpenCoarrays. (It's actually an FFT library written in assembly...)

Is there some system introspection that we can do to determine that this won't work for your system or should I just add a CMake flag to exclude them from the build? (They already get excluded on non Linux and non x86_64 systems)

@opoplawski
Copy link
Author

If we can just exclude them from the build (perhaps if the files aren't present? I could deleted them), that would be fine. Thanks.

@zbeekman
Copy link
Collaborator

zbeekman commented Nov 8, 2016

Probably easier to just add a CMake cache Boolean variable to turn thus off.

@zbeekman zbeekman self-assigned this Nov 8, 2016
@zbeekman zbeekman changed the title Build error - OpenCoarrays-1.7.4/src/mpi/mpi_caf.c:3776: undefined reference to `MPI_Abort' Add option to disable building/running tests with assembly code dependencies Nov 9, 2016
zbeekman added a commit that referenced this issue Nov 10, 2016
 Add option to disable tests using FFT library written in assembly.

 Fixes #244
@ghost ghost added needs-review and removed in-progress labels Nov 10, 2016
@zbeekman
Copy link
Collaborator

zbeekman commented Nov 10, 2016

Once #247 is merged, just add -DSKIP_ASSEMBLY_DEPS to the CMake invocation. Before merging I need to test this on linux to confirm there aren't any typos, since this is disabled on TRAVIS-CI and on OS X. If you want to do this sooner, you could just set the enironment variable TRAVIS to have the same intended effect. (i.e., export TRAVIS=1; cmake .. ...)

@ghost ghost removed the needs-review label Nov 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants