Code Monkey home page Code Monkey logo

Comments (4)

adammathys avatar adammathys commented on June 28, 2024

I've rerun the above with the verbose option. Here's the compilation command used by Codepy:

g++ -pthread -fno-strict-aliasing -g -O2 -g -fwrapv -O2 -Wall -fPIC -std=c++0x -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -DNDEBUG -DCUDA_SUPPORT -I/usr/include/python2.7 -I/home/adamm/.virtualenvs/au/local/lib/python2.7/site-packages/copperhead-0.2a1-py2.7-linux-x86_64.egg/copperhead/prelude -I/usr/local/cuda/include /tmp/codepy-compiler-cache-v5-uid1000/d0009f81104ade7d9a86f51a465339ba/module.o /tmp/codepy-compiler-cache-v5-uid1000/b2773585709ab7f476c3ad806407d1cd/gpu.o -L/usr/lib -L/usr/local/cuda/lib -L/usr/local/cuda/lib64 -lcuda -lcudart -lpthread -ldl -lutil -lcudart -o /tmp/codepy-compiler-cache-v5-uid1000/d0009f81104ade7d9a86f51a465339ba/codepy.temp.d0009f81104ade7d9a86f51a465339ba.module.so

For comparison, here are the commands with a build using siteconf.py:

g++ -pthread -fno-strict-aliasing -g -O2 -g -fwrapv -O2 -Wall -fPIC -std=c++0x -c -DNDEBUG -DCUDA_SUPPORT -I/usr/include/python2.7 -I/home/adamm/.virtualenvs/ag/local/lib/python2.7/site-packages/copperhead/prelude -I/usr/include -I/usr/local/cuda/include /tmp/codepy-compiler-cache-v5-uid1000/2bf9f4cd60d0262f8d7821f38cad2836/module.cpp -o /tmp/codepy-compiler-cache-v5-uid1000/2bf9f4cd60d0262f8d7821f38cad2836/module.o

nvcc -Xcompiler -fPIC -arch=sm_21 -c -DNDEBUG -DCUDA_SUPPORT -U__BLOCKS__ -I/usr/include/python2.7 -I/home/adamm/.virtualenvs/ag/local/lib/python2.7/site-packages/copperhead/prelude -I/usr/include -I/home/adamm/.virtualenvs/ag/local/lib/python2.7/site-packages/numpy/core/include -I/usr/local/cuda/include /tmp/codepy-compiler-cache-v5-uid1000/7256c103cf7b8d03406fcaefc8a1e14b/gpu.cu -o /tmp/codepy-compiler-cache-v5-uid1000/7256c103cf7b8d03406fcaefc8a1e14b/gpu.o

g++ -pthread -fno-strict-aliasing -g -O2 -g -fwrapv -O2 -Wall -fPIC -std=c++0x -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -DNDEBUG -DCUDA_SUPPORT -I/usr/include/python2.7 -I/home/adamm/.virtualenvs/ag/local/lib/python2.7/site-packages/copperhead/prelude -I/usr/include -I/usr/local/cuda/include /tmp/codepy-compiler-cache-v5-uid1000/2bf9f4cd60d0262f8d7821f38cad2836/module.o /tmp/codepy-compiler-cache-v5-uid1000/7256c103cf7b8d03406fcaefc8a1e14b/gpu.o -L/usr/lib -L/usr/local/cuda/lib -L/usr/local/cuda/lib64 -lcuda -lcudart -lboost_python -lpthread -ldl -lutil -lcudart -o /tmp/codepy-compiler-cache-v5-uid1000/2bf9f4cd60d0262f8d7821f38cad2836/codepy.temp.2bf9f4cd60d0262f8d7821f38cad2836.module.so

From the looks of it, the only significant different I can see is that when using the siteconf.py build -I/usr/include is included in the build arguments. However, it's excluded in the other build. Seeing this, I tried to install Copperhead with siteconf.py containing:

#!/usr/bin/python
BOOST_INC_DIR = "/usr/include"
BOOST_LIB_DIR = None
BOOST_PYTHON_LIBNAME =None

No luck, I get the same error message as before. I do get a slightly different compilation command:

g++ -pthread -fno-strict-aliasing -g -O2 -g -fwrapv -O2 -Wall -fPIC -std=c++0x -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -DNDEBUG -DCUDA_SUPPORT -I/usr/include/python2.7 -I/home/adamm/.virtualenvs/zn/local/lib/python2.7/site-packages/copperhead-0.2a1-py2.7-linux-x86_64.egg/copperhead/prelude -I/usr/include -I/usr/local/cuda/include /tmp/codepy-compiler-cache-v5-uid1000/437bdfcaa8955d24032c5799e7996047/module.o /tmp/codepy-compiler-cache-v5-uid1000/bdfc2a7bee5fb4d771ee9acc4bf2a355/gpu.o -L/usr/lib -L/usr/local/cuda/lib -L/usr/local/cuda/lib64 -lcuda -lcudart -lpthread -ldl -lutil -lcudart -o /tmp/codepy-compiler-cache-v5-uid1000/437bdfcaa8955d24032c5799e7996047/codepy.temp.437bdfcaa8955d24032c5799e7996047.module.so

It now looks almost identical to the working command; the missing -I/usr/include has appeared.

from copperhead.

bryancatanzaro avatar bryancatanzaro commented on June 28, 2024

Thanks for the report. I've updated the build process significantly - I hope the new script catches the lack of configuration before building.

from copperhead.

adammathys avatar adammathys commented on June 28, 2024

Issue no longer present in most recent version of Copperhead.

from copperhead.

bryancatanzaro avatar bryancatanzaro commented on June 28, 2024

Thanks for the report!

from copperhead.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.