the-data-lab / GraphOne

"GraphOne: A Data Store for Real-time Analytics on Evolving Graphs", Usenix FAST'19
GNU General Public License v3.0
58 stars 31 forks source link

Support -m32 compilation flag #14

Open ghost opened 4 years ago

ghost commented 4 years ago

Would you like to add this feature or give me an instruction to quick fix it if possible? Thank you very much.

pradeep-k commented 4 years ago

Can you paste your compilation log here?

ghost commented 4 years ago

It's not a really useful feature. If it takes time to achieve this then you don't need add this for me.

After apt install g++-7-multilib , export CXXFLAGS='-m32' , cmake .. and make, the output is below

Scanning dependencies of target src32
[  2%] Building CXX object src/CMakeFiles/src32.dir/cf_info.cpp.o
[  4%] Building CXX object src/CMakeFiles/src32.dir/enumkv.cpp.o
[  7%] Building CXX object src/CMakeFiles/src32.dir/graph.cpp.o
In file included from /mnt/d/graphone/onedata/graph_base.h:13:0,
                 from /mnt/d/graphone/src/sgraph.h:10,
                 from /mnt/d/graphone/src/graph.cpp:5:
/mnt/d/graphone/onedata/mem_pool.h: In member function ‘delta_adjlist_t<T>* thd_mem_t<T>::alloc_adjlist(degree_t, bool)’:
/mnt/d/graphone/onedata/mem_pool.h:108:43: error: no matching function for call to ‘max(long unsigned int, index_t&)’
    tmp = max(1UL << LOCAL_DELTA_SIZE, size);
                                           ^
In file included from /usr/include/c++/7/algorithm:62:0,
                 from /mnt/d/graphone/src/type.h:10,
                 from /mnt/d/graphone/src/graph.h:3,
                 from /mnt/d/graphone/src/graph.cpp:3:
/usr/include/c++/7/bits/stl_algo.h:3468:5: note: candidate: template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)
     max(initializer_list<_Tp> __l, _Compare __comp)
     ^~~
/usr/include/c++/7/bits/stl_algo.h:3468:5: note:   template argument deduction/substitution failed:
In file included from /mnt/d/graphone/onedata/graph_base.h:13:0,
                 from /mnt/d/graphone/src/sgraph.h:10,
                 from /mnt/d/graphone/src/graph.cpp:5:
/mnt/d/graphone/onedata/mem_pool.h:108:43: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘long unsigned int’
    tmp = max(1UL << LOCAL_DELTA_SIZE, size);
                                           ^
In file included from /usr/include/c++/7/algorithm:62:0,
                 from /mnt/d/graphone/src/type.h:10,
                 from /mnt/d/graphone/src/graph.h:3,
                 from /mnt/d/graphone/src/graph.cpp:3:
/usr/include/c++/7/bits/stl_algo.h:3462:5: note: candidate: template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)
     max(initializer_list<_Tp> __l)
     ^~~
/usr/include/c++/7/bits/stl_algo.h:3462:5: note:   template argument deduction/substitution failed:
In file included from /mnt/d/graphone/onedata/graph_base.h:13:0,
                 from /mnt/d/graphone/src/sgraph.h:10,
                 from /mnt/d/graphone/src/graph.cpp:5:
/mnt/d/graphone/onedata/mem_pool.h:108:43: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘long unsigned int’
    tmp = max(1UL << LOCAL_DELTA_SIZE, size);
                                           ^
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
                 from /usr/include/c++/7/string:40,
                 from /mnt/d/graphone/src/type.h:4,
                 from /mnt/d/graphone/src/graph.h:3,
                 from /mnt/d/graphone/src/graph.cpp:3:
/usr/include/c++/7/bits/stl_algobase.h:265:5: note: candidate: template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^~~
/usr/include/c++/7/bits/stl_algobase.h:265:5: note:   template argument deduction/substitution failed:
In file included from /mnt/d/graphone/onedata/graph_base.h:13:0,
                 from /mnt/d/graphone/src/sgraph.h:10,
                 from /mnt/d/graphone/src/graph.cpp:5:
/mnt/d/graphone/onedata/mem_pool.h:108:43: note:   deduced conflicting types for parameter ‘const _Tp’ (‘long unsigned int’ and ‘index_t {aka long long unsigned int}’)
    tmp = max(1UL << LOCAL_DELTA_SIZE, size);
                                           ^
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
                 from /usr/include/c++/7/string:40,
                 from /mnt/d/graphone/src/type.h:4,
                 from /mnt/d/graphone/src/graph.h:3,
                 from /mnt/d/graphone/src/graph.cpp:3:
/usr/include/c++/7/bits/stl_algobase.h:219:5: note: candidate: template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)
     max(const _Tp& __a, const _Tp& __b)
     ^~~
/usr/include/c++/7/bits/stl_algobase.h:219:5: note:   template argument deduction/substitution failed:
In file included from /mnt/d/graphone/onedata/graph_base.h:13:0,
                 from /mnt/d/graphone/src/sgraph.h:10,
                 from /mnt/d/graphone/src/graph.cpp:5:
/mnt/d/graphone/onedata/mem_pool.h:108:43: note:   deduced conflicting types for parameter ‘const _Tp’ (‘long unsigned int’ and ‘index_t {aka long long unsigned int}’)
    tmp = max(1UL << LOCAL_DELTA_SIZE, size);
                                           ^
