41   long int i, j, i_max, xMsize;
    43   int rank, size, nprocs, nprow, npcol, myrow, mycol, ictxt;
    44   int i_negone=-1, i_zero=0, iam;
    45   long int mb, nb, mp, nq;
    49   i_max = 
X->Check.idim_max;
    51   for (i = 0; i < i_max; i++) {
    52     for (j = 0; j < i_max; j++) {
    54       Ham[i][j] = 
Ham[i + 1][j + 1];
    63   if (
X->Def.iNGPU == 0) {
    66       fprintf(
stdoutMPI, 
"Using SCALAPACK\n\n");
    67       MPI_Comm_rank(MPI_COMM_WORLD, &rank);
    68       MPI_Comm_size(MPI_COMM_WORLD, &size);
    69       MPI_Dims_create(size,2,dims);
    70       nprow=dims[0]; npcol=dims[1];
    72       blacs_pinfo_(&iam, &nprocs);
    73       blacs_get_(&i_negone, &i_zero, &ictxt);
    74       blacs_gridinit_(&ictxt, 
"R", &nprow, &npcol);
    75       blacs_gridinfo_(&ictxt, &nprow, &npcol, &myrow, &mycol);
    77       mb = GetBlockSize(xMsize, size);
    79       mp = numroc_(&xMsize, &mb, &myrow, &i_zero, &nprow);
    80       nq = numroc_(&xMsize, &mb, &mycol, &i_zero, &npcol);
    81       Z_vec = malloc(mp*nq*
sizeof(complex 
double));
    90       diag_scalapack_cmp(xMsize, 
Ham, 
v0, Z_vec, descZ_vec);
   100     if(diag_magma_cmp(xMsize, 
Ham, 
v0, 
L_vec, 
X->Def.iNGPU) != 0) {
   104     fprintf(
stdoutMPI, 
"Warning: MAGMA is not used in this calculation.");
   119   for (i = 0; i < i_max; i++) {
   120     fprintf(fp, 
" %ld %.10lf \n", i, creal(
v0[i]));
 
int childfopenMPI(const char *_cPathChild, const char *_cmode, FILE **_fp)
Only the root process open file in output/ directory. 
int ZHEEVall(int xNsize, double complex **A, double complex *r, double complex **vec)
obtain eigenvalues and eigenvectors of Hermite matrix A 
int nproc
Number of processors, defined in InitializeMPI() 
const char * cFileNameEigenvalue_Lanczos
FILE * stdoutMPI
File pointer to the standard output defined in InitializeMPI()