Skip to content

Commit

Permalink
ocl: removed unused scripts and updated remaining license banners
Browse files Browse the repository at this point in the history
* Script to run FAILED cases denoted by the given logfile.
* Fixed remaining license banners (BSD-3-Clause).
* Added license banner for Python scripts.
* Check Bash scripts for license banner.
* Removed outdated or unused scripts.
* Updated LIBXSMM (Daint-CI).
  • Loading branch information
hfp committed Jul 9, 2024
1 parent a2fea06 commit c177674
Show file tree
Hide file tree
Showing 23 changed files with 131 additions and 66 deletions.
8 changes: 8 additions & 0 deletions .ci/daint.cscs.ch/cray.build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#!/bin/bash -l
####################################################################################################
# Copyright (C) by the DBCSR developers group - All rights reserved #
# This file is part of the DBCSR library. #
# #
# For information on the license, see the LICENSE file. #
# For further information please visit https://dbcsr.cp2k.org #
# SPDX-License-Identifier: GPL-2.0+ #
####################################################################################################

#SBATCH --export=ALL
#SBATCH --constraint="mc"
Expand Down
8 changes: 8 additions & 0 deletions .ci/daint.cscs.ch/cray.test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#!/bin/bash -l
####################################################################################################
# Copyright (C) by the DBCSR developers group - All rights reserved #
# This file is part of the DBCSR library. #
# #
# For information on the license, see the LICENSE file. #
# For further information please visit https://dbcsr.cp2k.org #
# SPDX-License-Identifier: GPL-2.0+ #
####################################################################################################

#SBATCH --export=ALL
#SBATCH --constraint="gpu"
Expand Down
8 changes: 8 additions & 0 deletions .ci/daint.cscs.ch/gnu.build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#!/bin/bash -l
####################################################################################################
# Copyright (C) by the DBCSR developers group - All rights reserved #
# This file is part of the DBCSR library. #
# #
# For information on the license, see the LICENSE file. #
# For further information please visit https://dbcsr.cp2k.org #
# SPDX-License-Identifier: GPL-2.0+ #
####################################################################################################

#SBATCH --export=ALL
#SBATCH --constraint="mc"
Expand Down
8 changes: 8 additions & 0 deletions .ci/daint.cscs.ch/gnu.test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#!/bin/bash -l
####################################################################################################
# Copyright (C) by the DBCSR developers group - All rights reserved #
# This file is part of the DBCSR library. #
# #
# For information on the license, see the LICENSE file. #
# For further information please visit https://dbcsr.cp2k.org #
# SPDX-License-Identifier: GPL-2.0+ #
####################################################################################################

#SBATCH --export=ALL
#SBATCH --constraint="gpu"
Expand Down
8 changes: 8 additions & 0 deletions .ci/daint.cscs.ch/intel.build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#!/bin/bash -l
####################################################################################################
# Copyright (C) by the DBCSR developers group - All rights reserved #
# This file is part of the DBCSR library. #
# #
# For information on the license, see the LICENSE file. #
# For further information please visit https://dbcsr.cp2k.org #
# SPDX-License-Identifier: GPL-2.0+ #
####################################################################################################

#SBATCH --export=ALL
#SBATCH --constraint="mc"
Expand Down
8 changes: 8 additions & 0 deletions .ci/daint.cscs.ch/intel.test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#!/bin/bash -l
####################################################################################################
# Copyright (C) by the DBCSR developers group - All rights reserved #
# This file is part of the DBCSR library. #
# #
# For information on the license, see the LICENSE file. #
# For further information please visit https://dbcsr.cp2k.org #
# SPDX-License-Identifier: GPL-2.0+ #
####################################################################################################

#SBATCH --export=ALL
#SBATCH --constraint="gpu"
Expand Down
10 changes: 9 additions & 1 deletion .ci/daint.cscs.ch/ocl.build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#!/bin/bash -l
####################################################################################################
# Copyright (C) by the DBCSR developers group - All rights reserved #
# This file is part of the DBCSR library. #
# #
# For information on the license, see the LICENSE file. #
# For further information please visit https://dbcsr.cp2k.org #
# SPDX-License-Identifier: GPL-2.0+ #
####################################################################################################

