Accéder au contenu.
Menu Sympa

starpu-devel - Re: [Starpu-devel] StarPU

Objet : Developers list for StarPU

Archives de la liste

Re: [Starpu-devel] StarPU


Chronologique Discussions 
  • From: Thilo Kogge <thilo@kogge.net>
  • To: Samuel Thibault <samuel.thibault@ens-lyon.org>, "starpu-devel@lists.gforge.inria.fr" <starpu-devel@lists.gforge.inria.fr>
  • Subject: Re: [Starpu-devel] StarPU
  • Date: Thu, 26 Jun 2014 12:42:32 +0200
  • 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>

Hello,

okay seems like my gcc does like an other parameter order.
Both echo calls contains -lstarpu-1.1

So, the output is now:

user@host:~/starpu/test$ gcc hello_world.c -o hello_world `pkg-config --cflags libstarpu`  `pkg-config --libs libstarpu`
In file included from /home/user/starpu-install/include/starpu/1.1/starpu.h:137:0,
                 from hello_world.c:1:
/home/user/starpu-install/include/starpu/1.1/starpu_deprecated_api.h:27:2: warning: #warning Your application is using deprecated types. You may want to update to use the latest API, by using tools/dev/rename.sh. [-Wcpp]
hello_world.c: In function ‘main’:
hello_world.c:19:12: warning: ignoring return value of ‘starpu_init’, declared with attribute warn_unused_result [-Wunused-result]
hello_world.c:26:19: warning: ignoring return value of ‘starpu_task_submit’, declared with attribute warn_unused_result [-Wunused-result]
user@host:~/starpu/test$ ls
hello_world  hello_world.c
user@host:~/starpu/test$ ./hello_world
./hello_world: error while loading shared libraries: libstarpu-1.1.so.7: cannot open shared object file: No such file or directory


Thanks,

Thilo


Am 26.06.2014 11:49, schrieb Samuel Thibault:
Hello,

Thilo Kogge, le Wed 25 Jun 2014 18:43:29 +0200, a écrit :
I was not able to install the gcc extension on my machine
This is not a problem here, the example program you took doesn't use any
language extension.

    gcc `pkg-config --cflags libstarpu`  `pkg-config --libs libstarpu`
hello_world.c -o hello_world
[...]

hello_world.c:(.text+0x31): undefined reference to `starpu_init'
[...]

user@machine:~/starpu/test$ pkg-config --libs libstarpu
-L/home/user/starpu-install/lib -L/usr/local/cuda/lib64 -L/home/user/
hwloc-install/lib -lstarpu-1.1 -lcudart -lcublas -lcuda -lstdc++ -lOpenCL
-lhwloc
Well, I don't see how it could ever happen that starpu_init is missing
while -lstarpu-1.1 is passed, as libstarpu always contains the
starpu_init function.  Could you make sure that nothing odd is happening
by calling both

gcc `pkg-config --cflags libstarpu`  `pkg-config --libs libstarpu` hello_world.c -o hello_world
echo `pkg-config --cflags libstarpu`  `pkg-config --libs libstarpu` hello_world.c -o hello_world

in the same shell, and check that the echo output contains -lstarpu-1.1

Also, perhaps for some reason your linking toolchain prefers -l flags to
be appended after C files using their symbols, i.e. rather this:

gcc hello_world.c -o hello_world `pkg-config --cflags libstarpu`  `pkg-config --libs libstarpu` 
echo `pkg-config --cflags libstarpu`  `pkg-config --libs libstarpu` hello_world.c -o hello_world

It looks like if the examples are made for plugin-support.
No, only examples inside the gcc-plugin directory are made for plugin
support.

Samuel




Archives gérées par MHonArc 2.6.19+.

Haut de le page