Click here to Skip to main content
15,919,567 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
QuestionSTL List Pin
dotman115-May-12 5:05
dotman115-May-12 5:05 
AnswerRe: STL List Pin
«_Superman_»20-May-12 16:37
professional«_Superman_»20-May-12 16:37 
QuestionRe: STL List Pin
Aescleal21-May-12 4:55
Aescleal21-May-12 4:55 
AnswerRe: STL List Pin
Vitaly Tomilov10-Jun-12 9:53
Vitaly Tomilov10-Jun-12 9:53 
Questiongenerate the .H file from COM Pin
MrKBA14-May-12 1:38
MrKBA14-May-12 1:38 
AnswerRe: generate the .H file from COM Pin
Pablo Aliskevicius14-May-12 1:55
Pablo Aliskevicius14-May-12 1:55 
GeneralRe: generate the .H file from COM Pin
MrKBA14-May-12 1:58
MrKBA14-May-12 1:58 
GeneralRe: generate the .H file from COM Pin
Pablo Aliskevicius14-May-12 1:59
Pablo Aliskevicius14-May-12 1:59 
GeneralRe: generate the .H file from COM Pin
MrKBA14-May-12 2:02
MrKBA14-May-12 2:02 
AnswerRe: generate the .H file from COM Pin
Pete O'Hanlon14-May-12 2:08
mvePete O'Hanlon14-May-12 2:08 
GeneralRe: generate the .H file from COM Pin
MrKBA14-May-12 2:51
MrKBA14-May-12 2:51 
GeneralRe: generate the .H file from COM Pin
Pete O'Hanlon14-May-12 2:55
mvePete O'Hanlon14-May-12 2:55 
Questioncreating a dialog in non mfc application Pin
Rajeev.Goutham9-May-12 20:42
Rajeev.Goutham9-May-12 20:42 
AnswerRe: creating a dialog in non mfc application Pin
Richard MacCutchan9-May-12 22:12
mveRichard MacCutchan9-May-12 22:12 
AnswerRe: creating a dialog in non mfc application Pin
yu-jian15-May-12 6:17
yu-jian15-May-12 6:17 
QuestionHow to realize multi progress bar show at the same time ? Pin
redleafzzh2-May-12 4:02
redleafzzh2-May-12 4:02 
AnswerRe: How to realize multi progress bar show at the same time ? Pin
Richard MacCutchan2-May-12 6:28
mveRichard MacCutchan2-May-12 6:28 
AnswerRe: How to realize multi progress bar show at the same time ? Pin
Albert Holguin4-May-12 10:02
professionalAlbert Holguin4-May-12 10:02 
QuestionAsyncIO C++ Pin
TalSt29-Apr-12 0:55
TalSt29-Apr-12 0:55 
AnswerRe: AsyncIO C++ Pin
Richard MacCutchan2-May-12 6:26
mveRichard MacCutchan2-May-12 6:26 
AnswerRe: AsyncIO C++ Pin
Ashish Tyagi 4022-May-12 7:29
Ashish Tyagi 4022-May-12 7:29 
QuestionCUDA and MPI combination Pin
Ron120223-Apr-12 18:48
Ron120223-Apr-12 18:48 
Questionerror while loading shared libraries: libcudart.so.4: cannot open shared object file: No such file or directory Pin
Ron120220-Apr-12 18:48
Ron120220-Apr-12 18:48 
Hi,
I am trying to run following code which contains OpenMPI and CUDA.
 #include <stdio.h>
#include <stdlib.h>
#include <cuda.h>
#include <cuda_runtime.h>
#include <sys/time.h>
#include <mpi.h>

#define NREPEAT 10
#define NBYTES 10.e6

int main (int argc, char *argv[])
{
int rank, size, n, len, numbytes;
void *a_h, *a_d;
struct timeval time[2];
double bandwidth;
char name[MPI_MAX_PROCESSOR_NAME];
MPI_Status status;

MPI_Init (&argc, &argv);
MPI_Comm_rank (MPI_COMM_WORLD, &rank);
MPI_Comm_size (MPI_COMM_WORLD, &size);

MPI_Get_processor_name(name, &len);
printf("Process %d is on %s\n", rank, name);

printf("Using regular memory \n");
a_h = malloc(NBYTES);

cudaMalloc( (void **) &a_d, NBYTES);

/* Test host -> device bandwidth. */
MPI_Barrier(MPI_COMM_WORLD);

gettimeofday(&time[0], NULL);
for (n=0; n<NREPEAT; n )
{
cudaMemcpy(a_d, a_h, NBYTES, cudaMemcpyHostToDevice);
}
gettimeofday(&time[1], NULL);

bandwidth = time[1].tv_sec - time[0].tv_sec;
bandwidth = 1.e-6*(time[1].tv_usec - time[0].tv_usec);
bandwidth = NBYTES*NREPEAT/1.e6/bandwidth;

printf("Host->device bandwidth for process %d: %f MB/sec\n",rank,bandwidth);

/* Test MPI send/recv bandwidth. */
MPI_Barrier(MPI_COMM_WORLD);

gettimeofday(&time[0], NULL);
for (n=0; n<NREPEAT; n )
{
if (rank == 0)
MPI_Send(a_h, NBYTES/sizeof(int), MPI_INT, 1, 0, MPI_COMM_WORLD);
else
MPI_Recv(a_h, NBYTES/sizeof(int), MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
}
gettimeofday(&time[1], NULL);

bandwidth = time[1].tv_sec - time[0].tv_sec;
bandwidth = 1.e-6*(time[1].tv_usec - time[0].tv_usec);
bandwidth = NBYTES*NREPEAT/1.e6/bandwidth;

if (rank == 0)
printf("MPI send/recv bandwidth: %f MB/sec\n", bandwidth);

cudaFree(a_d);
free(a_h);

MPI_Finalize();
return 0;
} 

To compile I am using :

mpicc mpibandwidth.c -o mpibandwidth -I /usr/local/cuda/include -L /usr/local/cuda/lib -lcudart

To execute I am using :

/usr/local/bin/mpirun --mca btl tcp,self --mca btl_tcp_if_include eth0 --hostfile slaves -np 5 mpibandwidth

I am getting error after executing :
error while loading shared libraries: libcudart.so.4: cannot open shared object file: No such file or directory

My PATH and LD_LIBRARY_PATH variables are:

PATH = /usr/lib/qt-3.3/bin:/usr/local/ns-allinone/bin:/usr/local/ns- allinone/tcl8.4.18/unix:/usr/local/ns-allinone/tk8.4.18/unix:/ usr/local/cuda/cuda/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/ sbin:/usr/sbin:/sbin:/usr/local/lib/:/usr/local/lib/openmpi:/usr/ local/cuda/bin

LD_LIBRARY_PATH = :/usr/local/lib:/usr/local/lib/openmpi/:/usr/local/cuda/lib

:/usr/local/lib:/usr/local/lib/openmpi/:/usr/local/cuda/lib

libcudart.so.4 is present in usr/local/cuda/lib and it is in LD path

Any idea what is missing?
Can someone help please

Thanks
QuestionRe: error while loading shared libraries: libcudart.so.4: cannot open shared object file: No such file or directory Pin
Richard MacCutchan20-Apr-12 22:08
mveRichard MacCutchan20-Apr-12 22:08 
GeneralRe: error while loading shared libraries: libcudart.so.4: cannot open shared object file: No such file or directory Pin
Ron120220-Apr-12 22:16
Ron120220-Apr-12 22:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.