User Tools

Site Tools


neurali:nemo_output_compilazione

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
neurali:nemo_output_compilazione [2015/07/21 18:09]
profpro
neurali:nemo_output_compilazione [2020/06/08 22:20] (current)
Line 1: Line 1:
 +====NeMo output compilazione====
  
 +Purtroppo NeMo non compila, anche a causa di diversi errori nel codice, ma non solo
 +
 +Errore 1
 +
 +Si deve aggiungere alla riga 9 di ./CMakeLists.txt
 +
 +  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
 +  set(INCLUDE_DIR /usr/lib/openmpi/include)
 +  include_directories (${INCLUDE_DIR})    
 +
 +;;; NOTA: questo causerà un errore fatale perché [[neurali:nvcc]] non supporta istruzioni c++11 ;;;
 +
 +http://stackoverflow.com/questions/9057123/error-while-using-cuda-and-c11 
 +
 +DA FARE : Trucco: Separare CUDA in file .cu (c++03) che nvcc compila. Il resto in file .cpp  
 +
 +Errore 2 
 +<code>
 +mpi_dist.cpp:(.text._ZN3MPI3Win8Set_nameEPKc[_ZN3MPI3Win8Set_nameEPKc]+0x17): undefined reference to `MPI_Win_set_name'
 +CMakeFiles/mpi_dist.dir/mpi_dist.cpp.o:(.rodata._ZTVN3MPI3WinE[_ZTVN3MPI3WinE]+0x24): undefined reference to `MPI::Win::Free()'
 +CMakeFiles/mpi_dist.dir/mpi_dist.cpp.o:(.rodata._ZTVN3MPI8DatatypeE[_ZTVN3MPI8DatatypeE]+0x3c): undefined reference to `MPI::Datatype::Free()'
 +collect2: error: ld returned 1 exit status
 +make[2]: *** [src/examples/mpi_dist] Error 1
 +make[1]: *** [src/examples/CMakeFiles/mpi_dist.dir/all] Error 2
 +make: *** [all] Error 2
 +</code>
 +Si deve modificare la riga 27 di ./src/mpi_dist/CMakeLists.txt
 +
 +  TARGET_LINK_LIBRARIES(nemo_mpi_dist nemo  ${MPI_LIBRARIES} ${LTDL_LIBRARY} ${Boost_LIBRARIES})
 +
 +errore di linking
 +
 +sostituire riga 22,23 in ./src/example/CMakeLists.txt con questo
 +
 +  ADD_EXECUTABLE(mpi_dist mpi_dist.cpp parsing.cpp common.cpp)
 +  TARGET_LINK_LIBRARIES(mpi_dist nemo nemo_mpi_dist ${MPI_LIBRARIES} ${Boost_LIBRARIES})
 +
 +Errore 3
 +<code>
 +[ 12%] Building CXX object src/mpi_dist/CMakeFiles/nemo_mpi_dist.dir/WorkerSimulation.cpp.o
 +
 +/home/fabio/Desktop/nemo/nemo-mpi-master/src/mpi_dist/WorkerSimulation.cpp: In member function 
 +‘void nemo::mpi_dist::WorkerSimulation::distributeOutgoingSpikes(const std::vector<unsigned int>&)’:
 +
 +/home/fabio/Desktop/nemo/nemo-mpi-master/src/mpi_dist/WorkerSimulation.cpp:107:27: error: cannot convert 
 +‘MPI::Request’ to ‘ompi_request_t**’ for argument ‘1’ to ‘int MPI_Cancel(ompi_request_t**)’
 +
 +    MPI_Cancel(recv_request);
 +                           ^
 +make[2]: *** [src/mpi_dist/CMakeFiles/nemo_mpi_dist.dir/WorkerSimulation.cpp.o] Error 1
 +make[1]: *** [src/mpi_dist/CMakeFiles/nemo_mpi_dist.dir/all] Error 2
 +make: *** [all] Error 2
 +</code>
 +
 +Come correggere? Commentare il codice?????? riga 106
 +<code>
 + /*
 + * if (!MPI::COMM_WORLD.Iprobe(worker, COMMUNICATION_TAG, status)) {
 + MPI_Cancel(recv_request);
 + count--;
 + }
 +
 + * */
 +</code>
 +
 +Errore 4
 +
 +./src/examples/torus.cpp sostituire riga 155 con
 +<code>
 +    target_t a;
 + return a; 
 +</code>
 +
 +Errore 5
 +<code>
 +[ 12%] Building NVCC (Device) object src/nemo/cuda/CMakeFiles/nemo_cuda.dir//./nemo_cuda_generated_kernel.cu.o
 +/usr/lib/gcc/i686-linux-gnu/4.8/include/stddef.h(432): error: identifier "nullptr" is undefined
 +</code>
 +
 +infatti i file.cu vengono compilati con [[neurali:nvcc]] invece che gcc, ma come spiegato, qui devono essere separati i due codici...
 +
 +>> https://devtalk.nvidia.com/default/topic/745106/nvcc-c-11-standard-in-cuda-frontend-dependencies-gcc-windows-vs-linux-/
 +>> I believe the solution in Linux is to compile your cpp files separately with gcc >= 4.8.1 and have nvcc 
 +>> compile the cu files using gcc 4.7, assuming nvcc doesn't like 4.8.1 after removing the trestriction in the 
 +>> host_config.h file you mentioned.
 +
 +**Allora**
 +
 +per **non** usare CUDA, NVCC, ecc,.. commentare riga 14 ./src/nemo/config.h.in
 +
 +  /*#cmakedefine NEMO_CUDA_ENABLED*/
 +
 +Inoltre commentare anche riga 260 e 238 e 456 ./build/CMakeCache.txt:
 +
 +  NEMO_CUDA_ENABLED:BOOL=OFF
 +  CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE:BOOL=OFF
 +  NEMO_CUDA_ENABLED:BOOL=OFF
 +  
 +
 +  make install
 +
 +<code>
 +[  1%] Using existing manual
 +[  3%] Built target api-doc-latex
 +[ 41%] Built target nemo_base
 +[ 45%] Built target nemo_cpu
 +[ 47%] Using existing man pages
 +[ 49%] Built target api-doc-man
 +[ 54%] Built target nemo
 +[ 56%] Built target nemo-app
 +[ 60%] Built target kuramoto
 +[ 70%] Built target nemo_mpi_dist
 +[ 76%] Built target mpi_dist
 +[ 80%] Built target mpi_dist_general
 +[ 84%] Built target random
 +[ 88%] Built target torus
 +[ 90%] Built target IF_curr_exp_cpu
 +[ 92%] Built target Input_cpu
 +[ 94%] Built target Izhikevich_cpu
 +[ 96%] Built target Kuramoto_cpu
 +[ 98%] Built target PoissonSource_cpu
 +[100%] Built target nemo_py
 +Install the project...
 +-- Install configuration: ""
 +-- Installing: /usr/local/include/nemo.h
 +-- Installing: /usr/local/include/nemo.hpp
 +-- Installing: /usr/local/lib/libnemo.so
 +-- Set runtime path of "/usr/local/lib/libnemo.so" to "/usr/local/lib"
 +-- Installing: /usr/local/lib/libnemo_base.so
 +-- Set runtime path of "/usr/local/lib/libnemo_base.so" to "/usr/local/lib"
 +-- Installing: /usr/local/include/nemo/exception.hpp
 +-- Installing: /usr/local/include/nemo/types.h
 +-- Installing: /usr/local/include/nemo/Configuration.hpp
 +-- Installing: /usr/local/include/nemo/Network.hpp
 +-- Installing: /usr/local/include/nemo/Simulation.hpp
 +-- Installing: /usr/local/include/nemo/ReadableNetwork.hpp
 +-- Installing: /usr/local/include/nemo/config.h
 +-- Installing: /usr/local/lib/nemo/plugins/Input.ini
 +-- Installing: /usr/local/lib/nemo/plugins/PoissonSource.ini
 +-- Installing: /usr/local/lib/nemo/plugins/Izhikevich.ini
 +-- Installing: /usr/local/lib/nemo/plugins/IzhikevichRS.ini
 +-- Installing: /usr/local/lib/nemo/plugins/IF_curr_exp.ini
 +-- Installing: /usr/local/lib/nemo/plugins/Kuramoto.ini
 +-- Installing: /usr/local/lib/libnemo_cpu.so
 +-- Set runtime path of "/usr/local/lib/libnemo_cpu.so" to "/usr/local/lib"
 +-- Installing: /usr/local/lib/nemo/plugins/cpu/libInput.so
 +-- Set runtime path of "/usr/local/lib/nemo/plugins/cpu/libInput.so" to "/usr/local/lib"
 +-- Installing: /usr/local/lib/nemo/plugins/cpu/libPoissonSource.so
 +-- Set runtime path of "/usr/local/lib/nemo/plugins/cpu/libPoissonSource.so" to "/usr/local/lib"
 +-- Installing: /usr/local/lib/nemo/plugins/cpu/libIzhikevich.so
 +-- Set runtime path of "/usr/local/lib/nemo/plugins/cpu/libIzhikevich.so" to "/usr/local/lib"
 +-- Installing: /usr/local/lib/nemo/plugins/cpu/libIF_curr_exp.so
 +-- Set runtime path of "/usr/local/lib/nemo/plugins/cpu/libIF_curr_exp.so" to "/usr/local/lib"
 +-- Installing: /usr/local/lib/nemo/plugins/cpu/libKuramoto.so
 +-- Set runtime path of "/usr/local/lib/nemo/plugins/cpu/libKuramoto.so" to "/usr/local/lib"
 +-- Installing: /usr/local/share/nemo/python/_nemo.so
 +-- Set runtime path of "/usr/local/share/nemo/python/_nemo.so" to "/usr/local/lib"
 +-- Installing: /usr/local/share/nemo/python/nemo/__init__.py
 +-- Installing: /usr/local/share/nemo/python/example.py
 +-- Installing: /usr/local/share/nemo/python/test.py
 +-- Installing: /usr/local/share/nemo/python/setup.py
 +-- Installing: /Kuramoto/nemoCoupleOscillators.m
 +-- Installing: /Kuramoto/nemoGetPhase.m
 +-- Installing: /Kuramoto/example.m
 +-- Installing: /usr/local/bin/nemo
 +-- Set runtime path of "/usr/local/bin/nemo" to "/usr/local/lib"
 +-- Installing: /usr/local/share/nemo/examples/torus.cpp
 +-- Installing: /usr/local/share/nemo/examples/random.cpp
 +-- Installing: /usr/local/share/nemo/examples/mpi_dist.cpp
 +-- Installing: /usr/local/share/nemo/examples/common.cpp
 +-- Installing: /usr/local/share/nemo/examples/mpi_dist_general
 +-- Set runtime path of "/usr/local/share/nemo/examples/mpi_dist_general" to "/usr/local/lib"
 +-- Installing: /usr/local/share/nemo/examples/mpi_dist
 +-- Set runtime path of "/usr/local/share/nemo/examples/mpi_dist" to "/usr/local/lib"
 +-- Installing: /usr/local/share/nemo/examples/random
 +-- Set runtime path of "/usr/local/share/nemo/examples/random" to "/usr/local/lib"
 +-- Installing: /usr/local/share/nemo/examples/torus
 +-- Set runtime path of "/usr/local/share/nemo/examples/torus" to "/usr/local/lib"
 +-- Installing: /usr/local/include/mpi_dist/MasterSimulation.cpp
 +-- Installing: /usr/local/include/mpi_dist/MapperSim.cpp
 +-- Installing: /usr/local/include/mpi_dist/SimulationMPI.cpp
 +-- Installing: /usr/local/include/mpi_dist/WorkerSimulation.cpp
 +-- Installing: /usr/local/share/man/man3/nemo-c.3
 +-- Installing: /usr/local/share/man/man3/nemo_Network.3
 +-- Installing: /usr/local/share/man/man3/nemo_Simulation.3
 +-- Installing: /usr/local/share/man/man3/nemo_Configuration.3
 +-- Installing: /usr/local/share/man/man3/nemo.3
 +-- Installing: /usr/local/share/doc/nemo/manual.pdf
 +</code>
 +
 +A questo punto NeMo risulta compilato, ma senza CUDA
 +
 +poi pero' spikestream non funziona se NeMo non fornisce CUDA
neurali/nemo_output_compilazione.txt · Last modified: 2020/06/08 22:20 (external edit)