我一直在關注這個教程對我杰特森TK1本地安裝OpenACC的,我發現安裝腳本是不正確的。我沒有看到任何錯誤,當我編譯OpenACC的圖書館,但是當我試圖編譯我得到那個說bash腳本不安裝Python包正確
[email protected]:~/apps/acc/accull/yacf/examples/acc$ accull -v -o gpu.x acc_test.c
****************************************
_ _ _ _
| | | | | | |
__ _ ___ ___| | | | | | |
/_` |/ __/ __| | | | | | |
| (_| | (_| (__| |__| | |____| |____
\__,_|\___\___|\____/|______|______|
****************************************
Release 0.4alpha
* Verbose output
* Output executable name gpu.x
* Processing acc_test.c to ./accull_k3Ty8/acc_test.c
* Building acc_test.c
* Running StS translation
Traceback (most recent call last):
File "/home/ubuntu/apps/acc/accull/yacf//bin/c2frangollo.py", line 64, in <module>
from Backends.Frangollo.Mutators.Common import FrangolloMutatorError
File "/home/ubuntu/apps/acc/accull/yacf/Backends/Frangollo/Mutators/Common.py", line 33, in <module>
from Backends.C99.Visitors.LlcFilters import AccScopeReverse, AccScopeFilter
File "/home/ubuntu/apps/acc/accull/yacf/Backends/C99/Visitors/LlcFilters.py", line 40, in <module>
from Tools.Tree import NodeNotFound
File "/home/ubuntu/apps/acc/accull/yacf/Tools/Tree.py", line 34, in <module>
c_ast = getCurrentLanguageAst()
File "/home/ubuntu/apps/acc/accull/yacf/Frontend/Shortcuts.py", line 40, in getCurrentLanguageAst
myclass = __import__(config.FRONTEND_MODULE + '.' + str(name) + "." + str(name).lower() + '_ast', globals(), locals(), [str(name),])
File "/home/ubuntu/apps/acc/accull/yacf/Frontend/C99/__init__.py", line 16, in <module>
from .c99_parser import C99Parser
File "/home/ubuntu/apps/acc/accull/yacf/Frontend/C99/c99_parser.py", line 15, in <module>
import ply.yacc
ImportError: No module named ply.yacc
! Compilation of acc_test.c FAILED (no Project directory build)
/usr/local/cuda/bin/nvcc -Xcompiler -fopenmp -lrt -lcuda -lOpenCL -lrt -lcuda -arch=sm_20 *.o /home/ubuntu/apps/acc/accull/frangollo/src/libfrangollo.a -o gpu.x
nvlink fatal : Could not open input file '*.o'
* Finished
http://scelementary.com/2015/04/30/openacc-on-jetson-tk1.html
#!/bin/bash
ACCULLROOT=/home/ubuntu/apps/acc
mkdir -p $ACCULLROOT/source
cd $ACCULLROOT/source
wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tar.xz
wget https://pypi.python.org/packages/source/S/Sphinx/Sphinx-1.3.1.tar.gz
wget http://lxml.de/files/lxml-3.4.2.tgz
wget http://www.dabeaz.com/ply/ply-3.4.tar.gz
wget https://pypi.python.org/packages/source/M/Mako/Mako-1.0.1.tar.gz
tar xvf Python-2.7.9.tar.xz
cd Python-2.7.9/
./configure --prefix=$ACCULLROOT
make -j2
make install
list=(Sphinx-1.3.1.tar.gz lxml-3.4.2.tgz ply-3.4.tar.gz Mako-1.0.1.tar.gz)
for file in $list
do
if [ "$file" == "*.tgz" ]
name=$(basename $file .tgz)
then
name=$(basename $file .tar.gz)
fi
tar zxvf $file
cd $basename
$ACCULLROOT/bin/python setup.py build
$ACCULLROOT/bin/python setup.py install
cd ..
done
您可能需要運行該腳本作爲根/須藤。你也可以嘗試手動安裝'ply'。 'pip install ply' –