src/CMakeFiles/src32.dir/build.make:110: recipe for target 'src/CMakeFiles/src32.dir/graph.cpp.o' failed
make[2]: *** [src/CMakeFiles/src32.dir/graph.cpp.o] Error 1
CMakeFiles/Makefile2:165: recipe for target 'src/CMakeFiles/src32.dir/all' failed
make[1]: *** [src/CMakeFiles/src32.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
pradeep-k commented 4 years ago

Try changing the type of index_t in src/type.h to unsigned long int, due to this error: deduced conflicting types for parameter ‘const _Tp’ (‘long unsigned int’ and ‘index_t {aka long long unsigned int}’)

I am not facing this error during compilation in my system based on your commands.

ghost commented 4 years ago

Other errors show, I think it is not easy to fix. Thank you for your advice.

Scanning dependencies of target src32
[  2%] Building CXX object src/CMakeFiles/src32.dir/cf_info.cpp.o
[  4%] Building CXX object src/CMakeFiles/src32.dir/enumkv.cpp.o
[  7%] Building CXX object src/CMakeFiles/src32.dir/graph.cpp.o
[  9%] Building CXX object src/CMakeFiles/src32.dir/prop_encoder.cpp.o
[ 11%] Building CXX object src/CMakeFiles/src32.dir/sgraph.cpp.o
[ 14%] Building CXX object src/CMakeFiles/src32.dir/stringkv.cpp.o
[ 16%] Building CXX object src/CMakeFiles/src32.dir/typekv.cpp.o
[ 19%] Linking CXX static library libsrc32.a
[ 19%] Built target src32
Scanning dependencies of target test32
[ 21%] Building CXX object test/CMakeFiles/test32.dir/csv_to_edge.cpp.o
[ 23%] Building CXX object test/CMakeFiles/test32.dir/lanl15_test.cpp.o
In file included from /mnt/d/graphone/test/lanl15_test.cpp:12:0:
/mnt/d/graphone/test/util.h: In function ‘index_t upper_power_of_two(index_t)’:
/mnt/d/graphone/test/util.h:20:15: warning: right shift count >= width of type [-Wshift-count-overflow]
     v |= v >> 32;
               ^~
[ 26%] Building CXX object test/CMakeFiles/test32.dir/multi_graph.cpp.o
In file included from /mnt/d/graphone/test/multi_graph.h:13:0,
                 from /mnt/d/graphone/test/multi_graph.cpp:2:
/mnt/d/graphone/test/util.h: In function ‘index_t upper_power_of_two(index_t)’:
/mnt/d/graphone/test/util.h:20:15: warning: right shift count >= width of type [-Wshift-count-overflow]
     v |= v >> 32;
               ^~
[ 28%] Building CXX object test/CMakeFiles/test32.dir/multigraph_test.cpp.o
In file included from /mnt/d/graphone/test/multigraph_test.cpp:4:0:
/mnt/d/graphone/test/util.h: In function ‘index_t upper_power_of_two(index_t)’:
/mnt/d/graphone/test/util.h:20:15: warning: right shift count >= width of type [-Wshift-count-overflow]
     v |= v >> 32;
               ^~
[ 30%] Building CXX object test/CMakeFiles/test32.dir/nt_to_edge.cpp.o
[ 33%] Building CXX object test/CMakeFiles/test32.dir/plaingraph_test.cpp.o
In file included from /mnt/d/graphone/test/plain_to_edge.h:12:0,
                 from /mnt/d/graphone/test/plaingraph_test.cpp:3:
/mnt/d/graphone/test/util.h: In function ‘index_t upper_power_of_two(index_t)’:
/mnt/d/graphone/test/util.h:20:15: warning: right shift count >= width of type [-Wshift-count-overflow]
     v |= v >> 32;
               ^~
In file included from /mnt/d/graphone/test/plaingraph_test.cpp:3:0:
/mnt/d/graphone/test/plain_to_edge.h: In instantiation of ‘void plaingraph_manager_t<T>::split_files(const string&, const string&) [with T = dst_weight_t<__univeral_type>; std::__cxx11::string = std::__cxx11::basic_string<char>]’:
/mnt/d/graphone/test/plaingraph_test.cpp:758:5:   required from ‘void split_files(const string&, const string&) [with T = dst_weight_t<__univeral_type>; std::__cxx11::string = std::__cxx11::basic_string<char>]’
/mnt/d/graphone/test/plaingraph_test.cpp:1349:49:   required from here
/mnt/d/graphone/test/plain_to_edge.h:301:16: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘index_t {aka long unsigned int}’ [-Wformat=]
         sprintf(tmp, "%d.dat", residue);
         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/mnt/d/graphone/test/plaingraph_test.cpp: In function ‘double qthread_doubleincr(double*, double)’:
/mnt/d/graphone/test/plaingraph_test.cpp:51:44: error: inconsistent operand constraints in an ‘asm’
                                 : "memory");
                                            ^
test/CMakeFiles/test32.dir/build.make:182: recipe for target 'test/CMakeFiles/test32.dir/plaingraph_test.cpp.o' failed
make[2]: *** [test/CMakeFiles/test32.dir/plaingraph_test.cpp.o] Error 1
CMakeFiles/Makefile2:353: recipe for target 'test/CMakeFiles/test32.dir/all' failed
make[1]: *** [test/CMakeFiles/test32.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
pradeep-k commented 4 years ago

I am keeping this open, so that I can fix it when time permits.