Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
elpa
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
11
Issues
11
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Environments
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
elpa
elpa
Commits
c7b5d9da
Commit
c7b5d9da
authored
Apr 05, 2017
by
Andreas Marek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Template for elpa_cholesky C-interface
parent
bd4b5b01
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
131 additions
and
126 deletions
+131
-126
Makefile.am
Makefile.am
+2
-0
src/elpa_c_interface.F90
src/elpa_c_interface.F90
+24
-126
src/elpa_cholesky_c_interface_template.X90
src/elpa_cholesky_c_interface_template.X90
+105
-0
No files found.
Makefile.am
View file @
c7b5d9da
...
...
@@ -60,6 +60,7 @@ EXTRA_libelpa@SUFFIX@_private_la_DEPENDENCIES = \
src/elpa_mult_at_b_c_interface_template.X90
\
src/elpa_mult_ah_b_c_interface_template.X90
\
src/elpa_invert_trm_c_interface_template.X90
\
src/elpa_cholesky_c_interface_template.X90
\
src/elpa2_bandred_template.X90
\
src/elpa2_symm_matrix_allreduce_real_template.X90
\
src/elpa2_trans_ev_band_to_full_template.X90
\
...
...
@@ -987,6 +988,7 @@ EXTRA_DIST = \
src/elpa_mult_at_b_c_interface_template.X90
\
src/elpa_mult_ah_b_c_interface_template.X90
\
src/elpa_invert_trm_c_interface_template.X90
\
src/elpa_cholesky_c_interface_template.X90
\
src/elpa2_tridiag_band_template.X90
\
src/elpa2_trans_ev_band_to_full_template.X90
\
src/elpa2_trans_ev_tridi_to_band_template.X90
\
...
...
src/elpa_c_interface.F90
View file @
c7b5d9da
...
...
@@ -994,38 +994,12 @@
!c> */
!c> int elpa_cholesky_real_double(int na, double *a, int lda, int nblk, int matrixCols, int mpi_comm_rows, int mpi_comm_cols, int wantDebug);
function
elpa_cholesky_real_wrapper_double
(
na
,
a
,
lda
,
nblk
,
matrixCols
,
mpi_comm_rows
,
mpi_comm_cols
,
wantDebug
)
result
(
success
)
&
bind
(
C
,
name
=
"elpa_cholesky_real_double"
)
use
,
intrinsic
::
iso_c_binding
use
elpa1_auxiliary
,
only
:
elpa_cholesky_real_double
implicit
none
integer
(
kind
=
c_int
),
value
::
na
,
lda
,
nblk
,
matrixCols
,
mpi_comm_rows
,
mpi_comm_cols
,
wantDebug
integer
(
kind
=
c_int
)
::
success
#ifdef USE_ASSUMED_SIZE
real
(
kind
=
c_double
)
::
a
(
lda
,
*
)
#else
real
(
kind
=
c_double
)
::
a
(
lda
,
matrixCols
)
#endif
logical
::
successFortran
,
wantDebugFortran
if
(
wantDebug
.ne.
0
)
then
wantDebugFortran
=
.true.
else
wantDebugFortran
=
.false.
endif
successFortran
=
elpa_cholesky_real_double
(
na
,
a
,
lda
,
nblk
,
matrixCols
,
mpi_comm_rows
,
mpi_comm_cols
,
wantDebugFortran
)
if
(
successFortran
)
then
success
=
1
else
success
=
0
endif
end
function
#define REALCASE 1
#define DOUBLE_PRECISION 1
#include "precision_macros.h"
#include "elpa_cholesky_c_interface_template.X90"
#undef DOUBLE_PRECISION
#undef REALCASE
#ifdef WANT_SINGLE_PRECISION_REAL
...
...
@@ -1049,35 +1023,13 @@
!c> */
!c> int elpa_cholesky_real_single(int na, float *a, int lda, int nblk, int matrixCols, int mpi_comm_rows, int mpi_comm_cols, int wantDebug);
function
elpa_cholesky_real_wrapper_single
(
na
,
a
,
lda
,
nblk
,
matrixCols
,
mpi_comm_rows
,
mpi_comm_cols
,
wantDebug
)
result
(
success
)
&
bind
(
C
,
name
=
"elpa_cholesky_real_single"
)
use
,
intrinsic
::
iso_c_binding
use
elpa1_auxiliary
,
only
:
elpa_cholesky_real_single
implicit
none
integer
(
kind
=
c_int
),
value
::
na
,
lda
,
nblk
,
matrixCols
,
mpi_comm_rows
,
mpi_comm_cols
,
wantDebug
integer
(
kind
=
c_int
)
::
success
real
(
kind
=
c_float
)
::
a
(
lda
,
matrixCols
)
logical
::
successFortran
,
wantDebugFortran
if
(
wantDebug
.ne.
0
)
then
wantDebugFortran
=
.true.
else
wantDebugFortran
=
.false.
endif
successFortran
=
elpa_cholesky_real_single
(
na
,
a
,
lda
,
nblk
,
matrixCols
,
mpi_comm_rows
,
mpi_comm_cols
,
wantDebugFortran
)
if
(
successFortran
)
then
success
=
1
else
success
=
0
endif
#define REALCASE 1
#define SINGLE_PRECISION 1
#include "precision_macros.h"
#include "elpa_cholesky_c_interface_template.X90"
#undef SINGLE_PRECISION
#undef REALCASE
end
function
#endif /* WANT_SINGLE_PRECISION_REAL */
...
...
@@ -1100,40 +1052,12 @@
!c> */
!c> int elpa_cholesky_complex_double(int na, double complex *a, int lda, int nblk, int matrixCols, int mpi_comm_rows, int mpi_comm_cols, int wantDebug);
function
elpa_cholesky_complex_wrapper_double
(
na
,
a
,
lda
,
nblk
,
matrixCols
,
mpi_comm_rows
,
&
mpi_comm_cols
,
wantDebug
)
result
(
success
)
&
bind
(
C
,
name
=
"elpa_cholesky_complex_double"
)
use
,
intrinsic
::
iso_c_binding
use
elpa1_auxiliary
,
only
:
elpa_cholesky_complex_double
implicit
none
integer
(
kind
=
c_int
),
value
::
na
,
lda
,
nblk
,
matrixCols
,
mpi_comm_rows
,
mpi_comm_cols
,
wantDebug
integer
(
kind
=
c_int
)
::
success
#ifdef USE_ASSUMED_SIZE
complex
(
kind
=
c_double_complex
)
::
a
(
lda
,
*
)
#else
complex
(
kind
=
c_double_complex
)
::
a
(
lda
,
matrixCols
)
#endif
logical
::
wantDebugFortran
,
successFortran
if
(
wantDebug
.ne.
0
)
then
wantDebugFortran
=
.true.
else
wantDebugFortran
=
.false.
endif
successFortran
=
elpa_cholesky_complex_double
(
na
,
a
,
lda
,
nblk
,
matrixCols
,
&
mpi_comm_rows
,
mpi_comm_cols
,
wantDebugFortran
)
if
(
successFortran
)
then
success
=
1
else
success
=
0
endif
end
function
#define COMPLEXCASE 1
#define DOUBLE_PRECISION 1
#include "precision_macros.h"
#include "elpa_cholesky_c_interface_template.X90"
#undef DOUBLE_PRECISION
#undef COMPLEXCASE
#ifdef WANT_SINGLE_PRECISION_COMPLEX
...
...
@@ -1156,36 +1080,10 @@
!c> */
!c> int elpa_cholesky_complex_single(int na, complex *a, int lda, int nblk, int matrixCols, int mpi_comm_rows, int mpi_comm_cols, int wantDebug);
function
elpa_cholesky_complex_wrapper_single
(
na
,
a
,
lda
,
nblk
,
matrixCols
,
mpi_comm_rows
,
mpi_comm_cols
,
&
wantDebug
)
result
(
success
)
&
bind
(
C
,
name
=
"elpa_cholesky_complex_single"
)
use
,
intrinsic
::
iso_c_binding
use
elpa1_auxiliary
,
only
:
elpa_cholesky_complex_single
implicit
none
integer
(
kind
=
c_int
),
value
::
na
,
lda
,
nblk
,
matrixCols
,
mpi_comm_rows
,
mpi_comm_cols
,
wantDebug
integer
(
kind
=
c_int
)
::
success
complex
(
kind
=
c_float_complex
)
::
a
(
lda
,
matrixCols
)
logical
::
wantDebugFortran
,
successFortran
if
(
wantDebug
.ne.
0
)
then
wantDebugFortran
=
.true.
else
wantDebugFortran
=
.false.
endif
successFortran
=
elpa_cholesky_complex_single
(
na
,
a
,
lda
,
nblk
,
matrixCols
,
mpi_comm_rows
,
mpi_comm_cols
,
wantDebugFortran
)
if
(
successFortran
)
then
success
=
1
else
success
=
0
endif
end
function
#define COMPLEXCASE 1
#define SINGLE_PRECISION 1
#include "precision_macros.h"
#include "elpa_cholesky_c_interface_template.X90"
#undef SINGLE_PRECISION
#undef COMPLEXCASE
#endif /* WANT_SINGLE_PRECISION_COMPLEX */
src/elpa_cholesky_c_interface_template.X90
0 → 100644
View file @
c7b5d9da
! This file is part of ELPA.
!
! The ELPA library was originally created by the ELPA consortium,
! consisting of the following organizations:
!
! - Max Planck Computing and Data Facility (MPCDF), formerly known as
! Rechenzentrum Garching der Max-Planck-Gesellschaft (RZG),
! - Bergische Universität Wuppertal, Lehrstuhl für angewandte
! Informatik,
! - Technische Universität München, Lehrstuhl für Informatik mit
! Schwerpunkt Wissenschaftliches Rechnen ,
! - Fritz-Haber-Institut, Berlin, Abt. Theorie,
! - Max-Plack-Institut für Mathematik in den Naturwissenschaften,
! Leipzig, Abt. Komplexe Strukutren in Biologie und Kognition,
! and
! - IBM Deutschland GmbH
!
! This particular source code file contains additions, changes and
! enhancements authored by Intel Corporation which is not part of
! the ELPA consortium.
!
! More information can be found here:
! http://elpa.mpcdf.mpg.de/
!
! ELPA is free software: you can redistribute it and/or modify
! it under the terms of the version 3 of the license of the
! GNU Lesser General Public License as published by the Free
! Software Foundation.
!
! ELPA 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 Lesser General Public License for more details.
!
! You should have received a copy of the GNU Lesser General Public License
! along with ELPA. If not, see <http://www.gnu.org/licenses/>
!
! ELPA reflects a substantial effort on the part of the original
! ELPA consortium, and we ask you to respect the spirit of the
! license that we chose: i.e., please contribute any changes you
! may have back to the original ELPA library distribution, and keep
! any derivatives of ELPA under the same license that we chose for
! the original distribution, the GNU Lesser General Public License.
!
! Author: A. Marek, MPCDF
function elpa_cholesky_&
&MATH_DATATYPE&
&_wrapper_&
&PRECISION&
& (na, a, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols, wantDebug) result(success) &
bind(C,name="elpa_cholesky_&
&MATH_DATATYPE&
&_&
&PRECISION&
&")
use, intrinsic :: iso_c_binding
use elpa1_auxiliary, only : elpa_cholesky_&
&MATH_DATATYPE&
&_&
&PRECISION
implicit none
integer(kind=c_int), value :: na, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols, wantDebug
integer(kind=c_int) :: success
#if REALCASE == 1
#ifdef USE_ASSUMED_SIZE
real(kind=C_DATATYPE_KIND) :: a(lda,*)
#else
real(kind=C_DATATYPE_KIND) :: a(lda,matrixCols)
#endif
#endif
#if COMPLEXCASE == 1
#ifdef USE_ASSUMED_SIZE
complex(kind=C_DATATYPE_KIND) :: a(lda,*)
#else
complex(kind=C_DATATYPE_KIND) :: a(lda,matrixCols)
#endif
#endif
logical :: successFortran, wantDebugFortran
if (wantDebug .ne. 0) then
wantDebugFortran = .true.
else
wantDebugFortran = .false.
endif
successFortran = elpa_cholesky_&
&MATH_DATATYPE&
&_&
&PRECISION&
& (na, a, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols, wantDebugFortran)
if (successFortran) then
success = 1
else
success = 0
endif
end function
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment