<div dir="ltr">On Thu, Aug 15, 2013 at 4:08 PM, Harshad Sahasrabudhe <span dir="ltr"><<a href="mailto:hsahasra@purdue.edu" target="_blank">hsahasra@purdue.edu</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Just for testing, I manually created magmaconfig.h and included it in magma.h, then ran configure. I also directly tried putting #define HAVE_CUBLAS 1 in magma.h in the extracted package.<br>
<br>
Both these methods result in the same error that I got before.<br></blockquote><div><br></div><div>That is impossible. You made a mistake somewhere.</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm guessing you were suggesting creation og magmaconfig.h in magma.py?<br>
<br>
Harshad<br>
<br>
----- Original Message -----<br>
From: "Matthew Knepley" <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>><br>
To: "Harshad Sahasrabudhe" <<a href="mailto:hsahasra@purdue.edu">hsahasra@purdue.edu</a>><br>
Cc: "Karl Rupp" <<a href="mailto:rupp@mcs.anl.gov">rupp@mcs.anl.gov</a>>, "For users of the development version of PETSc" <<a href="mailto:petsc-dev@mcs.anl.gov">petsc-dev@mcs.anl.gov</a>><br>
Sent: Thursday, August 15, 2013 4:38:57 PM<br>
Subject: Re: [petsc-dev] Error while building MAGMA from PETSc<br>
<br>
<br>
On Thu, Aug 15, 2013 at 3:35 PM, Harshad Sahasrabudhe < <a href="mailto:hsahasra@purdue.edu">hsahasra@purdue.edu</a> > wrote:<br>
<br>
<br>
<br>
<br>
I don't know how to write a config header. Can you give me an example package which I can look at?<br>
<br>
<br>
<br>
---magmaconfig.h<br>
<br>
<br>
#define HAVE_CUBLAS 1<br>
<br>
<br>
<br>
<br>
Matt<br>
<br>
<br>
----- Original Message -----<br>
From: "Matthew Knepley" < <a href="mailto:knepley@gmail.com">knepley@gmail.com</a> ><br>
To: "Harshad Sahasrabudhe" < <a href="mailto:hsahasra@purdue.edu">hsahasra@purdue.edu</a> ><br>
Cc: "Karl Rupp" < <a href="mailto:rupp@mcs.anl.gov">rupp@mcs.anl.gov</a> >, "For users of the development version of PETSc" < <a href="mailto:petsc-dev@mcs.anl.gov">petsc-dev@mcs.anl.gov</a> ><br>
Sent: Thursday, August 15, 2013 4:29:12 PM<br>
Subject: Re: [petsc-dev] Error while building MAGMA from PETSc<br>
<br>
<br>
On Thu, Aug 15, 2013 at 3:24 PM, Harshad Sahasrabudhe < <a href="mailto:hsahasra@purdue.edu">hsahasra@purdue.edu</a> > wrote:<br>
<br>
<br>
<br>
<br>
It is getting passed... Here is one line from configure.log:<br>
<br>
nvcc -g -DADD_ -Xcompiler -fno-strict-aliasing -DGPUSHMEM=130 -DHAVE_CUBLAS -gencode arch=compute_13,code=sm_13 -gencode arch=compute_13,code=compute_13 -gencode arch=compute_10,code=compute_10 -I/home/harshad/cuda-5.5/include -I../include -I../control -c <a href="http://zgeadd_batched.cu" target="_blank">zgeadd_batched.cu</a> -o zgeadd_batched.cu_o<br>
<br>
<br>
During the Magma build. HOWEVER, when you compile with this header, you need to have this defined as well.<br>
I suggest writing a config header for that package since this "define on the command<br>
line stuff" is horrible. Then include that header in the regular Magma header that you are checking for.<br>
<br>
<br>
Matt<br>
<br>
<br>
<br>
----- Original Message -----<br>
From: "Karl Rupp" < <a href="mailto:rupp@mcs.anl.gov">rupp@mcs.anl.gov</a> ><br>
To: "Harshad Sahasrabudhe" < <a href="mailto:hsahasra@purdue.edu">hsahasra@purdue.edu</a> ><br>
Cc: "Barry Smith" < <a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a> >, "For users of the development version of PETSc" < <a href="mailto:petsc-dev@mcs.anl.gov">petsc-dev@mcs.anl.gov</a> ><br>
<br>
<br>
Sent: Thursday, August 15, 2013 4:23:37 PM<br>
Subject: Re: [petsc-dev] Error while building MAGMA from PETSc<br>
<br>
Hi again,<br>
<br>
> Yes, -DHAVE_CUBLAS is defined while compilation, but somehow I'm<br>
getting this error.<br>
<br>
Make sure this also gets passed to the CUDA compiler (nvcc).<br>
<br>
Best regards,<br>
Karli<br>
<br>
<br>
><br>
> ----- Original Message -----<br>
> From: "Karl Rupp" < <a href="mailto:rupp@mcs.anl.gov">rupp@mcs.anl.gov</a> ><br>
> To: "Harshad Sahasrabudhe" < <a href="mailto:hsahasra@purdue.edu">hsahasra@purdue.edu</a> ><br>
> Cc: "Barry Smith" < <a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a> >, "For users of the development version of PETSc" < <a href="mailto:petsc-dev@mcs.anl.gov">petsc-dev@mcs.anl.gov</a> ><br>
> Sent: Thursday, August 15, 2013 4:18:57 PM<br>
> Subject: Re: [petsc-dev] Error while building MAGMA from PETSc<br>
><br>
> Hey,<br>
><br>
> apparently there must be one out of {CUBLAS, clAmdBlas, ICC for MIC}<br>
> installed. CUBLAS is already made available via --with-cuda, so you<br>
> should be fine pointing Magma to the CUDA folder. We don't have package<br>
> checks for clAmdBlas or MIC.<br>
><br>
> Best regards,<br>
> Karli<br>
><br>
><br>
> On 08/15/2013 03:13 PM, Harshad Sahasrabudhe wrote:<br>
>> How does the testing work? What headers and functions do I need to include in magma.py?<br>
>><br>
>> ----- Original Message -----<br>
>> From: "Barry Smith" < <a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a> ><br>
>> To: "Harshad Sahasrabudhe" < <a href="mailto:hsahasra@purdue.edu">hsahasra@purdue.edu</a> ><br>
>> Cc: "Jed Brown" < <a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a> >, "For users of the development version of PETSc" < <a href="mailto:petsc-dev@mcs.anl.gov">petsc-dev@mcs.anl.gov</a> ><br>
>> Sent: Thursday, August 15, 2013 4:01:29 PM<br>
>> Subject: Re: [petsc-dev] Error while building MAGMA from PETSc<br>
>><br>
>><br>
>> Possible ERROR while running preprocessor: In file included from /home/harshad/workspace/petsc-hg/arch-linux2-c-debug/include/magmablas_z.h:14:0,<br>
>> from /home/harshad/workspace/petsc-hg/arch-linux2-c-debug/include/magmablas.h:12,<br>
>> from /home/harshad/workspace/petsc-hg/arch-linux2-c-debug/include/magma.h:15,<br>
>> from /tmp/petsc-Z_wD6e/config.headers/conftest.c:3:<br>
>> /home/harshad/workspace/petsc-hg/arch-linux2-c-debug/include/magma_types.h:146:6: error: #error "One of HAVE_CUBLAS, HAVE_clAmdBlas, or HAVE_MIC must be defined. This typically happens in Makefile.internal."<br>
>> ret = 256<br>
>> error message = {In file included from /home/harshad/workspace/petsc-hg/arch-linux2-c-debug/include/magmablas_z.h:14:0,<br>
>> from /home/harshad/workspace/petsc-hg/arch-linux2-c-debug/include/magmablas.h:12,<br>
>> from /home/harshad/workspace/petsc-hg/arch-linux2-c-debug/include/magma.h:15,<br>
>> from /tmp/petsc-Z_wD6e/config.headers/conftest.c:3:<br>
>> /home/harshad/workspace/petsc-hg/arch-linux2-c-debug/include/magma_types.h:146:6: error: #error "One of HAVE_CUBLAS, HAVE_clAmdBlas, or HAVE_MIC must be defined. This typically happens in Makefile.internal."<br>
>><br>
>><br>
>> On Aug 15, 2013, at 2:43 PM, Harshad Sahasrabudhe < <a href="mailto:hsahasra@purdue.edu">hsahasra@purdue.edu</a> > wrote:<br>
>><br>
>>> Attached is the diff and configure.log<br>
>>><br>
>>> ----- Original Message -----<br>
>>> From: "Jed Brown" < <a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a> ><br>
>>> To: "Matthew Knepley" < <a href="mailto:knepley@gmail.com">knepley@gmail.com</a> ><br>
>>> Cc: "Harshad Sahasrabudhe" < <a href="mailto:hsahasra@purdue.edu">hsahasra@purdue.edu</a> >, "For users of the development version of PETSc" < <a href="mailto:petsc-dev@mcs.anl.gov">petsc-dev@mcs.anl.gov</a> ><br>
>>> Sent: Thursday, August 15, 2013 3:33:33 PM<br>
>>> Subject: Re: [petsc-dev] Error while building MAGMA from PETSc<br>
>>><br>
>>><br>
>>><br>
>>> ... and send the changes you have made. One way to do that is to 'git add config/PETSc/packages/magma.py' and send the output if 'git diff master'.<br>
>>> On Aug 15, 2013 2:28 PM, "Matthew Knepley" < <a href="mailto:knepley@gmail.com">knepley@gmail.com</a> > wrote:<br>
>>><br>
>>><br>
>>><br>
>>> On Thu, Aug 15, 2013 at 1:56 PM, Harshad Sahasrabudhe < <a href="mailto:hsahasra@purdue.edu">hsahasra@purdue.edu</a> > wrote:<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> Hi,<br>
>>><br>
>>> Now MAGMA compiles correctly and libmagma.a is generated, however PETSc says<br>
>>><br>
>>> Downloaded magma could not be used. Please check install in /home/harshad/workspace/petsc-hg/arch-linux2-c-debug<br>
>>><br>
>>> I am copying the generated library and include files to the install directory using<br>
>>><br>
>>> includeDir = os.path.join(self.installDir, self.includedir)<br>
>>> output,err,ret = PETSc.package.NewPackage.executeShellCommand('cd '+self.packageDir+' && mv -f lib/*.* '+libDir+'/. && cp -f include/*.* '+includeDir+'/.', timeout=2500, log = self.framework.log)<br>
>>><br>
>>> I need help in resolving this error.<br>
>>><br>
>>><br>
>>><br>
>>> Always send configure.log.<br>
>>><br>
>>><br>
>>> Matt<br>
>>><br>
>>><br>
>>> Thanks,<br>
>>> Harshad<br>
>>><br>
>>> ----- Original Message -----<br>
>>> From: "Matthew Knepley" < <a href="mailto:knepley@gmail.com">knepley@gmail.com</a> ><br>
>>> To: "Harshad Sahasrabudhe" < <a href="mailto:hsahasra@purdue.edu">hsahasra@purdue.edu</a> ><br>
>>> Cc: "For users of the development version of PETSc" < <a href="mailto:petsc-dev@mcs.anl.gov">petsc-dev@mcs.anl.gov</a> ><br>
>>> Sent: Wednesday, August 14, 2013 6:27:04 PM<br>
>>> Subject: Re: [petsc-dev] Error while building MAGMA from PETSc<br>
>>><br>
>>><br>
>>> On Wed, Aug 14, 2013 at 5:23 PM, Harshad Sahasrabudhe < <a href="mailto:hsahasra@purdue.edu">hsahasra@purdue.edu</a> > wrote:<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> Hi,<br>
>>><br>
>>> I'm trying the write the package compiler for MAGMA using PETSc build system. I'm getting the following error while building MAGMA. With the error, I'm also getting a couple hundred warnings:<br>
>>><br>
>>> sormqr_gpu_2stage.cpp: In function ‘magma_int_t magma_sormqr_gpu_2stages(char, char, magma_int_t, magma_int_t, magma_int_t, float*, magma_int_t, float*, magma_int_t, float*, magma_int_t, magma_int_t*)’:<br>
>>> sormqr_gpu_2stage.cpp:98: warning: unused variable ‘c_one’<br>
>>> sormqr_gpu_2stage.cpp:107: warning: unused variable ‘lwkopt’<br>
>>> strsm_m.cpp: In function ‘magma_int_t magma_strsm_m(magma_int_t, char, char, char, char, magma_int_t, magma_int_t, float, float*, magma_int_t, float*, magma_int_t)’:<br>
>>> strsm_m.cpp:181: warning: unused variable ‘jj’<br>
>>> strsm_m.cpp:181: warning: unused variable ‘jjb’<br>
>>> sgeev.cpp: In function ‘magma_int_t magma_sgeev(char, char, magma_int_t, float*, magma_int_t, float*, float*, float*, magma_int_t, float*, magma_int_t, float*, magma_int_t, magma_int_t*)’:<br>
>>> sgeev.cpp:126: warning: unused variable ‘c_n1’<br>
>>> nvcc fatal : redefinition of argument 'gpu-architecture'<br>
>>><br>
>>><br>
>>> What is the easiest way to debug this kind of an error?<br>
>>><br>
>>><br>
>>><br>
>>> 1) Make the MAGMA build system print out the full compile line<br>
>>><br>
>>><br>
>>> 2) Make the MAGMA people clean up their sloppy code, which would eliminate the warnings<br>
>>><br>
>>><br>
>>> Matt<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> Thanks,<br>
>>> Harshad<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
>>> -- Norbert Wiener<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
>>> -- Norbert Wiener<diff_magma><configure.log><br>
>><br>
><br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
<br>
<br>
--<br>
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>
<br>
<br>
<br>
<br>
--<br>
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener
</div></div>