Click here to Skip to main content
       

ATL / WTL / STL

 
Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
GeneralRe: generate the .H file from COMmemberkhaliloenit14 May '12 - 2:51 
GeneralRe: generate the .H file from COMprotectorPete O'Hanlon14 May '12 - 2:55 
Questioncreating a dialog in non mfc applicationmemberRajeev.Goutham9 May '12 - 20:42 
AnswerRe: creating a dialog in non mfc applicationmvpRichard MacCutchan9 May '12 - 22:12 
AnswerRe: creating a dialog in non mfc applicationgroupyu-jian15 May '12 - 6:17 
QuestionHow to realize multi progress bar show at the same time ?memberredleafzzh2 May '12 - 4:02 
AnswerRe: How to realize multi progress bar show at the same time ?mvpRichard MacCutchan2 May '12 - 6:28 
AnswerRe: How to realize multi progress bar show at the same time ?memberAlbert Holguin4 May '12 - 10:02 
QuestionAsyncIO C++memberTalSt29 Apr '12 - 0:55 
AnswerRe: AsyncIO C++mvpRichard MacCutchan2 May '12 - 6:26 
AnswerRe: AsyncIO C++memberAshish Tyagi 4022 May '12 - 7:29 
QuestionCUDA and MPI combinationmemberRon120223 Apr '12 - 18:48 
Questionerror while loading shared libraries: libcudart.so.4: cannot open shared object file: No such file or directorymemberRon120220 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 directorymvpRichard MacCutchan20 Apr '12 - 22:08 
GeneralRe: error while loading shared libraries: libcudart.so.4: cannot open shared object file: No such file or directorymemberRon120220 Apr '12 - 22:16 
GeneralRe: error while loading shared libraries: libcudart.so.4: cannot open shared object file: No such file or directorymvpRichard MacCutchan20 Apr '12 - 22:39 
Questionhow to access the history list of CHtmlView?memberamwwcwujqw_18 Apr '12 - 23:03 
AnswerRe: how to access the history list of CHtmlView?member«_Superman_»22 Apr '12 - 17:38 
QuestionTrying to take ownership of a Directory but it fails...membervarunpandeyengg12 Apr '12 - 23:32 
Questionswprintf_s procedure not find in xpmembervishalgpt1 Apr '12 - 6:09 
AnswerRe: swprintf_s procedure not find in xpmvpRichard MacCutchan1 Apr '12 - 22:25 
Questionwindow hooks and control IDmemberdaemonna28 Mar '12 - 5:43 
AnswerRe: window hooks and control IDmember«_Superman_»28 Mar '12 - 21:58 
GeneralRe: window hooks and control IDmemberdaemonna28 Mar '12 - 22:27 
Questionusage of KeyboardLayout functionmembersubhendu_m27 Mar '12 - 4:38 
QuestionIWebBrowser2: When submitting data via a form, the form appears againmemberPachner20 Mar '12 - 1:36 
AnswerRe: IWebBrowser2: When submitting data via a form, the form appears againmemberPachner22 Mar '12 - 1:15 
QuestionRelease COM dll crash problem (Windows 7 64bit OS)memberkhaliloenit8 Mar '12 - 22:14 
AnswerRe: Release COM dll crash problem (Windows 7 64bit OS)memberbarneyman9 Mar '12 - 0:36 
GeneralRe: Release COM dll crash problem (Windows 7 64bit OS)memberkhaliloenit21 Mar '12 - 2:11 
AnswerRe: Release COM dll crash problem (Windows 7 64bit OS)mvpRichard MacCutchan9 Mar '12 - 20:52 
GeneralRe: Release COM dll crash problem (Windows 7 64bit OS)memberkhaliloenit21 Mar '12 - 2:11 
GeneralRe: Release COM dll crash problem (Windows 7 64bit OS)memberbarneyman21 Mar '12 - 2:34 
GeneralRe: Release COM dll crash problem (Windows 7 64bit OS)memberkhaliloenit21 Mar '12 - 2:46 
GeneralRe: Release COM dll crash problem (Windows 7 64bit OS)memberbarneyman21 Mar '12 - 12:25 
AnswerRe: Release COM dll crash problem (Windows 7 64bit OS)memberkhaliloenit21 Mar '12 - 2:10 
QuestionHow do I detect when a print job starts?memberLetsMond2 Mar '12 - 1:11 
AnswerRe: How do I detect when a print job starts?memberjeson_park7 Mar '12 - 20:27 
GeneralRe: How do I detect when a print job starts?memberLetsMond7 Mar '12 - 22:30 
QuestionATL Sink in .NET processmemberVikram123428 Feb '12 - 15:50 
AnswerRe: ATL Sink in .NET processmemberbarneyman29 Feb '12 - 16:01 
GeneralRe: ATL Sink in .NET processmemberVikram123429 Feb '12 - 16:10 
GeneralRe: ATL Sink in .NET processmemberbarneyman29 Feb '12 - 16:17 
GeneralRe: ATL Sink in .NET processmemberVikram123429 Feb '12 - 16:22 
GeneralRe: ATL Sink in .NET processmemberVikram12341 Mar '12 - 7:56 
GeneralRe: ATL Sink in .NET processmemberbarneyman1 Mar '12 - 17:36 
AnswerRe: ATL Sink in .NET processmemberThatsAlok21 Jun '12 - 23:10 
QuestionGet Notification of Wrong Password AttemptmemberMember 857955627 Feb '12 - 3:42 
AnswerRe: Get Notification of Wrong Password AttemptmvpRichard MacCutchan27 Feb '12 - 4:19 
AnswerRe: Get Notification of Wrong Password Attemptmemberpeterchen24 Mar '12 - 6:32 

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


Advertise | Privacy | Mobile
Web01 | 2.6.130516.1 | Last Updated 19 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid