parallel program compiling 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.
精彩评论