arpack-ng  

Issue 1480: issues with Parallel Arpack

Reported by Tijo Vazhappilly, Sep 29, 2014

Hi,

I am trying to change the serial ARPACK routines to PARPACK in my 
C++ code. But I am getting errors(incorrect values) for the parallel 
code(pdsaupd & pdseupd) when running with more than one 
processor. In the parallel code, all other parts are serial 
including the matrix times vector routine. The parallel code is 
written with respect to the MPI FORTRAN example given for a 
symmetric eigenvalue problem in the PARPACK source and also the 
ARPACK example from the web.

The parallel arpack is downloaded from here
http://www.caam.rice.edu/~kristyn/parpack_home.html


I need some help fixing the errors.

I have attached the serial and parallel source codes, header files 
and the input file.
 
Steps to reproduce the problem:
1. Compile and run the code using serial arpack dvr_arpack.cpp. 
./dvr_arpack input.txt

2.Compile and run the code using parallel arpack dvr_parpack.cpp.
prun -np 1 dvr_parpack input.txt
prun -np 4 dvr_parpack input.txt

3. Correct declaration of arpack variables for the parallel 
execution.

Expected result: The eigenvalues from MPI run of  dvr_parpack.cpp 
should be same with the serial arpack and LAPACK routines.

Actual result: Either 0 or incorrect eigenvalues with MPI

I am a beginner with MPI programing.

Thank you for your time,

Best regards,
Tijo

PS: Header files

1.arpack_c2f.h
#ifndef ARPACK_HEADER_INCLUDED
#define ARPACK_HEADER_INCLUDED

/* Mangling for Fortran global symbols without underscores. */
#define ARPACK_GLOBAL(name,NAME) name##_

/* Mangling for Fortran global symbols with underscores. */
#define ARPACK_GLOBAL_(name,NAME) name##_

/* Mangling for Fortran module symbols without underscores. */
#define ARPACK_MODULE(mod_name,name, mod_NAME,NAME) 
mod_name##_mp_##name##_

/* Mangling for Fortran module symbols with underscores. */
#define ARPACK_MODULE_(mod_name,name, mod_NAME,NAME) 
mod_name##_mp_##name##_

/*-------------------------------------------------------------------
-------*/
/* Mangle some symbols automatically.                                
       */
#define dsaupd ARPACK_GLOBAL(dsaupd, DSAUPD)
#define dseupd ARPACK_GLOBAL(dseupd, DSEUPD)

#endif

2. parpack_c2f.h
#ifndef PARPACK_HEADER_INCLUDED
#define PARPACK_HEADER_INCLUDED

/* Mangling for Fortran global symbols without underscores. */
#define PARPACK_GLOBAL(name,NAME) name##_

/* Mangling for Fortran global symbols with underscores. */
#define PARPACK_GLOBAL_(name,NAME) name##_

/* Mangling for Fortran module symbols without underscores. */
#define PARPACK_MODULE(mod_name,name, mod_NAME,NAME) 
mod_name##_mp_##name##_

/* Mangling for Fortran module symbols with underscores. */
#define PARPACK_MODULE_(mod_name,name, mod_NAME,NAME) 
mod_name##_mp_##name##_

/*-------------------------------------------------------------------
-------*/
/* Mangle some symbols automatically.                                
       */
#define pdsaupd PARPACK_GLOBAL(pdsaupd, PDSAUPD)
#define pdseupd PARPACK_GLOBAL(pdseupd, PDSEUPD)

#endif

3. lapack_c2f.h

#ifndef LAPACK_HEADER_INCLUDED
#define LAPACK_HEADER_INCLUDED

/* Mangling for Fortran global symbols without underscores. */
#define LAPACK_GLOBAL(name,NAME) name##_

/* Mangling for Fortran global symbols with underscores. */
#define LAPACK_GLOBAL_(name,NAME) name##_

/* Mangling for Fortran module symbols without underscores. */
#define LAPACK_MODULE(mod_name,name, mod_NAME,NAME) 
mod_name##_mp_##name##_

/* Mangling for Fortran module symbols with underscores. */
#define LAPACK_MODULE_(mod_name,name, mod_NAME,NAME) 
mod_name##_mp_##name##_

/*-------------------------------------------------------------------
-------*/
/* Mangle some symbols automatically.                                
       */
#define dsyev LAPACK_GLOBAL(dsyev, DSYEV)

#endif

Created: 3 years 2 months ago by Tijo Vazhappilly

Status: New

Labels:
Type:Defect
Priority:Medium