Accéder au contenu.
Menu Sympa

starpu-devel - Re: [Starpu-devel] [MACOSX] problem with examples

Objet : Developers list for StarPU

Archives de la liste

Re: [Starpu-devel] [MACOSX] problem with examples


Chronologique Discussions 
  • From: Nathalie Furmento <nathalie.furmento@labri.fr>
  • To: tog <guillaume.alleon@gmail.com>
  • Cc: starpu-devel@lists.gforge.inria.fr
  • Subject: Re: [Starpu-devel] [MACOSX] problem with examples
  • Date: Thu, 07 Apr 2011 10:35:36 +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>

Hi,

I looked at your Makefile, autotools on your machine clearly has a different behaviour when handling object files. I am not sure if the problem comes from the way we wrote mpi/Makefile.am or from autotools. In the meantime, could you please try the attached patch (after reverting the previous ones).

Thanks,

Nathalie


On 06/04/2011 16:50, tog wrote:
Here is the file.
Best Regards
Guillaume

On Wed, Apr 6, 2011 at 6:31 PM, Nathalie Furmento
<nathalie.furmento@labri.fr> wrote:
I think i just overlooked the fact it is looking for ring_kernel.o instead
of tests/ring_kernel.o

Could you please send me your build/mpi/Makefile file ?

Regards,

Nathalie

On 06/04/2011 14:53, tog wrote:
I know from make -C examples that we will have 64 bits related issues.

I did apply your patch and have the following behavior:

obelix:starpu alleon$ VERBOSE=1 make -C mpi tests/ring_kernel.o
/usr/local/cuda/bin/nvcc tests/ring_kernel.cu -c -o
tests/ring_kernel.o --compiler-options -fno-strict-aliasing
-I/usr/local/cuda/include -I../include/ -I../include -I../include/
-I../include/

which is fine but ...

