From d83e895e6791593f7d382bf48423eacdf9339153 Mon Sep 17 00:00:00 2001 From: ghbrown Date: Fri, 8 Apr 2022 12:57:00 -0500 Subject: [PATCH 1/3] Add interface for mmlatte routine, update GPU build flags --- MATRIX/F_mmlatte.cu | 27 +++++++++++++++++++++++++++ makefile.CHOICES | 6 +++--- 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 MATRIX/F_mmlatte.cu diff --git a/MATRIX/F_mmlatte.cu b/MATRIX/F_mmlatte.cu new file mode 100644 index 00000000..aec2a32c --- /dev/null +++ b/MATRIX/F_mmlatte.cu @@ -0,0 +1,27 @@ +/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! Copyright 2010. Los Alamos National Security, LLC. This material was ! +! produced under U.S. Government contract DE-AC52-06NA25396 for Los Alamos ! +! National Laboratory (LANL), which is operated by Los Alamos National ! +! Security, LLC for the U.S. Department of Energy. The U.S. Government has ! +! rights to use, reproduce, and distribute this software. NEITHER THE ! +! GOVERNMENT NOR LOS ALAMOS NATIONAL SECURITY, LLC MAKES ANY WARRANTY, ! +! EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE USE OF THIS ! +! SOFTWARE. If software is modified to produce derivative works, such ! +! modified software should be clearly marked, so as not to confuse it ! +! with the version available from LANL. ! +! ! +! Additionally, this program is free software; you can redistribute it ! +! and/or modify it under the terms of the GNU General Public License as ! +! published by the Free Software Foundation; version 2.0 of the License. ! +! Accordingly, this program is distributed in the hope that it will be ! +! useful, but WITHOUT ANY WARRANTY; without even the implied warranty of ! +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General ! +! Public License for more details. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/ + +#include "Matrix.h" + +extern "C" void mmlatte_(int *hdim, void *bo_pointer, void *h_pointer) { + runmatmult(*hdim, (double *)bo_pointer, (double *)h_pointer); + } + diff --git a/makefile.CHOICES b/makefile.CHOICES index 90003895..1cdf5c82 100644 --- a/makefile.CHOICES +++ b/makefile.CHOICES @@ -23,7 +23,7 @@ METIS = OFF METIS_PATH= $(HOME)/metis/metis-5.1.0/install # GPU available - OFF or ON -GPUOPT = OFF +GPUOPT = ON # Using DBCSR library from cp2k? OFF or ON DBCSR_OPT = OFF @@ -89,5 +89,5 @@ endif # GPU options # -GPU_CUDA_LIB = -L/opt/cudatoolkit-5.5/lib64 -lcublas -lcudart -GPU_ARCH = sm_20 +GPU_CUDA_LIB = -L/opt/cuda/lib64 -lcublas -lcudart -lgomp +GPU_ARCH = sm_35 From 5ad7a326cb2bec1c2e5d4ca840930e2bc2fc6735 Mon Sep 17 00:00:00 2001 From: ghbrown Date: Tue, 12 Apr 2022 14:08:55 -0500 Subject: [PATCH 2/3] Set default choice back to no GPU --- makefile.CHOICES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile.CHOICES b/makefile.CHOICES index 1cdf5c82..e5e0ccd4 100644 --- a/makefile.CHOICES +++ b/makefile.CHOICES @@ -23,7 +23,7 @@ METIS = OFF METIS_PATH= $(HOME)/metis/metis-5.1.0/install # GPU available - OFF or ON -GPUOPT = ON +GPUOPT = OFF # Using DBCSR library from cp2k? OFF or ON DBCSR_OPT = OFF From 742404c8734c5d5c225e4ce62151cdb4fc0b9883 Mon Sep 17 00:00:00 2001 From: ghbrown Date: Tue, 12 Apr 2022 14:43:09 -0500 Subject: [PATCH 3/3] Remove unused interface --- MATRIX/F_mmtest.c | 27 --------------------------- MATRIX/F_mmtest.cu | 27 --------------------------- 2 files changed, 54 deletions(-) delete mode 100644 MATRIX/F_mmtest.c delete mode 100644 MATRIX/F_mmtest.cu diff --git a/MATRIX/F_mmtest.c b/MATRIX/F_mmtest.c deleted file mode 100644 index 1dde0db1..00000000 --- a/MATRIX/F_mmtest.c +++ /dev/null @@ -1,27 +0,0 @@ -/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! Copyright 2010. Los Alamos National Security, LLC. This material was ! -! produced under U.S. Government contract DE-AC52-06NA25396 for Los Alamos ! -! National Laboratory (LANL), which is operated by Los Alamos National ! -! Security, LLC for the U.S. Department of Energy. The U.S. Government has ! -! rights to use, reproduce, and distribute this software. NEITHER THE ! -! GOVERNMENT NOR LOS ALAMOS NATIONAL SECURITY, LLC MAKES ANY WARRANTY, ! -! EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE USE OF THIS ! -! SOFTWARE. If software is modified to produce derivative works, such ! -! modified software should be clearly marked, so as not to confuse it ! -! with the version available from LANL. ! -! ! -! Additionally, this program is free software; you can redistribute it ! -! and/or modify it under the terms of the GNU General Public License as ! -! published by the Free Software Foundation; version 2.0 of the License. ! -! Accordingly, this program is distributed in the hope that it will be ! -! useful, but WITHOUT ANY WARRANTY; without even the implied warranty of ! -! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General ! -! Public License for more details. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/ - -#include "Matrix.h" - -extern "C" void mmtest_(int *hdim, void *bo_pointer, void *h_pointer) { - runmatmult(*hdim, (double *)bo_pointer, (double *)h_pointer) - } - diff --git a/MATRIX/F_mmtest.cu b/MATRIX/F_mmtest.cu deleted file mode 100644 index 94ff603a..00000000 --- a/MATRIX/F_mmtest.cu +++ /dev/null @@ -1,27 +0,0 @@ -/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! Copyright 2010. Los Alamos National Security, LLC. This material was ! -! produced under U.S. Government contract DE-AC52-06NA25396 for Los Alamos ! -! National Laboratory (LANL), which is operated by Los Alamos National ! -! Security, LLC for the U.S. Department of Energy. The U.S. Government has ! -! rights to use, reproduce, and distribute this software. NEITHER THE ! -! GOVERNMENT NOR LOS ALAMOS NATIONAL SECURITY, LLC MAKES ANY WARRANTY, ! -! EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE USE OF THIS ! -! SOFTWARE. If software is modified to produce derivative works, such ! -! modified software should be clearly marked, so as not to confuse it ! -! with the version available from LANL. ! -! ! -! Additionally, this program is free software; you can redistribute it ! -! and/or modify it under the terms of the GNU General Public License as ! -! published by the Free Software Foundation; version 2.0 of the License. ! -! Accordingly, this program is distributed in the hope that it will be ! -! useful, but WITHOUT ANY WARRANTY; without even the implied warranty of ! -! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General ! -! Public License for more details. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/ - -#include "Matrix.h" - -extern "C" void mmtest_(int *hdim, void *bo_pointer, void *h_pointer) { - runmatmult(*hdim, (double *)bo_pointer, (double *)h_pointer); - } -