#SBATCH --export=ALL
#SBATCH --constraint="mc"
Expand Down Expand Up @@ -27,7 +35,7 @@ if [ ! -d "${HOME}/libxsmm" ]; then
fi
cd "${HOME}/libxsmm"
git fetch
git checkout 2fe2b1a7077ddfbc9ab3b3f7ba1f5a45d52549cb
git checkout d009b33e8742a93c9e1549323587fb6197451294
make -j
cd ..

Expand Down
8 changes: 8 additions & 0 deletions .ci/daint.cscs.ch/ocl.test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#!/bin/bash -l
####################################################################################################
# Copyright (C) by the DBCSR developers group - All rights reserved #
# This file is part of the DBCSR library. #
# #
# For information on the license, see the LICENSE file. #
# For further information please visit https://dbcsr.cp2k.org #
# SPDX-License-Identifier: GPL-2.0+ #
####################################################################################################

#SBATCH --export=ALL
#SBATCH --constraint="gpu"
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit/check_header.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@

TYPES = {
"c_cpp": [".c", ".h", ".cc", ".hh", ".cxx", ".hxx", ".cpp", ".hpp", ".cu", ".cl"],
"python": [".py"],
"fypp": [".fypp"],
"fortran": [".F", ".f", ".f90", ".f03"],
"script": [".py", ".sh"],
"fypp": [".fypp"],
}

# max number of lines allowed between header and top of file
Expand Down
8 changes: 8 additions & 0 deletions .pre-commit/clang-format-fypp.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#!/usr/bin/env bash
####################################################################################################
# Copyright (C) by the DBCSR developers group - All rights reserved #
# This file is part of the DBCSR library. #
# #
# For information on the license, see the LICENSE file. #
# For further information please visit https://dbcsr.cp2k.org #
# SPDX-License-Identifier: GPL-2.0+ #
####################################################################################################

# clang-format change FYPP directives, need to revert the changes.

Expand Down
File renamed without changes.
20 changes: 1 addition & 19 deletions src/acc/acc_makedep.sh → .pre-commit/headers/script.2
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,26 +1,8 @@
#!/usr/bin/env bash
####################################################################################################
# Copyright (C) by the DBCSR developers group - All rights reserved #
# This file is part of the DBCSR library. #
# #
# For information on the license, see the LICENSE file. #
# For further information please visit https://dbcsr.cp2k.org #
# SPDX-License-Identifier: GPL-2.0+ #
# SPDX-License-Identifier: BSD-3-Clause #
####################################################################################################

FILE=$1
VAL=$2

if [ "${FILE}" ]; then
if [ ! -e "${FILE}" ] || [ "$(cat "${FILE}")" != "${VAL}" ]; then
echo "${VAL}" >"${FILE}"
fi
echo "${FILE}"
else
echo "Usage: $0 filename [value]"
echo " The content of the file will be updated with the value"
echo " if the value is different than the current value."
echo " This suitable to form a Makefile dependency."
fi


2 changes: 1 addition & 1 deletion src/acc/acc.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* */
/* For information on the license, see the LICENSE file. */
/* For further information please visit https://dbcsr.cp2k.org */
/* SPDX-License-Identifier: GPL-2.0+ */
/* SPDX-License-Identifier: BSD-3-Clause */
/*------------------------------------------------------------------------------------------------*/
#ifndef DBCSR_ACC_H
#define DBCSR_ACC_H
Expand Down
2 changes: 1 addition & 1 deletion src/acc/acc_bench.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/* */
/* For information on the license, see the LICENSE file. */
/* For further information please visit https://dbcsr.cp2k.org */
/* SPDX-License-Identifier: GPL-2.0+ */
/* SPDX-License-Identifier: BSD-3-Clause */
/*------------------------------------------------------------------------------------------------*/
#ifndef DBCSR_ACC_BENCH_H
#define DBCSR_ACC_BENCH_H
Expand Down
37 changes: 0 additions & 37 deletions src/acc/acc_bench_smm.sh

This file was deleted.

