/Test-definitions/blob/master/auto-test/linpack. sh, bloblinpack
/Test-definitions/blob/master/auto-test/linpack. sh
#! /Bin/sh-eset-xcd.../utils.../sh-test-lib ../sys_info.shcd-ARRAY_SIZE = "200" # Run Test. # detect_abiwget https://www.netlib.org/benchmark/linpackc.newprint_info $? Wget-linpackc # download linpackc. change new to linpackc.. new linpack. c # for compiling c source files, different releases need to install different packages case $ distro in "centos") yum install glibc-static-y yum install gcc-y print_info $? Install-package; "ubuntu | debian") apt-get install gcc-y apt-get install buid-essential-y apt-get install glibc-source-y print_info $? Install-packageesac # compile and generate the executable file gcc-O3-static-o linpack. c-lm # lm indicates link libmp rint_info $? Gcc-linpack # execute the file and redirect the log to the file # shellcheck disable = SC2154 (echo "$ {ARRAY_SIZE}"; echo "q") \ |. /linpack 2> & 1 \ | tee-a linpack. logprint_info $? Run-linpack # Parse output. # locate and kill the process by name. In fact, you can use pkill to replace count = 'ps-aux | grep linpack | wc-l' if [$ count-gt 0]; then kill-9 $ (pidof linpack) print_info $? Kill-linpackfi # Delete the previously installed package case $ distro in "centos") yum remove glibc-static-y yum remove gcc-y print_info $? Remove-package; "ubuntu") apt-get remove gcc-y apt-get remove glibc-source-y apt-get remove buid-essential-y print_info $? Remove-package; esac