Accéder au contenu.
Menu Sympa

starpu-devel - Re: [Starpu-devel] debugging?

Objet : Developers list for StarPU

Archives de la liste

Re: [Starpu-devel] debugging?


Chronologique Discussions 
  • From: Miguel Palhas <mpalhas@gmail.com>
  • To: Samuel Thibault <samuel.thibault@ens-lyon.org>, Miguel Palhas <mpalhas@gmail.com>, starpu-devel@lists.gforge.inria.fr
  • Subject: Re: [Starpu-devel] debugging?
  • Date: Thu, 20 Jun 2013 15:41:58 +0100
  • List-archive: <http://lists.gforge.inria.fr/pipermail/starpu-devel>
  • List-id: "Developers list. For discussion of new features, code changes, etc." <starpu-devel.lists.gforge.inria.fr>

Ok it turns out the problem is not about debugging. What i had done was add a condition to the makefile, where if debug mode was enabled, i would use the debug flags instead of optimization ones -O3. What triggered the error was the removal of -O3

if i compile withouth both of them, the error still happens. This seems to be something that is optimized out by the compiler when using -O3, but when not using it results in redefinition of those symbols

Anyway, i had to assume this was somehow starpu related, since i never had any problems like this with normal cuda applications.

ppm-starpu is the name of my application (from Progressive Photon Mapping). i'll try to work on this, but meanwhile, in case anyone else is interested in trying to figure this out, here's a sample of the compilation commands generated by the makefile:

for .cpp files:
nvcc        -m64 -I/usr/local/include/starpu/1.0 -I/usr/local/cuda/include -I/usr/local/include -I/usr/include/libxml2    -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=sm_21 -gencode arch=compute_30,code=sm_30 -Xcompiler "-m64 -I/usr/local/include/starpu/1.0 -I/usr/local/cuda/include -I/usr/local/include -I/usr/include/libxml2   -Wall -Wno-unused-result  -fopenmp" -c  -Iinclude -Iinclude/luxrays -I/usr/local/include -I/usr/include/GL -I/usr/local/cuda-5.0/include -I/include -I/home/naps62/projects/beast/include -I/share/edu-mei/freeimage/3.15.4/include -I/home/naps62/projects/msc-thesis/src/starpu_wrapper/include/ src/utils/config.cpp -o build/utils/config.o


for .cu files:
nvcc        -m64 -I/usr/local/include/starpu/1.0 -I/usr/local/cuda/include -I/usr/local/include -I/usr/include/libxml2    -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=sm_21 -gencode arch=compute_30,code=sm_30 -Xcompiler "-m64 -I/usr/local/include/starpu/1.0 -I/usr/local/cuda/include -I/usr/local/include -I/usr/include/libxml2   -Wall -Wno-unused-result  -fopenmp" -c  -Iinclude -Iinclude/luxrays -I/usr/local/include -I/usr/include/GL -I/usr/local/cuda-5.0/include -I/include -I/home/naps62/projects/beast/include -I/share/edu-mei/freeimage/3.15.4/include -I/home/naps62/projects/msc-thesis/src/starpu_wrapper/include/ src/ppm/kernels/cpu/intersect_ray_hit_buffer.cpp -o build/ppm/kernels/cpu/intersect_ray_hit_buffer.o


and linking:
nvcc -link  -m64 -L/usr/local/lib -L/usr/local/cuda/lib64 -lstarpu-1.0 -lcudart -lcublas -lcuda -lstdc++ -lhwloc    -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=sm_21 -gencode arch=compute_30,code=sm_30 -Xcompiler "-fopenmp" -L/usr/lib -L/usr/local/lib -L/opt/local/lib -L/usr/local/cuda-5.0/lib -L/lib -L/home/naps62/projects/beast/lib -L/share/edu-mei/freeimage/3.15.4/lib/linux -L/share/edu-mei/freeimage/3.15.4/lib -L/usr/local/cuda-5.0/lib64 -L/usr/local/cuda-5.0/lib -lglut -lGLU -lGL -lboost_program_options -lboost_system -lboost_thread-mt -lboost_chrono -lfreeimage -lbeast build/main.o build/utils/action_list.o build/utils/config.o build/utils/dumps.o build/luxrays/accelerators/qbvhaccel.o build/luxrays/utils/properties.o build/luxrays/utils/sdl/extmeshcache.o build/luxrays/utils/sdl/light.o build/luxrays/utils/sdl/scene.o build/luxrays/utils/sdl/sdl.o build/luxrays/utils/sdl/spd.o build/luxrays/utils/sdl/texmap.o build/luxrays/utils/plymesh/rply.o build/luxrays/utils/core/exttrianglemesh.o build/luxrays/core/dataset.o build/luxrays/core/trianglemesh.o build/luxrays/core/geometry/bbox.o build/luxrays/core/geometry/matrix4x4.o build/luxrays/core/geometry/ray.o build/luxrays/core/geometry/transform.o build/ppm/display.o build/ppm/engine.o build/ppm/film.o build/ppm/ptrfreescene.o build/ppm/kernels/advance_eye_paths.o build/ppm/kernels/codelets.o build/ppm/kernels/generate_eye_paths.o build/ppm/kernels/intersect_ray_hit_buffer.o build/ppm/kernels/cpu/advance_eye_paths.o build/ppm/kernels/cpu/generate_eye_paths.o build/ppm/kernels/cpu/intersect_ray_hit_buffer.o  build/ppm/math.o build/ppm/kernels/helpers.o -o bin/ppm-starpu




On Thu, Jun 20, 2013 at 12:42 PM, Samuel Thibault <samuel.thibault@ens-lyon.org> wrote:
Hello,

Miguel Palhas, le Wed 19 Jun 2013 18:21:07 +0200, a écrit :
> i'm trying to debua my application, adding -g to both nvcc and Xcompiler
> options
>
> compilation fails when linking,

When linking your application I guess?

> aparently due to starpu, or bad usage of starpu on my part:

I don't really see what is coming from starpu actually:

> In file included from /usr/local/cuda/bin/crt/link.stub:79:0:
> /tmp/tmpxft_00004ed5_00000000-1_ppm-starpu_dlink.reg.c:2:1: error: redefinition
> of ‘const unsigned char def_module_id_str__NV_MODULE_ID []’

ppm-starpu is something from your application I guess? We do not have
such name in starpu.

> /tmp/tmpxft_00004ed5_00000000-1_ppm-starpu_dlink.reg.c:1:1: error: ‘const
> unsigned char def_module_id_str__NV_MODULE_ID [19]’ previously defined here
> /tmp/tmpxft_00004ed5_00000000-1_ppm-starpu_dlink.reg.c: In function ‘void
> __cudaRegisterLinkedBinary__NV_MODULE_ID(void (*)(void**), void*, void*)’:
> /tmp/tmpxft_00004ed5_00000000-1_ppm-starpu_dlink.reg.c:2:1: error: redefinition
> of ‘void __cudaRegisterLinkedBinary__NV_MODULE_ID(void (*)(void**), void*,
> void*)’
> /tmp/tmpxft_00004ed5_00000000-1_ppm-starpu_dlink.reg.c:1:1: error: ‘void
> __cudaRegisterLinkedBinary__NV_MODULE_ID(void (*)(void**), void*, void*)’
> previously defined here

This all looks like cuda issues, actually. How do you pass -g to nvcc
and Xcompiler, exactly?

Samuel



--
Cumprimentos
Miguel Palhas



Archives gérées par MHonArc 2.6.19+.

Haut de le page