2 changes: 1 addition & 1 deletion src/acc/acc_triplets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# #
# For information on the license, see the LICENSE file. #
# For further information please visit https://dbcsr.cp2k.org #
# SPDX-License-Identifier: GPL-2.0+ #
# SPDX-License-Identifier: BSD-3-Clause #
####################################################################################################
XARGS=$(command -v xargs)
SORT=$(command -v sort)
Expand Down
8 changes: 8 additions & 0 deletions src/acc/libsmm_acc/tune/archive.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#!/bin/bash -e
####################################################################################################
# Copyright (C) by the DBCSR developers group - All rights reserved #
# This file is part of the DBCSR library. #
# #
# For information on the license, see the LICENSE file. #
# For further information please visit https://dbcsr.cp2k.org #
# SPDX-License-Identifier: GPL-2.0+ #
####################################################################################################

echo "removing unneeded files...."
rm -f tune_*/*.job tune_*/Makefile tune_*/*_exe? tune_*/*_part*.cu tune_*/*_part*.cpp tune_*/*.o
Expand Down
8 changes: 8 additions & 0 deletions src/acc/libsmm_acc/tune/cleanup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#!/bin/bash -e
####################################################################################################
# Copyright (C) by the DBCSR developers group - All rights reserved #
# This file is part of the DBCSR library. #
# #
# For information on the license, see the LICENSE file. #
# For further information please visit https://dbcsr.cp2k.org #
# SPDX-License-Identifier: GPL-2.0+ #
####################################################################################################

echo "removing tuning files...."
rm -rf tune_*x*x*
2 changes: 1 addition & 1 deletion src/acc/opencl/acc_getenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# #
# For information on the license, see the LICENSE file. #
# For further information please visit https://dbcsr.cp2k.org #
# SPDX-License-Identifier: GPL-2.0+ #
# SPDX-License-Identifier: BSD-3-Clause #
####################################################################################################

FIND=$(command -v find)
Expand Down
2 changes: 1 addition & 1 deletion src/acc/opencl/acc_opencl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# #
# For information on the license, see the LICENSE file. #
# For further information please visit https://dbcsr.cp2k.org #
# SPDX-License-Identifier: GPL-2.0+ #
# SPDX-License-Identifier: BSD-3-Clause #
####################################################################################################
# shellcheck disable=SC2048,SC2129

Expand Down
32 changes: 32 additions & 0 deletions src/acc/opencl/acc_opencl_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env bash
####################################################################################################
# Copyright (C) by the DBCSR developers group - All rights reserved #
# This file is part of the DBCSR library. #
# #
# For information on the license, see the LICENSE file. #
# For further information please visit https://dbcsr.cp2k.org #
# SPDX-License-Identifier: BSD-3-Clause #
####################################################################################################

HERE="$(cd "$(dirname "$0")" && pwd -P)"
TEST=acc_bench_smm
EXE=${HERE}/../${TEST}

if [ ! -e "$1" ]; then
>&2 echo "USAGE: $0 logfile"
exit 1
fi
if [ ! -e "${EXE}" ]; then
>&2 echo "ERROR: please build ${TEST}!"
exit 1
fi

sed -n "s/FAILED: \(..*\)/\1/p" "$1" | while read -r LINE; do
EXPORT=""
for KEYVAL in ${LINE}; do
EXPORT="${EXPORT} OPENCL_LIBSMM_SMM_${KEYVAL}"
done
if [ "${EXPORT}" ]; then
eval "${EXPORT} ${EXE}"
fi
done
2 changes: 1 addition & 1 deletion src/acc/opencl/smm/tune_multiply.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# #
# For information on the license, see the LICENSE file. #
# For further information please visit https://dbcsr.cp2k.org #
# SPDX-License-Identifier: GPL-2.0+ #
# SPDX-License-Identifier: BSD-3-Clause #
####################################################################################################
import opentuner
from opentuner.search.manipulator import IntegerParameter
Expand Down
2 changes: 1 addition & 1 deletion src/acc/opencl/smm/tune_multiply.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# #
# For information on the license, see the LICENSE file. #
# For further information please visit https://dbcsr.cp2k.org #
# SPDX-License-Identifier: GPL-2.0+ #
# SPDX-License-Identifier: BSD-3-Clause #
####################################################################################################

XARGS=$(command -v xargs)
Expand Down

0 comments on commit c177674

Please sign in to comment.