call_elpa1.c 3.83 KB
Newer Older
Andreas Marek's avatar
Andreas Marek committed
1
2
3
4
5
/*     This file is part of ELPA. */
/*  */
/*     The ELPA library was originally created by the ELPA consortium, */
/*     consisting of the following organizations: */
/*  */
6
7
/*     - Max Planck Computing and Data Facility (MPCDF), formerly known as */
/*       Rechenzentrum Garching der Max-Planck-Gesellschaft (RZG), */
Andreas Marek's avatar
Andreas Marek committed
8
9
10
11
12
13
14
15
16
17
18
19
/*     - 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 */
/*  */
/*  */
/*     More information can be found here: */
20
/*     http://elpa.mpcdf.mpg.de/ */
Andreas Marek's avatar
Andreas Marek committed
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*  */
/*     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. */
/*  */
/*  */
43
#include "config-f90.h"
Andreas Marek's avatar
Andreas Marek committed
44
45
46
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
47
#include <elpa/elpa_legacy.h>
Andreas Marek's avatar
Andreas Marek committed
48
#include <complex.h>
Andreas Marek's avatar
Andreas Marek committed
49

50
51
int call_elpa1_real_solver_from_c_double(int na, int nev, double *a, int lda, double *ev, double *q, int ldq, int nblk, int ncols, int mpi_comm_rows, int mpi_comm_cols, int mpi_comm_all, int useGPU) {
  return elpa_solve_evp_real_1stage_double_precision(na, nev, a, lda, ev, q, ldq, nblk, ncols, mpi_comm_rows, mpi_comm_cols, mpi_comm_all, useGPU);
Andreas Marek's avatar
Andreas Marek committed
52
}
53
#ifdef WANT_SINGLE_PRECISION_REAL
54
55
int call_elpa1_real_solver_from_c_single(int na, int nev, float *a, int lda, float *ev, float *q, int ldq, int nblk, int ncols, int mpi_comm_rows, int mpi_comm_cols, int mpi_comm_all, int useGPU) {
  return elpa_solve_evp_real_1stage_single_precision(na, nev, a, lda, ev, q, ldq, nblk, ncols, mpi_comm_rows, mpi_comm_cols, mpi_comm_all, useGPU);
56
57
}
#endif
Andreas Marek's avatar
Andreas Marek committed
58

59
60
int call_elpa1_complex_solver_from_c_double(int na, int nev, complex double *a, int lda, double *ev, complex double *q, int ldq, int nblk, int ncols, int mpi_comm_rows, int mpi_comm_cols, int mpi_comm_all, int useGPU) {
  return elpa_solve_evp_complex_1stage_double_precision(na, nev, a, lda, ev, q, ldq, nblk, ncols, mpi_comm_rows, mpi_comm_cols, mpi_comm_all, useGPU);
61
}
62
#ifdef WANT_SINGLE_PRECISION_COMPLEX
63
64
int call_elpa1_complex_solver_from_c_single(int na, int nev, complex  *a, int lda, float *ev, complex  *q, int ldq, int nblk, int ncols, int mpi_comm_rows, int mpi_comm_cols, int mpi_comm_all, int useGPU) {
  return elpa_solve_evp_complex_1stage_single_precision(na, nev, a, lda, ev, q, ldq, nblk, ncols, mpi_comm_rows, mpi_comm_cols, mpi_comm_all, useGPU);
Andreas Marek's avatar
Andreas Marek committed
65
}
66
#endif
Andreas Marek's avatar
Andreas Marek committed
67

Lorenz Huedepohl's avatar
Lorenz Huedepohl committed
68
69
int call_elpa_get_comm_from_c(int mpi_comm_world, int my_prow, int my_pcol, int *mpi_comm_rows, int *mpi_comm_cols) {
  return elpa_get_communicators(mpi_comm_world, my_prow, my_pcol, mpi_comm_rows, mpi_comm_cols);
Andreas Marek's avatar
Andreas Marek committed
70
}