diff --git a/flex/src/bashly.yml b/flex/src/bashly.yml deleted file mode 100644 index d67ad22c46ed..000000000000 --- a/flex/src/bashly.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: flexbuild -help: Utility script to build artifacts for GraphScope Flex -version: 0.1.0 - -# environment_variables: -# - name: api_key -# help: Set your API key - -args: -- name: components - help: Components (LEGO bricks) to include and link - allowed: [cppsp, builtin, hiactor, gaia, grape-cpu, grape-gpu, vineyard, mcsr, gnnmodels, graphlearn, tensorflow] - required: true - repeatable: true - -flags: -- long: --app - short: -a - arg: atype - required: true - allowed: [db, olap, ldbcdriver, gnn] - help: Application type - -- long: --output_dir - short: -o - help: Output prefix - arg: name - default: . - -examples: -- ./flexbuild cppsp hiactor mcsr --app db --output_dir ./output -- ./flexbuild builtin grape-cpu --app olap -- ./flexbuild builtin grape-gpu --app ldbcdriver diff --git a/flex/src/initialize.sh b/flex/src/initialize.sh deleted file mode 100644 index 868d376707f7..000000000000 --- a/flex/src/initialize.sh +++ /dev/null @@ -1,6 +0,0 @@ -## Code here runs inside the initialize() function -## Use it for anything that you need to run before any other function, like -## setting environment variables: -## CONFIG_FILE=settings.ini -## -## Feel free to empty (but not delete) this file. diff --git a/flex/src/root_command.sh b/flex/src/root_command.sh deleted file mode 100644 index 6dbf6118ccfc..000000000000 --- a/flex/src/root_command.sh +++ /dev/null @@ -1,131 +0,0 @@ -# echo "# this file is located in 'src/root_command.sh'" -# echo "# you can edit it freely and regenerate (it will not be overwritten)" -# inspect_args - -function build_grape_cpu { - target_name=$1 - - tmp_dir=`mktemp -d` - pushd ${tmp_dir} > /dev/null - cmake_options="" - # if [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then - if [[ $(uname -s) == Linux* ]];then - # Do something under GNU/Linux platform - if grep -q avx512 /proc/cpuinfo; then - cmake_options="${cmake_options} -DUSE_SIMD=ON" - fi - if grep -q HugePages_Total /proc/meminfo; then - hpn=`grep HugePages_Total /proc/meminfo | cut -d ':' -f 2` - if [[ $hpn -gt 0 ]]; then - cmake_options="${cmake_options} -DUSE_HUGEPAGES=ON" - fi - fi - fi - cmd="git clone https://github.com/alibaba/libgrape-lite.git && cd libgrape-lite && git submodule update --init --recursive && mkdir build && cd build && cmake ${cmake_options} .. && make analytical_apps -j && mv run_app ${target_name}" - echo $cmd - eval $cmd - popd > /dev/null -} - -function build_grape_gpu { - target_name=$1 - if nvidia-smi &> /dev/null; then - tmp_dir=`mktemp -d` - pushd ${tmp_dir} > /dev/null - cmd="git clone https://github.com/alibaba/libgrape-lite.git && cd libgrape-lite && git submodule update --init --recursive && mkdir build && cd build && cmake .. && make gpu_analytical_apps -j && mv run_cuda_app ${target_name}" - echo $cmd - eval $cmd - popd > /dev/null - else - echo "Building libgrape-gpu failed: GPU is not found" - fi -} - -function build_grape_ldbc_driver { - package_name=$1 - - tmp_dir=`mktemp -d` - pushd ${tmp_dir} > /dev/null - cmd="git clone https://github.com/alibaba/libgrape-lite.git && cd libgrape-lite/ldbc_driver/ && mvn package && mv graphalytics-*-bin.tar.gz ${package_name}" - echo $cmd - eval $cmd - popd > /dev/null -} - -SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) - -ars=() - -output_dir=`realpath ${args[--output_dir]}` -mkdir -p ${output_dir} - -if [ ${args[--app]} == "db" ]; then - package_name="graphscope_flex_${args[--app]}" - comps="" - eval "comps=(${args[components]})" - for i in "${comps[@]}"; do - package_name="${package_name}_${i}" - done - build_dir=`mktemp -d` - pushd $build_dir > /dev/null - cmd="cmake -DCPACK_PACKAGE_NAME=${package_name} ${SCRIPT_DIR} && make -j && make package && mv ${package_name}*.deb ${output_dir}/" - echo $cmd - eval $cmd - fname=`ls ${output_dir}/*.deb` - ars+=("${fname}") - popd > /dev/null -elif [ ${args[--app]} == "olap" ]; then - target_name="graphscope_flex_${args[--app]}" - comps="" - eval "comps=(${args[components]})" - for i in "${comps[@]}"; do - target_name="${target_name}_${i}" - done - if [[ " ${comps[*]} " =~ " grape-cpu " ]]; then - build_grape_cpu ${output_dir}/${target_name} - elif [[ " ${comps[*]} " =~ " grape-gpu " ]]; then - build_grape_gpu ${output_dir}/${target_name} - fi - ars+=("${target_name}") -elif [ ${args[--app]} == "ldbcdriver" ]; then - target_name="graphscope_flex_olap" - comps="" - eval "comps=(${args[components]})" - for i in "${comps[@]}"; do - target_name="${target_name}_${i}" - done - if [[ " ${comps[*]} " =~ " grape-cpu " ]]; then - build_grape_cpu ${output_dir}/${target_name} - elif [[ " ${comps[*]} " =~ " grape-gpu " ]]; then - build_grape_gpu ${output_dir}/${target_name} - fi - - package_name="graphscope_flex_ldbcdriver" - for i in "${comps[@]}"; do - package_name="${package_name}_${i}" - done - package_name="${package_name}-SNAPSHOT-bin.tar.gz" - - build_grape_ldbc_driver ${output_dir}/${package_name} - ars+=("${package_name}") - -elif [ ${args[--app]} == "gnn" ]; then - target_name="graphscope_flex_gnn_gnnmodels_graphlearn_tensorflow_vineyard" - pushd ${SCRIPT_DIR}/../ > /dev/null - make learning - mv learning_engine/graph-learn/graphlearn/built/lib/libgraphlearn_shared* ${output_dir}/ - fname=`ls ${output_dir}/libgraphlearn_shared*` - ext="${fname##*.}" - mv ${fname} ${output_dir}/${target_name}.${ext} - ars+=("${target_name}.${ext}") - popd > /dev/null -else - echo "$(red Unsupported composition: ${args[--app]} and ${args[components]})" -fi - -echo "$(green_bold GraphScope Flex artifacts for customized deployment are built.)" -echo -echo "artifacts: " -for x in "${ars[@]}"; do - echo "$(green $x)" -done