openworm / sibernetic

This is a C++/OpenCL implementation of the PCISPH algorithm supplemented with a set of biomechanics related features applied to C. elegans locomotion
Other
361 stars 105 forks source link

Installation error! #56

Closed alda30 closed 10 years ago

alda30 commented 10 years ago

Regarding the installation instructions, in the Release folder (in ../bin/) there is no "makefile" to run

make clean

or

make all

Can you help me?

skhayrulin commented 10 years ago

Hi @Ehsanizadi! Make files locate in the top-level folder (makefile for linux systems and makefile.OSX for mac) you should run make from there. After compiling run Sibernetic with this command ./Release/Sibernetic if you work on linux. Hope this helps, if not let me know.

alda30 commented 10 years ago

I already tried it from top folder, but I get an error, here is the log:

Building file: src/main.cpp
Invoking: GCC C++ Compiler
g++ -I/usr/include/python2.7 -Iinc -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"Release/obj/main.d" -MT"Release/obj/main.d" -o "Release/obj/main.o" "src/main.cpp"
Finished building: src/main.cpp

Building file: src/owHelper.cpp
Invoking: GCC C++ Compiler
g++ -I/usr/include/python2.7 -Iinc -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"Release/obj/owHelper.d" -MT"Release/obj/owHelper.d" -o "Release/obj/owHelper.o" "src/owHelper.cpp"
Finished building: src/owHelper.cpp

Building file: src/owOpenCLSolver.cpp
Invoking: GCC C++ Compiler
g++ -I/usr/include/python2.7 -Iinc -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"Release/obj/owOpenCLSolver.d" -MT"Release/obj/owOpenCLSolver.d" -o "Release/obj/owOpenCLSolver.o" "src/owOpenCLSolver.cpp"
In file included from inc/owOpenCLSolver.h:48:0,
                 from src/owOpenCLSolver.cpp:38:
src/owOpenCLSolver.cpp: In member function ‘unsigned int owOpenCLSolver::_runIndexPostPass(owConfigProrerty*)’:
inc/owOpenCLConstant.h:46:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define NO_CELL_ID -1
                     ^
src/owOpenCLSolver.cpp:434:39: note: in expansion of macro ‘NO_CELL_ID’
   if(gridNextNonEmptyCellBuffer[i] == NO_CELL_ID)
                                       ^
Finished building: src/owOpenCLSolver.cpp

Building file: src/owPhysicsFluidSimulator.cpp
Invoking: GCC C++ Compiler
g++ -I/usr/include/python2.7 -Iinc -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"Release/obj/owPhysicsFluidSimulator.d" -MT"Release/obj/owPhysicsFluidSimulator.d" -o "Release/obj/owPhysicsFluidSimulator.o" "src/owPhysicsFluidSimulator.cpp"
Finished building: src/owPhysicsFluidSimulator.cpp

Building file: src/owWorldSimulation.cpp
Invoking: GCC C++ Compiler
g++ -I/usr/include/python2.7 -Iinc -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"Release/obj/owWorldSimulation.d" -MT"Release/obj/owWorldSimulation.d" -o "Release/obj/owWorldSimulation.o" "src/owWorldSimulation.cpp"
Finished building: src/owWorldSimulation.cpp

Building file: src/test/owPhysicTest.cpp
Invoking: GCC C++ Compiler
g++ -I/usr/include/python2.7 -Iinc -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"Release/obj/test/owPhysicTest.d" -MT"Release/obj/test/owPhysicTest.d" -o "Release/obj/test/owPhysicTest.o" "src/test/owPhysicTest.cpp"
Finished building: src/test/owPhysicTest.cpp

