Commit e12db07e authored by Lorenz Huedepohl's avatar Lorenz Huedepohl
Browse files

First step of clean-up of the test programs

They are in a sad state, it's all copy&paste and chaos. This commit
only touches the surface so far.
parent f91c0b4b
......@@ -82,21 +82,17 @@ int main(int argc, char** argv) {
double startVal;
#ifdef DOUBLE_PRECISION_COMPLEX
complex double *a, *z, *as, *tmp1, *tmp2;
double *ev, *xr;
complex double *a, *z, *as;
double *ev;
#else
complex *a, *z, *as, *tmp1, *tmp2;
float *ev, *xr;
complex *a, *z, *as;
float *ev;
#endif
int *iseed;
int useGPU;
int success;
#ifdef WITH_MPI
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
......@@ -155,7 +151,7 @@ int main(int argc, char** argv) {
#else
my_mpi_comm_world = 1;
#endif
set_up_blacsgrid_from_fortran(my_mpi_comm_world, &my_blacs_ctxt, &np_rows, &np_cols, &nprow, &npcol, &my_prow, &my_pcol);
set_up_blacsgrid_f(my_mpi_comm_world, &my_blacs_ctxt, &np_rows, &np_cols, &nprow, &npcol, &my_prow, &my_pcol);
if (myid == 0) {
printf("\n");
......@@ -178,7 +174,7 @@ int main(int argc, char** argv) {
sc_desc = malloc(9*sizeof(int));
set_up_blacs_descriptor_from_fortran(na, nblk, my_prow, my_pcol, np_rows, np_cols, &na_rows, &na_cols, sc_desc, my_blacs_ctxt, &info);
set_up_blacs_descriptor_f(na, nblk, my_prow, my_pcol, np_rows, np_cols, &na_rows, &na_cols, sc_desc, my_blacs_ctxt, &info);
if (myid == 0) {
printf("\n");
......@@ -197,37 +193,20 @@ int main(int argc, char** argv) {
a = malloc(na_rows*na_cols*sizeof(complex double));
z = malloc(na_rows*na_cols*sizeof(complex double));
as = malloc(na_rows*na_cols*sizeof(complex double));
xr = malloc(na_rows*na_cols*sizeof(double));
ev = malloc(na*sizeof(double));
tmp1 = malloc(na_rows*na_cols*sizeof(complex double));
tmp2 = malloc(na_rows*na_cols*sizeof(complex double));
#else
a = malloc(na_rows*na_cols*sizeof(complex));
z = malloc(na_rows*na_cols*sizeof(complex));
as = malloc(na_rows*na_cols*sizeof(complex));
xr = malloc(na_rows*na_cols*sizeof(float));
ev = malloc(na*sizeof(float));
tmp1 = malloc(na_rows*na_cols*sizeof(complex));
tmp2 = malloc(na_rows*na_cols*sizeof(complex));
#endif
iseed = malloc(4096*sizeof(int));
#ifdef DOUBLE_PRECISION_COMPLEX
prepare_matrix_complex_from_fortran_double_precision(na, myid, na_rows, na_cols, sc_desc, iseed, xr, a, z, as);
prepare_matrix_complex_double_f(na, myid, na_rows, na_cols, sc_desc, a, z, as);
#else
prepare_matrix_complex_from_fortran_single_precision(na, myid, na_rows, na_cols, sc_desc, iseed, xr, a, z, as);
prepare_matrix_complex_single_f(na, myid, na_rows, na_cols, sc_desc, a, z, as);
#endif
free(xr);
if (myid == 0) {
printf("\n");
printf("Entering ELPA 1stage complex solver\n");
......@@ -260,9 +239,9 @@ int main(int argc, char** argv) {
/* check the results */
#ifdef DOUBLE_PRECISION_COMPLEX
status = check_correctness_complex_from_fortran_double_precision(na, nev, na_rows, na_cols, as, z, ev, sc_desc, myid, tmp1, tmp2);
status = check_correctness_complex_double_f(na, nev, na_rows, na_cols, as, z, ev, sc_desc, myid);
#else
status = check_correctness_complex_from_fortran_single_precision(na, nev, na_rows, na_cols, as, z, ev, sc_desc, myid, tmp1, tmp2);
status = check_correctness_complex_single_f(na, nev, na_rows, na_cols, as, z, ev, sc_desc, myid);
#endif
if (status !=0){
......@@ -276,11 +255,8 @@ int main(int argc, char** argv) {
free(a);
free(z);
free(as);
free(tmp1);
free(tmp2);
free(iseed);
free(ev);
#ifdef WITH_MPI
MPI_Finalize();
#endif
......
......@@ -80,11 +80,10 @@ int main(int argc, char** argv) {
int na_rows, na_cols;
double startVal;
#ifdef DOUBLE_PRECISION_REAL
double *a, *z, *as, *ev, *tmp1, *tmp2;
double *a, *z, *as, *ev;
#else
float *a, *z, *as, *ev, *tmp1, *tmp2;
float *a, *z, *as, *ev;
#endif
int *iseed;
int success;
......@@ -144,7 +143,7 @@ int main(int argc, char** argv) {
#ifdef WITH_MPI
my_mpi_comm_world = MPI_Comm_c2f(MPI_COMM_WORLD);
#endif
set_up_blacsgrid_from_fortran(my_mpi_comm_world, &my_blacs_ctxt, &np_rows, &np_cols, &nprow, &npcol, &my_prow, &my_pcol);
set_up_blacsgrid_f(my_mpi_comm_world, &my_blacs_ctxt, &np_rows, &np_cols, &nprow, &npcol, &my_prow, &my_pcol);
if (myid == 0) {
printf("\n");
......@@ -169,7 +168,7 @@ int main(int argc, char** argv) {
sc_desc = malloc(9*sizeof(int));
set_up_blacs_descriptor_from_fortran(na, nblk, my_prow, my_pcol, np_rows, np_cols, &na_rows, &na_cols, sc_desc, my_blacs_ctxt, &info);
set_up_blacs_descriptor_f(na, nblk, my_prow, my_pcol, np_rows, np_cols, &na_rows, &na_cols, sc_desc, my_blacs_ctxt, &info);
if (myid == 0) {
printf("\n");
......@@ -187,29 +186,18 @@ int main(int argc, char** argv) {
a = malloc(na_rows*na_cols*sizeof(double));
z = malloc(na_rows*na_cols*sizeof(double));
as = malloc(na_rows*na_cols*sizeof(double));
ev = malloc(na*sizeof(double));
tmp1 = malloc(na_rows*na_cols*sizeof(double));
tmp2 = malloc(na_rows*na_cols*sizeof(double));
#else
a = malloc(na_rows*na_cols*sizeof(float));
z = malloc(na_rows*na_cols*sizeof(float));
as = malloc(na_rows*na_cols*sizeof(float));
ev = malloc(na*sizeof(float));
tmp1 = malloc(na_rows*na_cols*sizeof(float));
tmp2 = malloc(na_rows*na_cols*sizeof(float));
#endif
iseed = malloc(4096*sizeof(int));
#ifdef DOUBLE_PRECISION_REAL
prepare_matrix_real_from_fortran_double_precision(na, myid, na_rows, na_cols, sc_desc, iseed, a, z, as);
prepare_matrix_real_double_f(na, myid, na_rows, na_cols, sc_desc, a, z, as);
#else
prepare_matrix_real_from_fortran_single_precision(na, myid, na_rows, na_cols, sc_desc, iseed, a, z, as);
prepare_matrix_real_single_f(na, myid, na_rows, na_cols, sc_desc, a, z, as);
#endif
if (myid == 0) {
printf("\n");
......@@ -243,9 +231,9 @@ int main(int argc, char** argv) {
#ifdef DOUBLE_PRECISION_REAL
/* check the results */
status = check_correctness_real_from_fortran_double_precision(na, nev, na_rows, na_cols, as, z, ev, sc_desc, myid, tmp1, tmp2);
status = check_correctness_real_double_f(na, nev, na_rows, na_cols, as, z, ev, sc_desc, myid);
#else
status = check_correctness_real_from_fortran_single_precision(na, nev, na_rows, na_cols, as, z, ev, sc_desc, myid, tmp1, tmp2);
status = check_correctness_real_single_f(na, nev, na_rows, na_cols, as, z, ev, sc_desc, myid);
#endif
if (status !=0){
printf("The computed EVs are not correct !\n");
......@@ -258,11 +246,8 @@ int main(int argc, char** argv) {
free(a);
free(z);
free(as);
free(tmp1);
free(tmp2);
free(iseed);
free(ev);
#ifdef WITH_MPI
MPI_Finalize();
#endif
......
......@@ -80,15 +80,12 @@ int main(int argc, char** argv) {
int na_rows, na_cols;
double startVal;
#ifdef DOUBLE_PRECISION_COMPLEX
complex double *a, *z, *as, *tmp1, *tmp2;
double *ev, *xr;
complex double *a, *z, *as;
double *ev;
#else
complex *a, *z, *as, *tmp1, *tmp2;
float *ev, *xr;
complex *a, *z, *as;
float *ev;
#endif
int *iseed;
int success;
......@@ -151,7 +148,7 @@ int main(int argc, char** argv) {
#else
my_mpi_comm_world = 1;
#endif
set_up_blacsgrid_from_fortran(my_mpi_comm_world, &my_blacs_ctxt, &np_rows, &np_cols, &nprow, &npcol, &my_prow, &my_pcol);
set_up_blacsgrid_f(my_mpi_comm_world, &my_blacs_ctxt, &np_rows, &np_cols, &nprow, &npcol, &my_prow, &my_pcol);
if (myid == 0) {
printf("\n");
......@@ -174,7 +171,7 @@ int main(int argc, char** argv) {
sc_desc = malloc(9*sizeof(int));
set_up_blacs_descriptor_from_fortran(na, nblk, my_prow, my_pcol, np_rows, np_cols, &na_rows, &na_cols, sc_desc, my_blacs_ctxt, &info);
set_up_blacs_descriptor_f(na, nblk, my_prow, my_pcol, np_rows, np_cols, &na_rows, &na_cols, sc_desc, my_blacs_ctxt, &info);
if (myid == 0) {
printf("\n");
......@@ -192,36 +189,19 @@ int main(int argc, char** argv) {
a = malloc(na_rows*na_cols*sizeof(complex double));
z = malloc(na_rows*na_cols*sizeof(complex double));
as = malloc(na_rows*na_cols*sizeof(complex double));
xr = malloc(na_rows*na_cols*sizeof(double));
ev = malloc(na*sizeof(double));
tmp1 = malloc(na_rows*na_cols*sizeof(complex double));
tmp2 = malloc(na_rows*na_cols*sizeof(complex double));
#else
a = malloc(na_rows*na_cols*sizeof(complex));
z = malloc(na_rows*na_cols*sizeof(complex));
as = malloc(na_rows*na_cols*sizeof(complex));
xr = malloc(na_rows*na_cols*sizeof(float));
ev = malloc(na*sizeof(float));
tmp1 = malloc(na_rows*na_cols*sizeof(complex));
tmp2 = malloc(na_rows*na_cols*sizeof(complex));
#endif
iseed = malloc(4096*sizeof(int));
#ifdef DOUBLE_PRECISION_COMPLEX
prepare_matrix_complex_from_fortran_double_precision(na, myid, na_rows, na_cols, sc_desc, iseed, xr, a, z, as);
prepare_matrix_complex_double_f(na, myid, na_rows, na_cols, sc_desc, a, z, as);
#else
prepare_matrix_complex_from_fortran_single_precision(na, myid, na_rows, na_cols, sc_desc, iseed, xr, a, z, as);
prepare_matrix_complex_single_f(na, myid, na_rows, na_cols, sc_desc, a, z, as);
#endif
free(xr);
if (myid == 0) {
printf("\n");
printf("Entering ELPA 2stage complex solver\n");
......@@ -255,9 +235,9 @@ int main(int argc, char** argv) {
/* check the results */
#ifdef DOUBLE_PRECISION_COMPLEX
status = check_correctness_complex_from_fortran_double_precision(na, nev, na_rows, na_cols, as, z, ev, sc_desc, myid, tmp1, tmp2);
status = check_correctness_complex_double_f(na, nev, na_rows, na_cols, as, z, ev, sc_desc, myid);
#else
status = check_correctness_complex_from_fortran_single_precision(na, nev, na_rows, na_cols, as, z, ev, sc_desc, myid, tmp1, tmp2);
status = check_correctness_complex_single_f(na, nev, na_rows, na_cols, as, z, ev, sc_desc, myid);
#endif
if (status !=0){
printf("The computed EVs are not correct !\n");
......@@ -272,11 +252,8 @@ int main(int argc, char** argv) {
free(a);
free(z);
free(as);
free(tmp1);
free(tmp2);
free(iseed);
free(ev);
#ifdef WITH_MPI
MPI_Finalize();
#endif
......
......@@ -79,11 +79,10 @@ int main(int argc, char** argv) {
int na_rows, na_cols;
double startVal;
#ifdef DOUBLE_PRECISION_REAL
double *a, *z, *as, *ev, *tmp1, *tmp2;
double *a, *z, *as, *ev;
#else
float *a, *z, *as, *ev, *tmp1, *tmp2;
float *a, *z, *as, *ev;
#endif
int *iseed;
int success;
......@@ -144,7 +143,7 @@ int main(int argc, char** argv) {
#else
my_mpi_comm_world = 1;
#endif
set_up_blacsgrid_from_fortran(my_mpi_comm_world, &my_blacs_ctxt, &np_rows, &np_cols, &nprow, &npcol, &my_prow, &my_pcol);
set_up_blacsgrid_f(my_mpi_comm_world, &my_blacs_ctxt, &np_rows, &np_cols, &nprow, &npcol, &my_prow, &my_pcol);
if (myid == 0) {
printf("\n");
......@@ -167,7 +166,7 @@ int main(int argc, char** argv) {
sc_desc = malloc(9*sizeof(int));
set_up_blacs_descriptor_from_fortran(na, nblk, my_prow, my_pcol, np_rows, np_cols, &na_rows, &na_cols, sc_desc, my_blacs_ctxt, &info);
set_up_blacs_descriptor_f(na, nblk, my_prow, my_pcol, np_rows, np_cols, &na_rows, &na_cols, sc_desc, my_blacs_ctxt, &info);
if (myid == 0) {
printf("\n");
......@@ -185,28 +184,17 @@ int main(int argc, char** argv) {
a = malloc(na_rows*na_cols*sizeof(double));
z = malloc(na_rows*na_cols*sizeof(double));
as = malloc(na_rows*na_cols*sizeof(double));
ev = malloc(na*sizeof(double));
tmp1 = malloc(na_rows*na_cols*sizeof(double));
tmp2 = malloc(na_rows*na_cols*sizeof(double));
#else
a = malloc(na_rows*na_cols*sizeof(float));
z = malloc(na_rows*na_cols*sizeof(float));
as = malloc(na_rows*na_cols*sizeof(float));
ev = malloc(na*sizeof(float));
tmp1 = malloc(na_rows*na_cols*sizeof(float));
tmp2 = malloc(na_rows*na_cols*sizeof(float));
#endif
iseed = malloc(4096*sizeof(int));
#ifdef DOUBLE_PRECISION_REAL
prepare_matrix_real_from_fortran_double_precision(na, myid, na_rows, na_cols, sc_desc, iseed, a, z, as);
prepare_matrix_real_double_f(na, myid, na_rows, na_cols, sc_desc, a, z, as);
#else
prepare_matrix_real_from_fortran_single_precision(na, myid, na_rows, na_cols, sc_desc, iseed, a, z, as);
prepare_matrix_real_single_f(na, myid, na_rows, na_cols, sc_desc, a, z, as);
#endif
if (myid == 0) {
printf("\n");
......@@ -241,9 +229,9 @@ int main(int argc, char** argv) {
/* check the results */
#ifdef DOUBLE_PRECISION_REAL
status = check_correctness_real_from_fortran_double_precision(na, nev, na_rows, na_cols, as, z, ev, sc_desc, myid, tmp1, tmp2);
status = check_correctness_real_double_f(na, nev, na_rows, na_cols, as, z, ev, sc_desc, myid);
#else
status = check_correctness_real_from_fortran_single_precision(na, nev, na_rows, na_cols, as, z, ev, sc_desc, myid, tmp1, tmp2);
status = check_correctness_real_single_f(na, nev, na_rows, na_cols, as, z, ev, sc_desc, myid);
#endif
if (status !=0){
......@@ -259,11 +247,8 @@ int main(int argc, char** argv) {
free(a);
free(z);
free(as);
free(tmp1);
free(tmp2);
free(iseed);
free(ev);
#ifdef WITH_MPI
MPI_Finalize();
#endif
......
......@@ -78,14 +78,11 @@ int main(int argc, char** argv) {
int na_rows, na_cols;
double startVal;
complex double *a, *z, *as, *tmp1, *tmp2;
complex double *a, *z, *as;
double *ev, *xr;
int *iseed;
double *ev;
int success;
int i;
int useGPU, THIS_COMPLEX_ELPA_KERNEL_API;
......@@ -141,7 +138,7 @@ int main(int argc, char** argv) {
#else
my_mpi_comm_world = 1;
#endif
set_up_blacsgrid_from_fortran(my_mpi_comm_world, &my_blacs_ctxt, &np_rows, &np_cols, &nprow, &npcol, &my_prow, &my_pcol);
set_up_blacsgrid_f(my_mpi_comm_world, &my_blacs_ctxt, &np_rows, &np_cols, &nprow, &npcol, &my_prow, &my_pcol);
if (myid == 0) {
printf("\n");
......@@ -164,7 +161,7 @@ int main(int argc, char** argv) {
sc_desc = malloc(9*sizeof(int));
set_up_blacs_descriptor_from_fortran(na, nblk, my_prow, my_pcol, np_rows, np_cols, &na_rows, &na_cols, sc_desc, my_blacs_ctxt, &info);
set_up_blacs_descriptor_f(na, nblk, my_prow, my_pcol, np_rows, np_cols, &na_rows, &na_cols, sc_desc, my_blacs_ctxt, &info);
if (myid == 0) {
printf("\n");
......@@ -182,20 +179,9 @@ int main(int argc, char** argv) {
a = malloc(na_rows*na_cols*sizeof(complex double));
z = malloc(na_rows*na_cols*sizeof(complex double));
as = malloc(na_rows*na_cols*sizeof(complex double));
xr = malloc(na_rows*na_cols*sizeof(double));
ev = malloc(na*sizeof(double));
tmp1 = malloc(na_rows*na_cols*sizeof(complex double));
tmp2 = malloc(na_rows*na_cols*sizeof(complex double));
iseed = malloc(4096*sizeof(int));
prepare_matrix_complex_from_fortran_double_precision(na, myid, na_rows, na_cols, sc_desc, iseed, xr, a, z, as);
free(xr);
prepare_matrix_complex_double_f(na, myid, na_rows, na_cols, sc_desc, a, z, as);
if (myid == 0) {
printf("\n");
......@@ -282,7 +268,7 @@ int main(int argc, char** argv) {
}
/* check the results */
status = check_correctness_complex_from_fortran_double_precision(na, nev, na_rows, na_cols, as, z, ev, sc_desc, myid, tmp1, tmp2);
status = check_correctness_complex_double_f(na, nev, na_rows, na_cols, as, z, ev, sc_desc, myid);
if (status !=0){
printf("The computed EVs are not correct !\n");
......@@ -297,11 +283,8 @@ int main(int argc, char** argv) {
free(a);
free(z);
free(as);
free(tmp1);
free(tmp2);
free(iseed);
free(ev);
#ifdef WITH_MPI
MPI_Finalize();
#endif
......
......@@ -78,11 +78,10 @@ int main(int argc, char** argv) {
int na_rows, na_cols;
float startVal;
complex *a, *z, *as, *tmp1, *tmp2;
complex *a, *z, *as;
float *ev, *xr;
float *ev;
int *iseed;
int useGPU;
int success;
......@@ -141,7 +140,7 @@ int main(int argc, char** argv) {
#else
my_mpi_comm_world = 1;
#endif
set_up_blacsgrid_from_fortran(my_mpi_comm_world, &my_blacs_ctxt, &np_rows, &np_cols, &nprow, &npcol, &my_prow, &my_pcol);
set_up_blacsgrid_f(my_mpi_comm_world, &my_blacs_ctxt, &np_rows, &np_cols, &nprow, &npcol, &my_prow, &my_pcol);
if (myid == 0) {
printf("\n");
......@@ -164,7 +163,7 @@ int main(int argc, char** argv) {
sc_desc = malloc(9*sizeof(int));
set_up_blacs_descriptor_from_fortran(na, nblk, my_prow, my_pcol, np_rows, np_cols, &na_rows, &na_cols, sc_desc, my_blacs_ctxt, &info);
set_up_blacs_descriptor_f(na, nblk, my_prow, my_pcol, np_rows, np_cols, &na_rows, &na_cols, sc_desc, my_blacs_ctxt, &info);
if (myid == 0) {
printf("\n");
......@@ -182,20 +181,9 @@ int main(int argc, char** argv) {
a = malloc(na_rows*na_cols*sizeof(complex));
z = malloc(na_rows*na_cols*sizeof(complex));
as = malloc(na_rows*na_cols*sizeof(complex));
xr = malloc(na_rows*na_cols*sizeof(float));
ev = malloc(na*sizeof(float));
tmp1 = malloc(na_rows*na_cols*sizeof(complex));
tmp2 = malloc(na_rows*na_cols*sizeof(complex));
iseed = malloc(4096*sizeof(int));
prepare_matrix_complex_from_fortran_single_precision(na, myid, na_rows, na_cols, sc_desc, iseed, xr, a, z, as);
free(xr);
prepare_matrix_complex_single_f(na, myid, na_rows, na_cols, sc_desc, a, z, as);
if (myid == 0) {
printf("\n");
......@@ -206,7 +194,7 @@ int main(int argc, char** argv) {
mpierr = MPI_Barrier(MPI_COMM_WORLD);
#endif
useGPU = 0;
THIS_COMPLEX_ELPA_KERNEL_API = ELPA2_COMPLEX_KERNEL_GENERIC;
THIS_COMPLEX_ELPA_KERNEL_API = ELPA_2STAGE_COMPLEX_GENERIC;
success = elpa_solve_evp_complex_single(na, nev, a, na_rows, ev, z, na_rows, nblk, na_cols, mpi_comm_rows, mpi_comm_cols, my_mpi_comm_world, THIS_COMPLEX_ELPA_KERNEL_API, useGPU,"1stage");
if (success != 1) {
......@@ -236,7 +224,7 @@ int main(int argc, char** argv) {
mpierr = MPI_Barrier(MPI_COMM_WORLD);
#endif
useGPU = 0;
THIS_COMPLEX_ELPA_KERNEL_API = ELPA2_COMPLEX_KERNEL_GENERIC;
THIS_COMPLEX_ELPA_KERNEL_API = ELPA_2STAGE_COMPLEX_GENERIC;
success = elpa_solve_evp_complex_single(na, nev, a, na_rows, ev, z, na_rows, nblk, na_cols, mpi_comm_rows, mpi_comm_cols, my_mpi_comm_world, THIS_COMPLEX_ELPA_KERNEL_API, useGPU, "2stage");
if (success != 1) {
......@@ -265,7 +253,7 @@ int main(int argc, char** argv) {
mpierr = MPI_Barrier(MPI_COMM_WORLD);
#endif
useGPU = 0;
THIS_COMPLEX_ELPA_KERNEL_API = ELPA2_COMPLEX_KERNEL_GENERIC;
THIS_COMPLEX_ELPA_KERNEL_API = ELPA_2STAGE_COMPLEX_GENERIC;
success = elpa_solve_evp_complex_single(na, nev, a, na_rows, ev, z, na_rows, nblk, na_cols, mpi_comm_rows, mpi_comm_cols, my_mpi_comm_world, THIS_COMPLEX_ELPA_KERNEL_API, useGPU, "auto");
if (success != 1) {
......@@ -282,7 +270,7 @@ int main(int argc, char** argv) {
}
/* check the results */
status = check_correctness_complex_from_fortran_single_precision(na, nev, na_rows, na_cols, as, z, ev, sc_desc, myid, tmp1, tmp2);
status = check_correctness_complex_single_f(na, nev, na_rows, na_cols, as, z, ev, sc_desc, myid);
if (status !=0){
printf("The computed EVs are not correct !\n");
......@@ -298,8 +286,6 @@ int main(int argc, char** argv) {
free(z);
free(as);
free(tmp1);
free(tmp2);
#ifdef WITH_MPI
MPI_Finalize();
#endif
......
......@@ -77,9 +77,8 @@ int main(int argc, char** argv) {
int na_rows, na_cols;
double startVal;
double *a, *z, *as, *ev, *tmp1, *tmp2;
double *a, *z, *as, *ev;
int *iseed;
int i;
int success;
......@@ -135,7 +134,7 @@ int main(int argc, char** argv) {
#else
my_mpi_comm_world = 1;
#endif
set_up_blacsgrid_from_fortran(my_mpi_comm_world, &my_blacs_ctxt, &np_rows, &np_cols, &nprow, &npcol, &my_prow, &my_pcol);
set_up_blacsgrid_f(my_mpi_comm_world, &my_blacs_ctxt, &np_rows, &np_cols, &nprow, &npcol, &my_prow, &my_pcol);
if (myid == 0) {
printf("\n");
......@@ -158,7 +157,7 @@ int main(int argc, char** argv) {
sc_desc = malloc(9*sizeof(int));
set_up_blacs_descriptor_from_fortran(na, nblk, my_prow, my_pcol, np_rows, np_cols, &na_rows, &na_cols, sc_desc, my_blacs_ctxt, &info);
set_up_blacs_descriptor_f(na, nblk, my_prow, my_pcol, np_rows, np_cols, &na_rows, &na_cols, sc_desc, my_blacs_ctxt, &info);
if (myid == 0) {
printf("\n");
......@@ -176,16 +175,9 @@ int main(int argc, char** argv) {
a = malloc(na_rows*na_cols*sizeof(double));
z = malloc(na_rows*na_cols*sizeof(double));
as = malloc(na_rows*na_cols*sizeof(double));
ev = malloc(na*sizeof(double));
tmp1 = malloc