Skip to content

Commit

Permalink
resolving conflicts in merging from master; added GPU wrappers to fil…
Browse files Browse the repository at this point in the history
…es from master branch
  • Loading branch information
liuyangzhuan committed Dec 8, 2021
2 parents 098e96f + 7103e68 commit 93b721f
Show file tree
Hide file tree
Showing 253 changed files with 84,090 additions and 3,720 deletions.
31 changes: 31 additions & 0 deletions .ci_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/sh
set -e

export RED="\033[31;1m"
export BLUE="\033[34;1m"
export ROOT_DIR="$PWD"
printf "${BLUE} SLU; Entered tests file:\n"


export DATA_FOLDER=$ROOT_DIR/EXAMPLE
export EXAMPLE_FOLDER=$ROOT_DIR/build/EXAMPLE
export TEST_FOLDER=$ROOT_DIR/build/TEST

case "${TEST_NUMBER}" in
1) mpirun "-n" "1" --oversubscribe "$TEST_FOLDER/pdtest" "-r" "1" "-c" "1" "-s" "1" "-b" "2" "-x" "8" "-m" "20" "-f" "$DATA_FOLDER/g20.rua" ;;
2) mpirun "-n" "1" --oversubscribe "$TEST_FOLDER/pdtest" "-r" "1" "-c" "1" "-s" "3" "-b" "2" "-x" "8" "-m" "20" "-f" "$DATA_FOLDER/g20.rua" ;;
3) mpirun "-n" "3" --oversubscribe "$TEST_FOLDER/pdtest" "-r" "1" "-c" "3" "-s" "1" "-b" "2" "-x" "8" "-m" "20" "-f" "$DATA_FOLDER/g20.rua" ;;
4) mpirun "-n" "3" --oversubscribe "$TEST_FOLDER/pdtest" "-r" "1" "-c" "3" "-s" "3" "-b" "2" "-x" "8" "-m" "20" "-f" "$DATA_FOLDER/g20.rua" ;;
5) mpirun "-n" "2" --oversubscribe "$TEST_FOLDER/pdtest" "-r" "2" "-c" "1" "-s" "1" "-b" "2" "-x" "8" "-m" "20" "-f" "$DATA_FOLDER/g20.rua" ;;
6) mpirun "-n" "2" --oversubscribe "$TEST_FOLDER/pdtest" "-r" "2" "-c" "1" "-s" "3" "-b" "2" "-x" "8" "-m" "20" "-f" "$DATA_FOLDER/g20.rua" ;;
7) mpirun "-n" "6" --oversubscribe "$TEST_FOLDER/pdtest" "-r" "2" "-c" "3" "-s" "1" "-b" "2" "-x" "8" "-m" "20" "-f" "$DATA_FOLDER/g20.rua" ;;
8) mpirun "-n" "6" --oversubscribe "$TEST_FOLDER/pdtest" "-r" "2" "-c" "3" "-s" "3" "-b" "2" "-x" "8" "-m" "20" "-f" "$DATA_FOLDER/g20.rua" ;;
9) mpirun "-n" "4" --oversubscribe "$EXAMPLE_FOLDER/pddrive1" "-r" "2" "-c" "2" "$DATA_FOLDER/big.rua" ;;
10) mpirun "-n" "4" --oversubscribe "$EXAMPLE_FOLDER/pddrive2" "-r" "2" "-c" "2" "$DATA_FOLDER/big.rua" ;;
11) mpirun "-n" "4" --oversubscribe "$EXAMPLE_FOLDER/pddrive3" "-r" "2" "-c" "2" "$DATA_FOLDER/big.rua" ;;
12) mpirun "-n" "4" --oversubscribe "$EXAMPLE_FOLDER/pzdrive1" "-r" "2" "-c" "2" "$DATA_FOLDER/cg20.cua" ;;
13) mpirun "-n" "4" --oversubscribe "$EXAMPLE_FOLDER/pzdrive2" "-r" "2" "-c" "2" "$DATA_FOLDER/cg20.cua" ;;
14) mpirun "-n" "4" --oversubscribe "$EXAMPLE_FOLDER/pzdrive3" "-r" "2" "-c" "2" "$DATA_FOLDER/cg20.cua" ;;
15) mpirun "-n" "4" --oversubscribe "$EXAMPLE_FOLDER/pddrive_ABglobal" "-r" "2" "-c" "2" "$DATA_FOLDER/big.rua" ;;
*) printf "${RED} ###SLU: Unknown test\n" ;;
esac
97 changes: 97 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: Run Github CI tests.

