Compilation error with "codegen.py: Command not found"

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)

Compilation error with "codegen.py: Command not found"

Postby davidmoises » Tue Jul 19, 2016 5:40 pm

Hello all,

I am trying to compile MAGMA-MIC and I am getting the following compilation error:

======================================== testing
( cd testing && make )
make[1]: Entering directory `/home/dfernand/workspace/MAGMA_MIC/testing'
../tools/codegen.py -p d --file testing_zutil.cpp
make[1]: ../tools/codegen.py: Command not found


I have verified that the Intel compiler vars and mkl vars are sourced and I copied the make.inc.mkl to make.inc as instructed in the README.
However, I cannot find the "codegen.py" file or the "tools" directory in the tarball and they are not generated during the compilation process.

I would appreciate any help compiling MAGMA for the MIC.

Best regards,

David
davidmoises
 
Posts: 4
Joined: Tue Jul 19, 2016 5:22 pm

Re: Compilation error with "codegen.py: Command not found"

Postby mgates3 » Thu Jul 21, 2016 12:17 pm

Are you using MAGMA MIC 1.4.0, from the MAGMA download page?
http://icl.cs.utk.edu/magma/software/view.html?id=233
Your directory name looks odd -- normally if you just untarred it, it would be magmamic-1.4.0, not MAGMA_MIC.

codegen.py is an internal tool. It shouldn't be needed during the compilation of the distribution. It is used to generate different precisions, in this case, to generate
magma_sutil.cpp
magma_dutil.cpp
magma_cutil.cpp
from
magma_zutil.cpp
Those should all be generated already, hence make shouldn't need codegen. If magma_zutil.cpp is modified or for some reason newer than the other 3, then make will try to invoke codegen to re-generate the other 3.

Can you verify the timestamps on those files? This is what is in the distribution:
Code: Select all
magmamic-1.4.0/testing> /bin/ls --full-time -lt *util.cpp
-rw------- 1 mgates3 dongarra  1346 2015-07-12 17:46:29.000000000 -0400 testing_cutil.cpp
-rw------- 1 mgates3 dongarra  1324 2015-07-12 17:46:29.000000000 -0400 testing_dutil.cpp
-rw------- 1 mgates3 dongarra  1322 2015-07-12 17:46:29.000000000 -0400 testing_sutil.cpp
-rw------- 1 mgates3 dongarra 17688 2015-07-12 17:46:22.000000000 -0400 testing_util.cpp
-rw------- 1 mgates3 dongarra  1304 2015-07-12 17:46:22.000000000 -0400 testing_zutil.cpp


-mark
mgates3
 
Posts: 734
Joined: Fri Jan 06, 2012 2:13 pm

Re: Compilation error with "codegen.py: Command not found"

Postby davidmoises » Thu Jul 21, 2016 1:43 pm

Hello Mark,

Thanks that was the problem.
Once I decompressed the files, I copied them into another directory to play around with the code and this changed the date stamped on the file triggering the new compilation process.

I just finished compiling MAGMA-MIC in the default folder after extraction and ran an example and all works well.

Is there a way to avoid this recompilation if I copy the files into another directory?

Thanks again,

David
davidmoises
 
Posts: 4
Joined: Tue Jul 19, 2016 5:22 pm

Re: Compilation error with "codegen.py: Command not found"

Postby mgates3 » Fri Jul 22, 2016 11:55 am

If you haven't modified any of the magma_*util.cpp files, you can just touch the 3 generated ones (s, d, c) so they have a newer timestamp than z file.

touch testing/magma_[sdc]util.cpp

Or, when you copy, you can use -p to preserve the original timestamps. Or use rsync to copy.

cp -pR magmamic-1.4.0 magma-copy

-mark
mgates3
 
Posts: 734
Joined: Fri Jan 06, 2012 2:13 pm

Re: Compilation error with "codegen.py: Command not found"

Postby davidmoises » Fri Jul 22, 2016 1:55 pm

Thank you Mark!
davidmoises
 
Posts: 4
Joined: Tue Jul 19, 2016 5:22 pm


Return to User discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron