Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
elpa
elpa
Commits
6a79258a
Commit
6a79258a
authored
May 25, 2017
by
Andreas Marek
Browse files
Example skeleton for C interface in elpa.F90
parent
2f842322
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/elpa.F90
View file @
6a79258a
...
...
@@ -141,7 +141,50 @@
!>
!> call elpa_uninit()
!> \endcode
!>
!>
!> C synopsis
!>
!> \code{.c}
!> #include <elpa/elpa.h>
!
!> elpa_t handle;
!>
!> if (elpa_init(20170403) != ELPA_OK) {
!> fprintf(stderr, "Error: ELPA API version not supported");
!> exit(1);
!> }
!>
!> handle = elpa_allocate(&error);
!>
!> /* Set parameters the matrix and it's MPI distribution */
!> elpa_set(handle, "na", na, &error);
!> elpa_set(handle, "nev", nev, &error);
!> elpa_set(handle, "local_nrows", na_rows, &error);
!> elpa_set(handle, "local_ncols", na_cols, &error);
!> elpa_set(handle, "nblk", nblk, &error);
!> elpa_set(handle, "mpi_comm_parent", MPI_Comm_c2f(MPI_COMM_WORLD), &error);
!> elpa_set(handle, "process_row", my_prow, &error);
!> elpa_set(handle, "process_col", my_pcol, &error);
!>
!> /* Setup */
!> elpa_setup(handle);
!>
!> /* if desired, set tunable run-time options */
!> elpa_set(handle, "solver", ELPA_SOLVER_2STAGE, &error);
!> \endcode
!> ... set and get all other options that are desired
!> \code{.c}
!>
!> /* use method solve to solve the eigenvalue problem */
!> /* other possible methods are desribed in \ref elpa_api::elpa_t derived type */
!> elpa_solve(handle, a, ev, z, &error);
!>
!> /* cleanup */
!> elpa_deallocate(handle);
!> elpa_uninit();
!> \endcode
!>
!> \brief Fortran module to use the ELPA library. No other module shoule be used
module
elpa
use
elpa_constants
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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