starpu-runtime / starpu

This is a mirror of https://gitlab.inria.fr/starpu/starpu where our development happens, but contributions are welcome here too!
https://starpu.gitlabpages.inria.fr/
GNU Lesser General Public License v2.1
63 stars 12 forks source link

Unknown argument to ftn's -g option #47

Closed devreal closed 6 months ago

devreal commented 6 months ago

Steps to reproduce

Trying to build StarPU on Frontier with the clang compilers. Downloaded StarPU 1.4.5 and ran configure without any specific options.

Obtained behavior

I'm getting the following error from the Fortran compiler:

ftn-78 ftn: ERROR in command line
  The -g option has an invalid argument, "dwarf-2".
ftn-78 ftn: ERROR in command line
  The -g option has an invalid argument, "3".

These might be GCC-specific.

Expected behavior

Please describe the result that you expected instead.

Configuration

The configure line you used.

Configuration result

Please attach the config.log file from the build tree.

Distribution

Its type and version

Version of StarPU

The tarball version, or the git branch hash.

Version of GPU drivers

If you are using CUDA/OpenCL/HIP, the version being used.

nfurmento commented 6 months ago

Hello,

The configure script checks if the flag is supported by calling something like:

${CC} -o conftest -gdwarf-2 conftest.c

can you send us the file config.log to check what is exactly done ?

Cheers,

Nathalie

nfurmento commented 6 months ago

a quick fix is to set --disable-full-gdb-information when calling configure

devreal commented 6 months ago

The issue here is that the test is done on gcc and gfortran (GNU compilers) but the flag is passed to mpicc, which is a clang compiler on Frontier. Here is the config log: config.log

If I configure with CC=cc CXX=CC F90=ftn (the Cray compiler wrappers) linking fails for a different reason:

/bin/sh ../libtool  --tag=CC   --mode=link cc -gdwarf-2 -g3 -Wall -Werror=implicit -Werror=implicit-function-declaration -Wextra -Wunused -Wundef -Wshadow -Wpointer-arith -Wno-unused -O3 -g -O2   -o main/deadlock main/deadlock.o  -lrt -lrt  -lpthread ../src/libstarpu-1.4.la  -lpthread -lpthread -lhwloc   -L/opt/rocm-5.7.1/lib -lamdhip64  -lhipblas -lstdc++ 
libtool: link: cc -gdwarf-2 -g3 -Wall -Werror=implicit -Werror=implicit-function-declaration -Wextra -Wunused -Wundef -Wshadow -Wpointer-arith -Wno-unused -O3 -g -O2 -o main/.libs/deadlock main/deadlock.o  -lrt ../src/.libs/libstarpu-1.4.so -lpthread /usr/lib64/libhwloc.so -L/opt/rocm-5.7.1/lib -lamdhip64 -lhipblas /opt/cray/pe/gcc/10.3.0/snos/lib/../lib64/libstdc++.so -pthread -Wl,-rpath -Wl,/ccs/home/jschuchart/opt-frontier/starpu-1.4.5/lib -Wl,-rpath -Wl,/usr/lib64 -Wl,-rpath -Wl,/opt/cray/pe/gcc/10.3.0/snos/lib/../lib64
ld.lld: error: undefined reference due to --no-allow-shlib-undefined: rocblas_initialize
>>> referenced by ../src/.libs/libstarpu-1.4.so

Here is the config log for this run: config_cc.log

nfurmento commented 6 months ago

The latest release of StarPU 1.4.6 is just out. It should fix your bugs.