Building target: Sibernetic
Invoking: GCC C++ Linker
g++  -o ./Release/Sibernetic ./Release/obj/main.o ./Release/obj/owHelper.o ./Release/obj/owOpenCLSolver.o ./Release/obj/owPhysicsFluidSimulator.o ./Release/obj/owWorldSimulation.o ./Release/obj/test/owPhysicTest.o  -lpython2.7 -lGL -lGLU -lOpenCL -lrt -lglut
./Release/obj/owOpenCLSolver.o: In function `owOpenCLSolver::~owOpenCLSolver()':
owOpenCLSolver.cpp:(.text+0x41e8): undefined reference to `clReleaseDevice'
./Release/obj/owOpenCLSolver.o: In function `owOpenCLSolver::initializeOpenCL(owConfigProrerty*)':
owOpenCLSolver.cpp:(.text+0x48d8): undefined reference to `clReleaseDevice'
./Release/obj/owOpenCLSolver.o: In function `std::vector<cl::Device, std::allocator<cl::Device> >::~vector()':
owOpenCLSolver.cpp:(.text._ZNSt6vectorIN2cl6DeviceESaIS1_EED2Ev[_ZNSt6vectorIN2cl6DeviceESaIS1_EED5Ev]+0x30): undefined reference to `clReleaseDevice'
./Release/obj/owOpenCLSolver.o: In function `void std::_Destroy_aux<false>::__destroy<cl::Device*>(cl::Device*, cl::Device*)':
owOpenCLSolver.cpp:(.text._ZNSt12_Destroy_auxILb0EE9__destroyIPN2cl6DeviceEEEvT_S5_[_ZNSt12_Destroy_auxILb0EE9__destroyIPN2cl6DeviceEEEvT_S5_]+0x34): undefined reference to `clReleaseDevice'
./Release/obj/owOpenCLSolver.o: In function `std::vector<cl::Device, std::allocator<cl::Device> >::operator=(std::vector<cl::Device, std::allocator<cl::Device> > const&)':
owOpenCLSolver.cpp:(.text._ZNSt6vectorIN2cl6DeviceESaIS1_EEaSERKS3_[_ZNSt6vectorIN2cl6DeviceESaIS1_EEaSERKS3_]+0x8d): undefined reference to `clRetainDevice'
owOpenCLSolver.cpp:(.text._ZNSt6vectorIN2cl6DeviceESaIS1_EEaSERKS3_[_ZNSt6vectorIN2cl6DeviceESaIS1_EEaSERKS3_]+0xc1): undefined reference to `clReleaseDevice'
owOpenCLSolver.cpp:(.text._ZNSt6vectorIN2cl6DeviceESaIS1_EEaSERKS3_[_ZNSt6vectorIN2cl6DeviceESaIS1_EEaSERKS3_]+0x131): undefined reference to `clRetainDevice'
owOpenCLSolver.cpp:(.text._ZNSt6vectorIN2cl6DeviceESaIS1_EEaSERKS3_[_ZNSt6vectorIN2cl6DeviceESaIS1_EEaSERKS3_]+0x16a): undefined reference to `clReleaseDevice'
owOpenCLSolver.cpp:(.text._ZNSt6vectorIN2cl6DeviceESaIS1_EEaSERKS3_[_ZNSt6vectorIN2cl6DeviceESaIS1_EEaSERKS3_]+0x1b5): undefined reference to `clReleaseDevice'
owOpenCLSolver.cpp:(.text._ZNSt6vectorIN2cl6DeviceESaIS1_EEaSERKS3_[_ZNSt6vectorIN2cl6DeviceESaIS1_EEaSERKS3_]+0x250): undefined reference to `clRetainDevice'
owOpenCLSolver.cpp:(.text._ZNSt6vectorIN2cl6DeviceESaIS1_EEaSERKS3_[_ZNSt6vectorIN2cl6DeviceESaIS1_EEaSERKS3_]+0x2f4): undefined reference to `clRetainDevice'
owOpenCLSolver.cpp:(.text._ZNSt6vectorIN2cl6DeviceESaIS1_EEaSERKS3_[_ZNSt6vectorIN2cl6DeviceESaIS1_EEaSERKS3_]+0x33c): undefined reference to `clReleaseDevice'
./Release/obj/owOpenCLSolver.o: In function `void std::vector<cl::Device, std::allocator<cl::Device> >::_M_assign_aux<_cl_device_id**>(_cl_device_id**, _cl_device_id**, std::forward_iterator_tag)':
owOpenCLSolver.cpp:(.text._ZNSt6vectorIN2cl6DeviceESaIS1_EE13_M_assign_auxIPP13_cl_device_idEEvT_S8_St20forward_iterator_tag[_ZNSt6vectorIN2cl6DeviceESaIS1_EE13_M_assign_auxIPP13_cl_device_idEEvT_S8_St20forward_iterator_tag]+0xb9): undefined reference to `clReleaseDevice'
owOpenCLSolver.cpp:(.text._ZNSt6vectorIN2cl6DeviceESaIS1_EE13_M_assign_auxIPP13_cl_device_idEEvT_S8_St20forward_iterator_tag[_ZNSt6vectorIN2cl6DeviceESaIS1_EE13_M_assign_auxIPP13_cl_device_idEEvT_S8_St20forward_iterator_tag]+0xf4): undefined reference to `clReleaseDevice'
owOpenCLSolver.cpp:(.text._ZNSt6vectorIN2cl6DeviceESaIS1_EE13_M_assign_auxIPP13_cl_device_idEEvT_S8_St20forward_iterator_tag[_ZNSt6vectorIN2cl6DeviceESaIS1_EE13_M_assign_auxIPP13_cl_device_idEEvT_S8_St20forward_iterator_tag]+0x1d4): undefined reference to `clReleaseDevice'
owOpenCLSolver.cpp:(.text._ZNSt6vectorIN2cl6DeviceESaIS1_EE13_M_assign_auxIPP13_cl_device_idEEvT_S8_St20forward_iterator_tag[_ZNSt6vectorIN2cl6DeviceESaIS1_EE13_M_assign_auxIPP13_cl_device_idEEvT_S8_St20forward_iterator_tag]+0x222): undefined reference to `clReleaseDevice'
./Release/obj/owOpenCLSolver.o: In function `int cl::detail::getInfoHelper<cl::detail::GetInfoFunctor0<int (*)(_cl_context*, unsigned int, unsigned long, void*, unsigned long*), _cl_context*>, cl::Device>(cl::detail::GetInfoFunctor0<int (*)(_cl_context*, unsigned int, unsigned long, void*, unsigned long*), _cl_context*>, unsigned int, std::vector<cl::Device, std::allocator<cl::Device> >*, int, cl::Device::cl_type)':
owOpenCLSolver.cpp:(.text._ZN2cl6detail13getInfoHelperINS0_15GetInfoFunctor0IPFiP11_cl_contextjmPvPmES4_EENS_6DeviceEEEiT_jPSt6vectorIT0_SaISD_EEiNSD_7cl_typeE[_ZN2cl6detail13getInfoHelperINS0_15GetInfoFunctor0IPFiP11_cl_contextjmPvPmES4_EENS_6DeviceEEEiT_jPSt6vectorIT0_SaISD_EEiNSD_7cl_typeE]+0xf1): undefined reference to `clRetainDevice'
collect2: error: ld returned 1 exit status
make: *** [Sibernetic] Error 1

