开发者

parallel program compiling error

开发者 https://www.devze.com 2023-04-13 07:48 出处:网络
I write a parallel code that I can compile it and run it under win7 but now I have to run it under linux ubuntu 11.04 when I co开发者_开发知识库mpile my code I get this error:

I write a parallel code that I can compile it and run it under win7 but now I have to run it under linux ubuntu 11.04 when I co开发者_开发知识库mpile my code I get this error:

usr/bin/ld :cannot find -lcr

collect2:ld returned 1 exit status

my compiler is mpicxx and I use mpich2. my code has about 3000 lines but I use the following code for testing

#include <iostream>
#include <mpi.h>

using namespace std;

int main(int argc, char ** argv){
    int mynode, totalnodes;
    MPI_Init(&argc,&argv);
    MPI_Comm_size(MPI_COMM_WORLD, &totalnodes);
    MPI_Comm_rank(MPI_COMM_WORLD, &mynode);
    cout << "Hello world from process " << mynode;
    cout << " of " << totalnodes << endl;
    MPI_Finalize();
}

and I use this command for compiling it mpicxx hello.cpp


usr/bin/ld :cannot find -lcr

Googling around shows the cr library is provided by the Berkeley Lab Checkpoint Restart (BLCR) package. I think you need to install it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号