You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chipStar's nvcc seems to be re-ordering the compilation flags/options, leading to compilation error as the library that a file depends on is placed on its left, while it should be put on the right for linking to be successful. Here is the specific error:
nvcc -std=c++14 -Xcompiler -Wall -arch=sm_60 -Ddfloat=float -Ddlong=int -O3 main.o meshBasis.o BlasLapack/libBlasLapack.a -o main BlasLapack/libBlasLapack.a -lgfortran
warning: cucc is a work-in-progress. It is incomplete and may behave incorrectly.
Please, report issues at https://github.com/CHIP-SPV/chipStar/issues.
warning: Ignored option '-arch'
/usr/bin/ld: meshBasis.o: in function `matrixEig(int, float*, float*, float*, float*)':
meshBasis.cpp:(.text+0x800): undefined reference to `dgeev_'
/usr/bin/ld: meshBasis.o: in function `matrixRightSolve(int, int, float*, int, int, float*, float*)':
meshBasis.cpp:(.text+0x3b5c): undefined reference to `dgesv_'
/usr/bin/ld: meshBasis.o: in function `matrixInverse(int, float*)':
meshBasis.cpp:(.text+0x3d04): undefined reference to `dgetrf_'
/usr/bin/ld: meshBasis.cpp:(.text+0x3d21): undefined reference to `dgetri_'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
failed to execute:/home/tsaini.chen/install/llvm/17.0/bin/clang++ -include /home/tsaini.chen/install/chipStar/chipStar_06272024/include/hip/spirv_fixups.h -I//home/tsaini.chen/install/chipStar/chipStar_06272024/include -isystem /home/tsaini.chen/install/chipStar/chipStar_06272024/include/cuspv -include /home/tsaini.chen/install/chipStar/chipStar_06272024/include/cuspv/cuda_runtime.h -D__NVCC__ -D__CHIP_CUDA_COMPATIBILITY__ -std=c++14 -Wall -Ddfloat=float -Ddlong=int -O3 BlasLapack/libBlasLapack.a BlasLapack/libBlasLapack.a -lgfortran main.o meshBasis.o -o main -L/home/tsaini.chen/install/chipStar/chipStar_06272024/lib -lCHIP -no-hip-rt -Wl,-rpath,/home/tsaini.chen/install/chipStar/chipStar_06272024/lib
make: *** [Makefile:47: main] Error 1
The command nvcc -std=c++14 -Xcompiler -Wall -arch=sm_60 -Ddfloat=float -Ddlong=int -O3 main.o meshBasis.o BlasLapack/libBlasLapack.a -o main BlasLapack/libBlasLapack.a -lgfortran was run with BlasLapack/libBlasLapack.a library on the right of meshBasis.o object file, but in the actual underlying command (the one following "failed to execute:"), the library is placed before the object file, leading to undefined reference errors. The linking was successful when we manually put the library after/on the right of the object file.
The text was updated successfully, but these errors were encountered:
chipStar's nvcc seems to be re-ordering the compilation flags/options, leading to compilation error as the library that a file depends on is placed on its left, while it should be put on the right for linking to be successful. Here is the specific error:
The command
nvcc -std=c++14 -Xcompiler -Wall -arch=sm_60 -Ddfloat=float -Ddlong=int -O3 main.o meshBasis.o BlasLapack/libBlasLapack.a -o main BlasLapack/libBlasLapack.a -lgfortran
was run withBlasLapack/libBlasLapack.a
library on the right ofmeshBasis.o
object file, but in the actual underlying command (the one following "failed to execute:"), the library is placed before the object file, leading to undefined reference errors. The linking was successful when we manually put the library after/on the right of the object file.The text was updated successfully, but these errors were encountered: