Comments (18)
What's the output of
nvcc -v -o test test.cu
from k2.
Thanks @csukuangfj for the reply. the output is as below:
#$ _CUDART_=cudart
#$ _HERE_=/usr/local/cuda-10.0/bin
#$ _THERE_=/usr/local/cuda-10.0/bin
#$ _TARGET_SIZE_=
#$ _TARGET_DIR_=
#$ _TARGET_DIR_=targets/x86_64-linux
#$ TOP=/usr/local/cuda-10.0/bin/..
#$ NVVMIR_LIBRARY_DIR=/usr/local/cuda-10.0/bin/../nvvm/libdevice
#$ LD_LIBRARY_PATH=/usr/local/cuda-10.0/bin/../lib::/usr/local/cuda-10.0/lib64:/usr/local/TensorRT/lib:/usr/local/mkl/lib/intel64:/usr/local/mkl/mkl/lib/intel64
#$ PATH=/usr/local/cuda-10.0/bin/../nvvm/bin:/usr/local/cuda-10.0/bin:/home/storage23/qiuhaowen/anaconda3/envs/py-kaldi/bin:/home/storage23/qiuhaowen/anaconda3/condabin:/home/work/soft/ffmpeg-4.0/bin:/home/work/soft/python-3.6.4/bin:/opt/sge/bin:/opt/sge/bin/lx-amd64:/usr/bin:/bin:/usr/local/bin:/usr/lib64/qt-3.3/bin:/opt/ibutils/bin:/opt/sge/bin/lx-amd64:/usr/local/cuda-10.0/bin:/home/storage23/qiuhaowen/.local/bin:/home/storage23/qiuhaowen/bin:/home/storage23/qiuhaowen/bin/cppcheck:/home/storage23/qiuhaowen/bin/ctags/bin
#$ INCLUDES="-I/usr/local/cuda-10.0/bin/../targets/x86_64-linux/include"
#$ LIBRARIES= "-L/usr/local/cuda-10.0/bin/../targets/x86_64-linux/lib/stubs" "-L/usr/local/cuda-10.0/bin/../targets/x86_64-linux/lib"
#$ CUDAFE_FLAGS=
#$ PTXAS_FLAGS=
#$ "/home/storage23/qiuhaowen/anaconda3/envs/py-kaldi/bin"/x86_64-conda_cos6-linux-gnu-c++ -std=c++14 -D__CUDA_ARCH__=300 -E -x c++ -DCUDA_DOUBLE_MATH_FUNCTIONS -D__CUDACC__ -D__NVCC__ "-I/usr/local/cuda-10.0/bin/../targets/x86_64-linux/include" -D__CUDACC_VER_MAJOR__=10 -D__CUDACC_VER_MINOR__=0 -D__CUDACC_VER_BUILD__=130 -include "cuda_runtime.h" -m64 "matrix_transpose.cu" > "/tmp/tmpxft_0004b9a2_00000000-8_matrix_transpose.cpp1.ii"
#$ cicc --c++14 --gnu_version=70300 --allow_managed -arch compute_30 -m64 -ftz=0 -prec_div=1 -prec_sqrt=1 -fmad=1 --include_file_name "tmpxft_0004b9a2_00000000-2_matrix_transpose.fatbin.c" -tused -nvvmir-library "/usr/local/cuda-10.0/bin/../nvvm/libdevice/libdevice.10.bc" --gen_module_id_file --module_id_file_name "/tmp/tmpxft_0004b9a2_00000000-3_matrix_transpose.module_id" --orig_src_file_name "matrix_transpose.cu" --gen_c_file_name "/tmp/tmpxft_0004b9a2_00000000-5_matrix_transpose.cudafe1.c" --stub_file_name "/tmp/tmpxft_0004b9a2_00000000-5_matrix_transpose.cudafe1.stub.c" --gen_device_file_name "/tmp/tmpxft_0004b9a2_00000000-5_matrix_transpose.cudafe1.gpu" "/tmp/tmpxft_0004b9a2_00000000-8_matrix_transpose.cpp1.ii" -o "/tmp/tmpxft_0004b9a2_00000000-5_matrix_transpose.ptx"
#$ ptxas -arch=sm_30 -m64 "/tmp/tmpxft_0004b9a2_00000000-5_matrix_transpose.ptx" -o "/tmp/tmpxft_0004b9a2_00000000-9_matrix_transpose.sm_30.cubin"
#$ fatbinary --create="/tmp/tmpxft_0004b9a2_00000000-2_matrix_transpose.fatbin" -64 "--image=profile=sm_30,file=/tmp/tmpxft_0004b9a2_00000000-9_matrix_transpose.sm_30.cubin" "--image=profile=compute_30,file=/tmp/tmpxft_0004b9a2_00000000-5_matrix_transpose.ptx" --embedded-fatbin="/tmp/tmpxft_0004b9a2_00000000-2_matrix_transpose.fatbin.c" --cuda
#$ rm /tmp/tmpxft_0004b9a2_00000000-2_matrix_transpose.fatbin
#$ "/home/storage23/qiuhaowen/anaconda3/envs/py-kaldi/bin"/x86_64-conda_cos6-linux-gnu-c++ -std=c++14 -E -x c++ -D__CUDACC__ -D__NVCC__ "-I/usr/local/cuda-10.0/bin/../targets/x86_64-linux/include" -D__CUDACC_VER_MAJOR__=10 -D__CUDACC_VER_MINOR__=0 -D__CUDACC_VER_BUILD__=130 -include "cuda_runtime.h" -m64 "matrix_transpose.cu" > "/tmp/tmpxft_0004b9a2_00000000-4_matrix_transpose.cpp4.ii"
#$ cudafe++ --c++14 --gnu_version=70300 --allow_managed --m64 --parse_templates --gen_c_file_name "/tmp/tmpxft_0004b9a2_00000000-5_matrix_transpose.cudafe1.cpp" --stub_file_name "tmpxft_0004b9a2_00000000-5_matrix_transpose.cudafe1.stub.c" --module_id_file_name "/tmp/tmpxft_0004b9a2_00000000-3_matrix_transpose.module_id" "/tmp/tmpxft_0004b9a2_00000000-4_matrix_transpose.cpp4.ii"
#$ "/home/storage23/qiuhaowen/anaconda3/envs/py-kaldi/bin"/x86_64-conda_cos6-linux-gnu-c++ -std=c++14 -D__CUDA_ARCH__=300 -c -x c++ -DCUDA_DOUBLE_MATH_FUNCTIONS "-I/usr/local/cuda-10.0/bin/../targets/x86_64-linux/include" -m64 -o "/tmp/tmpxft_0004b9a2_00000000-10_matrix_transpose.o" "/tmp/tmpxft_0004b9a2_00000000-5_matrix_transpose.cudafe1.cpp"
#$ nvlink --arch=sm_30 --register-link-binaries="/tmp/tmpxft_0004b9a2_00000000-6_matrix_transpose_dlink.reg.c" -m64 "-L/usr/local/cuda-10.0/bin/../targets/x86_64-linux/lib/stubs" "-L/usr/local/cuda-10.0/bin/../targets/x86_64-linux/lib" -cpu-arch=X86_64 "/tmp/tmpxft_0004b9a2_00000000-10_matrix_transpose.o" -o "/tmp/tmpxft_0004b9a2_00000000-11_matrix_transpose_dlink.sm_30.cubin"
#$ fatbinary --create="/tmp/tmpxft_0004b9a2_00000000-7_matrix_transpose_dlink.fatbin" -64 -link "--image=profile=sm_30,file=/tmp/tmpxft_0004b9a2_00000000-11_matrix_transpose_dlink.sm_30.cubin" --embedded-fatbin="/tmp/tmpxft_0004b9a2_00000000-7_matrix_transpose_dlink.fatbin.c"
#$ rm /tmp/tmpxft_0004b9a2_00000000-7_matrix_transpose_dlink.fatbin
#$ "/home/storage23/qiuhaowen/anaconda3/envs/py-kaldi/bin"/x86_64-conda_cos6-linux-gnu-c++ -std=c++14 -c -x c++ -DFATBINFILE="\"/tmp/tmpxft_0004b9a2_00000000-7_matrix_transpose_dlink.fatbin.c\"" -DREGISTERLINKBINARYFILE="\"/tmp/tmpxft_0004b9a2_00000000-6_matrix_transpose_dlink.reg.c\"" -I. -D__NV_EXTRA_INITIALIZATION= -D__NV_EXTRA_FINALIZATION= -D__CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__ "-I/usr/local/cuda-10.0/bin/../targets/x86_64-linux/include" -D__CUDACC_VER_MAJOR__=10 -D__CUDACC_VER_MINOR__=0 -D__CUDACC_VER_BUILD__=130 -m64 -o "/tmp/tmpxft_0004b9a2_00000000-12_matrix_transpose_dlink.o" "/usr/local/cuda-10.0/bin/crt/link.stub"
#$ "/home/storage23/qiuhaowen/anaconda3/envs/py-kaldi/bin"/x86_64-conda_cos6-linux-gnu-c++ -m64 -o "matrix_transpose" -std=c++14 -Wl,--start-group "/tmp/tmpxft_0004b9a2_00000000-12_matrix_transpose_dlink.o" "/tmp/tmpxft_0004b9a2_00000000-10_matrix_transpose.o" "-L/usr/local/cuda-10.0/bin/../targets/x86_64-linux/lib/stubs" "-L/usr/local/cuda-10.0/bin/../targets/x86_64-linux/lib" -lcudadevrt -lcudart_static -lrt -lpthread -ldl -Wl,--end-group
/home/storage23/qiuhaowen/anaconda3/envs/py-kaldi/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot find -lcudadevrt
/home/storage23/qiuhaowen/anaconda3/envs/py-kaldi/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot find -lcudart_static
collect2: error: ld returned 1 exit status
from k2.
#$ "/home/storage23/qiuhaowen/anaconda3/envs/py-kaldi/bin"/x86_64-conda_cos6-linux-gnu-c++ -m64 -o "matrix_transpose" -std=c++14 -Wl,--start-group "/tmp/tmpxft_0004b9a2_00000000-12_matrix_transpose_dlink.o" "/tmp/tmpxft_0004b9a2_00000000-10_matrix_transpose.o" "-L/usr/local/cuda-10.0/bin/../targets/x86_64-linux/lib/stubs" "-L/usr/local/cuda-10.0/bin/../targets/x86_64-linux/lib" -lcudadevrt -lcudart_static -lrt -lpthread -ldl -Wl,--end-group
#$ "/home/storage23/qiuhaowen/anaconda3/envs/py-kaldi/bin"/x86_64-conda_cos6-linux-gnu-c++ \
-m64 -o "matrix_transpose" -std=c++14 \
-Wl,--start-group \
"/tmp/tmpxft_0004b9a2_00000000-12_matrix_transpose_dlink.o" \
"/tmp/tmpxft_0004b9a2_00000000-10_matrix_transpose.o" \
"-L/usr/local/cuda-10.0/bin/../targets/x86_64-linux/lib/stubs" \
"-L/usr/local/cuda-10.0/bin/../targets/x86_64-linux/lib" \
-lcudadevrt \
-lcudart_static \
-lrt -lpthread -ldl \
-Wl,--end-group
/usr/local/cuda-10.0/lib64
is not passed as library search path.
from k2.
Yes, I noticed that, but how can I add the path as the default search path for ld? As I have added it in LD_LIBRARY_PATH
but it does not work. Updating file in ld.so.conf.d
? How can I do this without root permission?
from k2.
How about
export LIBRARY_PATH=/usr/local/cuda-10.0/lib64:${LIBRARY_PATH}
from k2.
I have tried this before, but it does not work.
from k2.
Let me try other solutions, anyway, many thanks to @csukuangfj !
from k2.
ld.so.conf.d
is for the loader, not the linker.
According to https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html#Environment-Variables
LIBRARY_PATH
The value of LIBRARY_PATH is a colon-separated list of directories, much like PATH. When configured as a native compiler, GCC tries the directories thus specified when searching for special linker files, if it cannot find them using GCC_EXEC_PREFIX. Linking using GCC also uses these directories when searching for ordinary libraries for the -l option (but directories specified with -L come first).
I haven't used conda before. Not sure if there are special settings for conda to get it work.
from k2.
Yeah, I also guess it's related with conda as the default version 4.8.5
works well. Anyway, thanks!
from k2.
from k2.
I tried both of them, i.e. LD_LIBRARY_PATH
and LIBRARY_PATH
.
from k2.
How about run K2 inside docker? @qindazhu
from k2.
yeah, let's another approach, but I have not tried this on the cluster. thank you!
from k2.
from k2.
yeah, actually the only reason for now I want to update the gcc version is that I cannot repro this issue https://github.com/danpovey/k2/issues/96 with gcc 4.8.5. The code can be compiled successfully on the cluster and I'm afraid that there are other similar issues in the future.
docker is an orthogonal issue to setting up a build system. If you have to use docker as a crutch, it just means the build system isn't general enough, IMO.
…
On Fri, Aug 28, 2020 at 7:14 PM Haowen Qiu @.***> wrote: yeah, let's another approach, but I have not tried this on the cluster. thank you! — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#100 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZFLOYXNSXOQNCQQBHMVH3SC6GTHANCNFSM4QN3PZAA .
from k2.
But I really don't want to take much time on this....
from k2.
@qindazhu
Not sure whether you have found a solution for this problem.
I am reading "CUDA COMPILER DRIVER NVCC reference guide" https://wrf.ecse.rpi.edu/wiki/ParallelComputingSpring2015/cuda/nvidia/doc/pdf/CUDA_Compiler_Driver_NVCC.pdf
and find a solution in section 2.10
nvcc expects a configuration file nvcc.profile in the directory where the nvcc
executable itself resides. This profile contains a sequence of assignments to environment
variables which are necessary for correct execution of executables that nvcc invokes.
Typical is extending the variables PATH, LD_LIBRARY_PATH with the bin and lib
directories in the CUDA Toolkit installation.
If you encounter this similar problem in the future, nvcc.profile
will be helpful for you.
from k2.
Many many thanks! I have not tried other solutions after that day, will try this when I have time (when not so busy with coding as the issue is not so urgent). Actually I tried to put my conda cudatookit related paths as the most left entries in PATH/(LD_)LIBRARY_PATH
, but it still got the same error. Anyway, will try this when I have time, thanks a lot again!
from k2.
Related Issues (20)
- Question about k2.union() function. HOT 4
- Installation on Windows with GPU HOT 2
- FST is going down abruptly. HOT 7
- Can not copy k2.RaggedTensor from CPU to GPU by RaggedTensor.to(device_id) HOT 1
- K2 installation is not working (not up to date for the new cuda and pytorch versions) HOT 4
- A warning is always printed when there is an extreme reduction in the encoder output frame rate. HOT 2
- ModuleNotFoundError: No module named '_k2' HOT 2
- Nbest online decoding bug HOT 15
- argmax_internal::PairInputIterator and argmax_internal::PairOutputIterator don't implement the random access iterator concept HOT 6
- ModuleNotFoundError: No module named '_k2' HOT 5
- error: conflicting declaration ‘typedef struct CUevent_st* HOT 7
- nbest C++ api use too much vram HOT 5
- Torchscript export error for torch.finfo function HOT 2
- fail k2.compose(H, LG, inner_labels="tokens") HOT 13
- aux labels id range limit?
- Error during run time in 1st epoch using conformer_ctc2 OTC HOT 1
- I want to install k2 offline , but the log shows that "network is unreachable" HOT 1
- Have problem when installing from source HOT 1
- No module named 'k2.torch_version' HOT 6
- Use k2 to represent regex in decoding
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from k2.