Is there any problem with the headers? I am running Ubuntu 14.04 64bit and with Nvidia GTX Titan VideoCard. Thanks in advance

skhayrulin commented 10 years ago

It's wierd. Do you have any opencl drivers installed in your system? If no try to do that http://wiki.tiker.net/OpenCLHowTo. If yes you can explore which version of drivers you have you can use this test example. Also I suppose that it could be useful http://stackoverflow.com/questions/15855759/opencl-1-2-c-wrapper-undefined-reference-to-clreleasedevice. Keep me in touch.

alda30 commented 10 years ago

skhayrulin, Thanks for the information,

I have installed correctly opencl drivers (I think so because I also run some exacmples with other SPH codes on Github (usingh opencl) and they work fine) and i followed the procedures provided in the link you mentioned.

Afterwards, I downloaded test example , I ran make it went ok but when I run

./print-devices

I get this error:

*** 'clGetPlatformIDs' in 'cl-helper.c' on line 113 failed with error 'invalid/unknown error code'.
Aborted (core dumped)

Sorry I am newbie in this field and may ask weird questions or doing wrong! Anoyhow, I appreciate your help

alda30 commented 10 years ago

I found out there was aproblem with Nvidia driver anyhow, now I have application installed. When I run

./Release/Sibernetic

I get this:

ERROR: Could not open file position.txt

any suggestion?


Another question is that is there any tutorial to learn how to work with the code?

skhayrulin commented 10 years ago

Thanks for updates! Could you check if position.txt file is really locates in folder configuration/ also do you run Sibernetic from top level folder?

alda30 commented 10 years ago

Ops! I did not run the executable from the top level. Sorry for that!