Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8626895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:08:27+00:00 2026-06-12T08:08:27+00:00

Hi can any one provide me an example Makefile for calling ScaLAPACK from C++,

  • 0

Hi can any one provide me an example Makefile for calling ScaLAPACK from C++, I am having difficulties.

I have the newest version compiled correctly with all the tests passed. I have it compiled with GCC and OpenMPI on Fedora, and I have also tried using the pre-built binaries from the repository with no luck.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T08:08:28+00:00Added an answer on June 12, 2026 at 8:08 am

    I used the following declarations for ScaLAPACK procedures:

    extern "C" void pdgesvd_(char *jobu, char *jobvt, int *M, int *N, double *A, int *ia, int *ja, int *desca, double *s, double *u, int *iu, int *ju,
                int *descu, double *vt, int *ivt, int *jvt, int *descvt, double *work, int *lwork, int *info);
    
    extern "C" void pdgemv_(char *t, int *M, int *N, double *alpha, double *A, int *ia, int *ja, int *desca, double *X, int *ix, int *jx,int *descx,
                int *incx, double *beta, double *Y, int *iy, int *jy, int *descy, int *incy);
    
    
    extern "C" void pdgemm_(char *transa, char *transb, int *M, int *N, int *K, double *alpha, double *A, int *ia, int *ja, int *desca, double *B,
                int *ib, int *jb, int *descb, double *beta, double *C, int *ic, int *jc, int *descc);
    

    BLACS procedures are declared in the same way:

    extern "C" void blacs_get_(/*in*/int *icontxt, /*in*/int *what, /*out*/int *val); 
    

    I append the “_” character to procedure names, because BLAS and ScaLAPACK were built with -DAdd_ compiler option. This may be different for your system. If so, try objdump -t on libscalapack.a and other static library files to determine actual procedure names.

    Your program with ScaLAPACK calls may be compiled with something like this:

    mpicxx -o your_binary_name -O2 your_source.cpp -lscalapack -lblacs -lcblacs -lblacs -llapack -lblas -lgfortran
    

    Note that the order of static libraries in g++ invocation line (-lblacs -lcblacs -lblacs -llapack -lblas -lgfortran) is important! Also check the existance of all these static library files (libblas.a, libcblacs.a and so on) in the library directories. Don’t forget about Fortran package (for -lgfortran).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

please any one can provide me a good example of dotnetnuke module localization....i am
Can any one provide me an end to end example of using Dozer mapper
can any one provide me full 2 mapping file which implements cascade delete. measn
Can any one provide me code for consuming webservices via SOAP in java? Actually
How to install the oauth in php. Can any one provide me the full
Can any one provide a good link for a PHP-Rules tutorial? I can currently
I have a question about the Zend Framework 2, can some one provide an
I want to create a custom context menu . can any one provide me
QML: how to handle mouse over event on MouseArea? Can any one provide simple
Possible Duplicate: Can any one provide me a sample of Singleton in c++? C++

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.