obelix:starpu alleon$ VERBOSE=1 make
Making all in src
make[2]: Nothing to be done for `all-am'.
Making all in mpi
make all-am
make[2]: *** No rule to make target `ring_kernel.o', needed by
`tests/ring'. Stop.
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1
obelix:starpu alleon$


If your machine is running Snow Leopard the pressing the 6& 4 keys at
boot time will load the 64 bits kernel extensions.

Best Regards
Guillaume


On Wed, Apr 6, 2011 at 6:03 PM, Nathalie Furmento
<nathalie.furmento@labri.fr> wrote:

Could you please try to recompile with the attached patch. If it is still
failing, could you then try from your build directory to start:

% make -C mpi V=1 tests/ring_kernel.o

And then run make again.

If all of that fails, please send me the file build/mpi/Makefile

Concerning OpenCL, configure looks for it in different locations
("/usr/local/cuda" "/c/cuda" "/cygdrive/c/cuda" "/opt/cuda"). If your
installation is in another directory, you can specify
--with-opencl-dir=<directory> when calling configure.

I do not think your problem is related to 64 bits. I do not have right
now a
64 bits MacOS machine to start. I should be able to get one shortly.

Regards,

Nathalie

On 06/04/2011 14:06, tog wrote:

Hi,

Few things that might be different on my machine. It is running 64
bits i.e. in the menu About This Mac -> More info ... ->
Software, I
have
64-bit Kernel and Extensions: Yes

obelix:starpu alleon$ uname -a
Darwin oggy.lan 10.7.0 Darwin Kernel Version 10.7.0: Sat Jan 29
15:16:10 PST 2011; root:xnu-1504.9.37~1/RELEASE_X86_64 x86_64


Then the answers to your questions:

obelix:starpu alleon$ ls -lrt mpi/tests/ring_kernel.cu
-rw-r--r-- 1 alleon staff 1125 Mar 29 14:14 mpi/tests/ring_kernel.cu


The output is attached.

Do you know how to enable OpenCL on the Mac ?

Best Regards
Guillaume

On Wed, Apr 6, 2011 at 5:09 PM, Nathalie Furmento
<nathalie.furmento@labri.fr> wrote:


Hi,

I tested on a MacOS with mpi and cuda, it is all working for me.

Could you please check the file mpi/tests/ring_kernel.cu is available.
And
could you also please send the output of "make V=1".

Thanks,

Nathalie

On 05/04/2011 13:51, tog wrote:


Hi,

Yes similar problems are there.
For examples, the mismatch between i386 and x86_64 can be solved by
adding the -m64 flag to nvcc (looks like mpicc generates 64 bits
objects, white the default for nvcc is 32 bits).
It might also be solved by adding -m32 to mpicc (not tested) - however
my machine is running 64 bits.

Best Regards
Guillaume

On Tue, Apr 5, 2011 at 4:30 PM, Nathalie Furmento
<nathalie.furmento@labri.fr> wrote:



Hi,

ring_kernel.o is build from ring_kernel.cu. The rule to build a .o
from
a
.cu is in Makefile.am.

Could you see if you also have the problems when building the tests
or
the
examples (make -C tests or make -C examples)

Thanks,

Nathalie


On 05/04/2011 12:35, tog wrote:



Hi,

I still have a problem with the build in the mpi tests.

if /usr/bin/mpicc -DHAVE_CONFIG_H -I. -I. -I../src/common
-I../include
-I../gcc-plugin/src -I../include/ -I../mpi/ -I../src/
-I../examples/
-I../src -I../include -D_GNU_SOURCE -Wall
-I/usr/local/cuda/include
-O3 -gdwarf-2 -g3 -MT ring.o -MD -MP -MF ".deps/ring.Tpo" -c -o
ring.o `test -f 'tests/ring.c' || echo './'`tests/ring.c; \
then mv -f ".deps/ring.Tpo" ".deps/ring.Po"; else rm -f
".deps/ring.Tpo"; exit 1; fi
make[2]: *** No rule to make target `ring_kernel.o', needed by
`tests/ring'. Stop.
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1


Any idea of what is wrong ?

Best Regards
Guillaume


















Index: mpi/Makefile.am
===================================================================
--- mpi/Makefile.am (revision 3474)
+++ mpi/Makefile.am (working copy)
@@ -44,20 +44,8 @@

examplebin_PROGRAMS =

-if STARPU_USE_CUDA
-# TODO define NVCCFLAGS
-NVCC ?= nvcc
+include ../Makefile.nvcc

-NVCCFLAGS += -I$(top_srcdir)/include/ -I$(top_builddir)/include
$(HWLOC_CFLAGS)
-
-.cu.cubin:
- $(MKDIR_P) `dirname $@`
- $(NVCC) -cubin $< -o $@ --compiler-options -fno-strict-aliasing
$(NVCCFLAGS)
-
-.cu.o:
- $(NVCC) $< -c -o $@ --compiler-options -fno-strict-aliasing
$(NVCCFLAGS) -I$(top_srcdir)/include/ -I$(top_builddir)/include/
-endif
-
AM_CFLAGS = $(HWLOC_CFLAGS) -Wall $(STARPU_CUDA_CPPFLAGS)
$(STARPU_OPENCL_CPPFLAGS)
LIBS = $(top_builddir)/src/libstarpu.la $(HWLOC_LIBS) @LIBS@
AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/mpi/
-I$(top_srcdir)/src/ -I$(top_srcdir)/examples/ -I$(top_builddir)/src
-I$(top_builddir)/include
Index: tests/Makefile.am
===================================================================
--- tests/Makefile.am (revision 3474)
+++ tests/Makefile.am (working copy)
@@ -37,23 +37,8 @@
nobase_STARPU_OPENCL_DATA_DATA =
endif

-if STARPU_USE_CUDA
+include ../Makefile.nvcc

-# TODO define NVCCFLAGS
-NVCC ?= nvcc
-
-NVCCFLAGS += -I$(top_srcdir)/include/ -I$(top_builddir)/include
$(HWLOC_CFLAGS)
-
-.cu.cubin:
- $(MKDIR_P) `dirname $@`
- $(NVCC) -cubin $< -o $@ --compiler-options -fno-strict-aliasing
$(NVCCFLAGS)
-
-.cu.o:
- $(MKDIR_P) `dirname $@`
- $(NVCC) $< -c -o $@ --compiler-options -fno-strict-aliasing
$(NVCCFLAGS) -I${includedir}
-
-endif
-
if STARPU_USE_GORDON

SPU_CC ?= spu-gcc
Index: Makefile.nvcc
===================================================================
--- Makefile.nvcc (revision 0)
+++ Makefile.nvcc (revision 0)
@@ -0,0 +1,14 @@
+if STARPU_USE_CUDA
+# TODO define NVCCFLAGS
+NVCC ?= nvcc
+
+NVCCFLAGS += -I$(top_srcdir)/include/ -I$(top_builddir)/include
$(HWLOC_CFLAGS)
+
+.cu.cubin:
+ $(MKDIR_P) `dirname $@`
+ $(NVCC) -cubin $< -o $@ --compiler-options -fno-strict-aliasing
$(NVCCFLAGS)
+
+.cu.o:
+ $(NVCC) $< -c -o $@ --compiler-options -fno-strict-aliasing
$(NVCCFLAGS) -I$(top_srcdir)/include/ -I$(top_builddir)/include/
+ cp $@ .
+endif
Index: examples/Makefile.am
===================================================================
--- examples/Makefile.am (revision 3474)
+++ examples/Makefile.am (working copy)
@@ -62,12 +62,8 @@
CLEANFILES += *.gcno *.gcda *.linkinfo

if STARPU_USE_CUDA
-
-NVCCFLAGS += --compiler-options -fno-strict-aliasing $(HWLOC_CFLAGS)
-I$(top_srcdir)/include/ -I$(top_builddir)/include/ -I$(top_srcdir)/examples/
-arch sm_13
-
-.cu.o:
- $(NVCC) $< -c -o $@ $(NVCCFLAGS)
-
+NVCCFLAGS += --compiler-options -fno-strict-aliasing
-I$(top_srcdir)/examples/ -arch sm_13
+include ../Makefile.nvcc
endif

if STARPU_USE_GORDON



Archives gérées par MHonArc 2.6.19+.

Haut de le page