sfu-dis / corobase

Coroutine-Oriented Main-Memory Database Engine (VLDB 2021)
MIT License
245 stars 30 forks source link

compiling issue #1

Closed zhouqingqing closed 4 years ago

zhouqingqing commented 4 years ago

Command to build:

 CC=clang CXX=clang++ cmake ../ -DCMAKE_BUILD_TYPE=release

temp5@temp5-Precision-3630-Tower:~/source/corobase/build$ clang++ --version
clang version 6.0.1-svn334776-1~exp1~20190309042730.123 (branches/release_60)

I installed the following libs:

However, I still see error:

/home/temp5/source/corobase/dbcore/sm-coroutine.h:241:32: error: no member named 'noop_coroutine' in namespace 'std::experimental'
            std::experimental::noop_coroutine());
            ~~~~~~~~~~~~~~~~~~~^
wangtzh commented 4 years ago

Try clang 9? We've been using that.

YongjunHe commented 4 years ago

std::experimental::noop_coroutine() needs a high version of the libc++(>=8 should be fine.)

wangtzh commented 4 years ago

@YongjunHe Might be a good idea to update README with these new updates.

YongjunHe commented 4 years ago

@YongjunHe Might be a good idea to update README with these new updates.

Sure. I will update many places of the README and CMakeLists.txt in the first week of June.

wangtzh commented 4 years ago

@YongjunHe Might be a good idea to update README with these new updates.

Sure. I will update many places of the README and CMakeLists.txt in the first week of June.

I.e., June 1st 5pm before we flip to to become public.

zhouqingqing commented 4 years ago

ok, I got it built,

Add more libs:

To install clang 9.0, followed instructions here: https://justiceboi.github.io/blog/install-clang-9-on-ubuntu/

Build:

CC=clang CXX=clang++ cmake ../ -DCMAKE_BUILD_TYPE=Release

qingqing@fatty-unicorn:~/corobase/build$ clang --version
clang version 9.0.0 (tags/RELEASE_900/final)
zhouqingqing commented 4 years ago

run error:

qingqing@fatty-unicorn:~/corobase/build$ ./run.sh ./ermia_adv_coro_SI tpcc 2 2 10
logbuf_mb is unset, using 128
./ermia_adv_coro_SI -verbose=1 -benchmark tpcc -threads 2 -scale_factor 2 -seconds 10 -log_data_dir /dev/shm/qingqing/ermia-log -log_buffer_mb=128 -log_segment_mb=16384 -parallel_loading
PID: 17421
F0519 23:02:40.921600 17421 sm-thread.cpp:141]
*** Check failure stack trace: ***
    @     0x7fe109333c5c  (unknown)
    @     0x7fe0dc86513f  (unknown)
    @           0x407ffe  (unknown)
    @     0x7fe0dbbf1b97  (unknown)
    @           0x4073da  (unknown)
    @              (nil)  (unknown)
./run.sh: line 70: 17421 Aborted                 (core dumped) $options -benchmark_options "--workload-mix="45,43,0,4,4,4,0,0" --warehouse-spread=$wh_spread $2"
qingqing@fatty-unicorn:~/corobase/build$

sm-thread.cpp:141:

  bool detected = thread::DetectCPUCores();
  LOG_IF(FATAL, !detected);

Well, I am using window 10's WSL - is that causing problem?

wangtzh commented 4 years ago

Ah, I'd suggest using Linux. We never tried WSL or Cygwin - at least to detect CPU/NUMA topology we need a real /proc, which probably WSL doesn't give? The current version also needs hugepage support. Pretty much everything is strongly Linux-ish.

wangtzh commented 4 years ago

BTW "adv" version is the nested implementation, where switching is quite heavy because of deep coroutine call chains. The other "simple" variant is the 2-level version that only uses two levels, one for the transaction logic, one for the rest (e.g., the read call is a single big flattened coroutine) to reduce switching overhead.

wangtzh commented 4 years ago

@zhouqingqing Here's some sample parameters for YCSB-C read-only that only does index probing.

Sequential (baseline): ./run.sh ./ermia_SI ycsb 10 48 20 "-physical_workers_only=1 -index_probe_only=1 -node_memory_gb=75" "-w C -r 10 -s 1000000000 -t sequential"

AMAC: ./run.sh ./ermia_SI ycsb 10 48 20 "-physical_workers_only=1 -index_probe_only=1 -node_memory_gb=75" "-w C -r 10 -s 1000000000 -t multiget-amac"

2-level coroutine: ./run.sh ./ermia_SI ycsb 10 48 20 "-physical_workers_only=1 -index_probe_only=1 -node_memory_gb=75" "-w C -r 10 -s 1000000000 -t multiget-simple-coro"

N-leve coroutine: ./run.sh ./ermia_coro_SI ycsb 10 48 20 "-physical_workers_only=1 -index_probe_only=1 -node_memory_gb=75 -coro_tx=1" "-w C -r 10 -s 1000000000 -t multiget-adv-coro"

YongjunHe commented 4 years ago

@zhouqingqing @wangtzh With the below instructions, users can build CoroBase in an AWS Ubuntu EC2 instance easily now. I added them to README.

apt-get update
apt-get install -y cmake clang-8 libc++-8-dev libc++abi-8-dev
apt-get install -y libnuma-dev libibverbs-dev libgflags-dev libgoogle-glog-dev