on: [push, pull_request]

jobs:
test:
name: Build and test
runs-on: ubuntu-latest

strategy:
matrix:
compiler:
- gcc
test: [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install dependencies
run: |
export BLUE="\033[34;1m"
mkdir -p installDir
printf "${BLUE} SLU; Installing gcc-9 via apt\n"
sudo apt-get update
sudo apt-get install build-essential software-properties-common -y
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update
sudo apt-get install gcc-9 g++-9 -y
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9
export CXX="g++-9"
export CC="gcc-9"
printf "${BLUE} SLU; Done installing gcc-9 via apt\n"
printf "${BLUE} SLU; Installing gfortran via apt\n"
sudo apt-get install gfortran-9 -y
sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-9 60
printf "${BLUE} SLU; Done installing gfortran via apt\n"
printf "${BLUE} SLU; Installing openmpi\n"
sudo apt-get install openmpi-bin libopenmpi-dev
printf "${BLUE} SLU; Done installing openmpi\n"
printf "${BLUE} SLU; Installing BLASfrom apt\n"
sudo apt-get install libblas-dev
export BLAS_LIB=/usr/lib/libblas/libblas.so
printf "${BLUE} SLU; Done installing BLASfrom apt\n"
printf "${BLUE} SLU; Installing LAPACKfrom apt\n"
sudo apt-get install liblapack-dev
export LAPACK_LIB=/usr/lib/liblapack.so
printf "${BLUE} SLU; Done installing LAPACKfrom apt\n"
printf "${BLUE} SLU; Installing ParMetis-4.0 from source\n"
cd $GITHUB_WORKSPACE/installDir
wget http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/parmetis-4.0.3.tar.gz
tar -xf parmetis-4.0.3.tar.gz
cd parmetis-4.0.3/
mkdir -p install
make config shared=1 cc=mpicc cxx=mpic++ prefix=$PWD/install
make install > make_parmetis_install.log 2>&1
printf "${BLUE} SLU; Done installing ParMetis-4.0 from source\n"
- name: Install package
run: |
export BLUE="\033[34;1m"
printf "${BLUE} SLU; Installing superlu_dist from source\n"
cd $GITHUB_WORKSPACE
rm -rf build
mkdir -p build
cd build
cmake .. \
-DTPL_PARMETIS_INCLUDE_DIRS="$GITHUB_WORKSPACE/installDir/parmetis-4.0.3/metis/include;$GITHUB_WORKSPACE/installDir/parmetis-4.0.3/install/include" \
-DTPL_PARMETIS_LIBRARIES="$GITHUB_WORKSPACE/installDir/parmetis-4.0.3/install/lib/libparmetis.so" \
-DCMAKE_C_FLAGS="-std=c11 -DPRNTlevel=1 -DPROFlevel=1 -DDEBUGlevel=1" \
-DCMAKE_CXX_FLAGS="-Ofast -std=c++11 -DAdd_ -DRELEASE" \
-DTPL_BLAS_LIBRARIES="$BLAS_LIB" \
-DTPL_LAPACK_LIBRARIES="$LAPACK_LIB" \
-Denable_blaslib=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_C_COMPILER=mpicc \
-DCMAKE_CXX_COMPILER=mpic++ \
-DCMAKE_INSTALL_PREFIX=. \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF
make
make install
printf "${BLUE} SLU; Done installing superlu_dist from source\n"
- name: Test
run: |
cd $GITHUB_WORKSPACE
export TEST_NUMBER=${{ matrix.test }}
./.ci_tests.sh
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

# You have to ignore this generated file or git will complain that it is an
# unknown file!
/make.inc
make.inc

# If the instructions are telling people to create this build dir under the
# source tree, you had better put in an ignore for this.
#/build/*
build/*

# not to commit any changes to the following file
FORTRAN/superlu_dist_config.fh
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,4 @@ install:

script:
- cd $TRAVIS_BUILD_DIR
- ./.travis_tests.sh
- ./.ci_tests.sh
4 changes: 2 additions & 2 deletions CBLAS/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ endif()

add_library(blas ${sources} ${HEADERS})

install(TARGETS blas DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
install(FILES ${headers} DESTINATION ${CMAKE_INSTALL_PREFIX}/include)
install(TARGETS blas DESTINATION "${INSTALL_LIB_DIR}")
install(FILES ${headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
Loading

0 comments on commit 93b721f

Please sign in to comment.