Page 1 of 1
Compilation error with "codegen.py: Command not found"
Posted: Tue Jul 19, 2016 5:40 pm
by davidmoises
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
Re: Compilation error with "codegen.py: Command not found"
Posted: Thu Jul 21, 2016 12:17 pm
by mgates3
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
Re: Compilation error with "codegen.py: Command not found"
Posted: Thu Jul 21, 2016 1:43 pm
by davidmoises
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
Re: Compilation error with "codegen.py: Command not found"
Posted: Fri Jul 22, 2016 11:55 am
by mgates3
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
Re: Compilation error with "codegen.py: Command not found"
Posted: Fri Jul 22, 2016 1:55 pm
by davidmoises
Thank you Mark!