我收到以下消息,同时尝试编译CUDA程序:在/ usr /斌/劳工处:找不到-lcudart
在/ usr /斌/劳工处:找不到-lcudart
以前从未得到过这种错误。我的PATH有问题吗?
这里的编译命令:
gfortran -g -O2 -I ../共享/ -o ../../bin/xspecfem3D -ffree线长度无../ ../obj/spec/program_specfem3D.o ../../obj/spec/specfem3D_par.o ../../obj/spec/PML_init.o ../../obj/spec/compute_boundary_kernel。 o ../../obj/spec/compute_kernels.o ../../obj/spec/compute_forces_acoustic.o ../../obj/spec/compute_forces_acoustic_pot.o ../../ obj/spec/compute_forces_acoustic_PML.o ../../obj/spec/compute_forces_elastic.o 个../../obj/spec/compute_forces_elastic_Dev.o ../../obj/spec/compute_forces_elastic_noDev.o ../../obj/spec/compute_forces_elastic_Dev_openmp.o ../../obj /spec/compute_add_sources_acoustic.o ../../obj/spec/compute_add_sources_elastic.o ../../obj/spec/compute_coupling_acoustic_el.o ../../obj/spec/compute_coupling_elastic_ac.o 。 ./../obj/spec/compute_stacey_acoustic.o ../../obj/spec/compute_stacey_elastic.o ../../obj/spec/compute_gradient.o ../../obj/spec /compute_interpolated_dva.o ../../obj/spec/initialize_simulation.o ../../obj/spec/read_mesh_databases.o ../../obj/spec/setup_GLL_poin ts.o ../../obj/spec/write_movie_output.o ../../obj/spec/create_color_image.o ../../obj/spec/write_seismograms.o ../ .. /obj/spec/write_output_ASCII.o ../../obj/spec/detect_mesh_surfaces.o ../../obj/spec/setup_movie_meshes.o ../../obj/spec/read_topography_bathymetry.o ../../obj/spec/setup_sources_receivers.o ../../obj/spec/prepare_timerun.o ../../obj/spec/iterate_time.o ../../obj/ spec/finalize_simulation.o ../../obj/spec/save_adjoint_kernels.o ../../obj/spec/specfem3D.o ../../obj/spec/assemble_MPI_vector.o ../。 ./obj/spec/make_gravity.o ../../obj/spec/noise_tomography.o ../../lib/libspecfem.a ../../obj/spec/check_fields_cuda.cuda.o ../../obj/spec/compute_add_sources_acoustic_cuda.cuda.o ../../obj/spec/compute_add_sources_elastic_cuda.cuda.o 。 ./../obj/spec/compute_coupling_cuda.cuda.o ../../obj/spec/compute_forces_acoustic_cuda.cuda.o ../../obj/spec/compute_forces_elastic_cuda.cuda.o ../ ../obj/spec/compute_kernels_cuda.cuda.o ../../obj/spec/compute_stacey_acoustic_cuda.cuda.o ../../obj/spec/compute_stacey_elastic_cuda.cuda.o ../ .. /obj/spec/it_update_displacement_cuda.cuda.o ../../obj/spec/noise_tomography_cuda.cuda.o ../../obj/spec/prepare_mesh_constants_cuda.cuda.o ../../obj /规格/反fer_fields_cuda.cuda.o ../../obj/spec/write_seismograms_cuda.cuda.o ../../obj/spec/save_and_compare_cpu_vs_gpu.cudacc.o ../../obj/spec/serial。Ø-lcuda -lcudart -lcublas
在/ usr /斌/劳工处:找不到-lcudart
collect2:LD返回1退出状态
编辑:
我已经改变了联动命令
gfortran -g -O2 -ffree线长度无-I ../共享/ -L $ CUDA_HOME/lib中[其余如下]
而我所有的PATH似乎都没问题,但我仍然有同样的错误。
EDIT2:
的错误是,我试图编译代码是64位的,所以我需要给路径diferent集的.so的,分别位于上
/usr/local/cuda/lib64
现在编译运行良好,没有任何问题。
你能发布你正在使用的编译命令或makefile ? – talonmies 2012-03-09 12:20:55
当然,但它确实有点大...... – Imperian 2012-03-09 12:28:42
您是否安装了CUDA'toolkit'? – 2012-03-10 08:18:17