Closed KK666-AI closed 7 years ago
Hi there, I think you need to add tbb's include and lib dirs into environment variables.
Typically you only need to put the following line in your .bashrc:
source /opt/intel/parallel_studio_xe_{replace_with_your_version}/bin/psxevars.h
The above line should solve most of the problems.
I've also added a line which manually include tbb's headers in Makefile: https://github.com/Hanjun-Dai/graphnn/commit/b71ee43eb14d7c714b10f00a3473f724c8ac86da
Let me know if that solves your problem.
I follow your suggestion, but in my folder "/opt/intel/parallel_studio_xe_2017.4.056/bin", there are only psxevars.sh and psxevars.csh, without psxevars.h. i use 'sudo find . -name tbb.h' cannot find tbb.h file. So I try to download "tbb2017_20170604oss" from https://github.com/01org/tbb/releases, then I add "tbb2017_20170604oss/lib" and "tbb2017_20170604oss/lib/intel64" into LD_LIBRARY_PATH, add "tbb2017_20170604oss/bin:/opt/intel/parallel_studio_xe_2017/bin" into PATH, BUT I STILL CANNOT run your example.
BTW, follow the tutorial in https://github.com/Hanjun-Dai/graphnn, i modify configurations in make_common file like below, i can build the graphnn. Could your give me a brief tutorial for how to fix the tbb.h error, and run your example graph_classification? dir_guard = @mkdir -p $(@D)
CUDA_HOME := /usr/local/cuda INTEL_ROOT := /opt/intel MKL_ROOT = $(INTEL_ROOT)/mkl TBB_ROOT = /home/aliant/Downloads/tbb2017_20170604oss USE_GPU = 1
FIND := find CXX := g++ NVCC := $(CUDA_HOME)/bin/nvcc NVCCFLAGS += --default-stream per-thread CXXFLAGS += -Wall -O3 -std=c++11 LDFLAGS += -lm -L$(CUDA_HOME)/lib64 -lcudart -lcublas -lcurand -lcusparse -lmkl_rt -ltbb -lfmt CUDA_ARCH := -gencode arch=compute_30,code=sm_30 \ -gencode arch=compute_35,code=sm_35 \ -gencode arch=compute_50,code=sm_50 \ -gencode arch=compute_50,code=compute_50
finally, i fix this error. anyway, thanks a lot.
That's great! Sorry about the confusion.
I'll close the issue.
Hi Hanjun-Dai and lihuiknight, I meet the same problem, an error like "src/nn/row_selection.cpp:3:21: fatal error: tbb/tbb.h: No such file or directory", I think it should be version problem, because I install the 2020-version mkl and find that there is no "tbb.h" in this version, I also checked that with a 'find' command and find no "tbb.h" there. I also followed the link supplied by lihuiknight to fix this problem, but there is still some problem when I try to use 'make' to compile the codes. Can you guys give me suggestions about that? Thanks!
BTW, my OS is Ubuntu18.04, my mkl is 2020 version, almost all environments are the latest version
Hi,
The MKL should be just part of the parallel studio package of Inter. You need to additionally install tbb as well (or simply install the full parallel studio).
Sure...I will try to do that. I have applied for the parallel_studio_xe which will be available some days later. I also installed tbb additionally. Generally speaking … I can compile "graphnn" now … that means, there is no error in the process, but there are a lot of warnings like " void mkl_dcsrmm(...) is deprecated", just like below:
" warning: ‘void mkl_dcsrmm(const char, const int, const int, const int, const double, const char, const double, const int, const int, const int, const double, const int, const double, double, const int*)’ is deprecated "
Does this warning matter? Besides, I have no GPU in my computer...so I set USE_GPU = 0 and find that there are still some errors related to GPU and cuda... I guess some functions related to GPU are still compiled in the process ... so I want to know have you ever tried to compile the "graphnn" by setting USE_GPU=0? Thanks~~
You need to set USE_GPU = 0 in both Makefile : the library one and the one for each executable (e.g., MNIST)
Sure...I have set USE_GPU = 0 in both Makefile and the running result of my MNIST is following:
root@VirtualBox:/home/graphnn-master/examples/mnist# ./run.sh
60000 images for training
10000 images for test
testing
test loss: 2.5660 error rate: 0.8463
testing
test loss: 0.1245 error rate: 0.0405
testing
test loss: 0.1085 error rate: 0.0325
testing
test loss: 0.0921 error rate: 0.0285
testing
test loss: 0.0799 error rate: 0.0237
testing
test loss: 0.0693 error rate: 0.0203
testing
test loss: 0.0697 error rate: 0.0197
testing
test loss: 0.0727 error rate: 0.0206
testing
test loss: 0.0672 error rate: 0.0180
testing
test loss: 0.0648 error rate: 0.0178
Assertion pt_info.count(id)
failed in src/util/mem_holder.cpp line 45: recycling a pointer which is not allocated by me
./build/mnist(+0x39a73)[0x564c893dca73]
./build/mnist(+0xbfca)[0x564c893aefca]
./build/mnist(+0xed1c)[0x564c893b1d1c]
/lib/x86_64-linux-gnu/libc.so.6(+0x43041)[0x7ff2e4e76041]
/lib/x86_64-linux-gnu/libc.so.6(+0x4313a)[0x7ff2e4e7613a]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xee)[0x7ff2e4e54b9e]
./build/mnist(+0xbd3a)[0x564c893aed3a]
terminate called without an active exception
Do you think it is normal or not? Thanks!
Besides, for the example of 'graph_classification', I have also set USE_GPU = 0 in both Makefile but there are still some errors related to GPU when I tried to make it, just as follow:
include/nn_common.h:32:22: error: cannot declare variable ‘input’ to be of abstract type ‘gnn::TensorTemplate<gnn::GPU, gnn::DENSE, float>’
nclude/nn_common.h:33:23: error: cannot declare variable ‘label’ to be of abstract type ‘gnn::TensorTemplate<gnn::GPU, gnn::CSR_SPARSE, float>’
include/nn_common.h:101:8: error: ‘gnn::DTensor<gnn::GPU, float> {aka class gnn::TensorTemplate<gnn::GPU, gnn::DENSE, float>}’ has no member named ‘CopyFrom’
src/kernel_mean_field.cpp:19:15: error: ‘gnn::DTensor<gnn::GPU, float> {aka class gnn::TensorTemplate<gnn::GPU, gnn::DENSE, float>}’ has no member named ‘SetRandN’
src/kernel_mean_field.cpp:32:59: error: no matching function for call to ‘af<template<class mode, class Dtype> class gnn::ReLU>(gnn::FactorGraph&,
What do you suggest? Thanks!
hi, when i make your latest version code, i meet an error like:"src/nn/row_selection.cpp:3:21: fatal error: tbb/tbb.h: No such file or directory". So i want to ask you, which version of tbb do you used? could you give me the installation tutorial?