Posts

The state of my cloud as of now

Image
not so good :(

Testing Intel’s Parallel Studio

Image
Part 1 – OpenMP Intel claims to bring simplified “end-to-end parallelism to Microsoft Visual Studio C/C++ developers with Intel® Parallel Studio” [1]. I used a simple OpenMP parallel HelloWorld program to study this new tool which comes as an add-on to Visual Studio 2008.The program listing is enclosed in Figure 1.   1: #include <omp.h> 2: #include <stdio.h> 3: // a function to consume cpu time: 4: void consume() { 5: int i; 6: long n=100000000; 7: double s=0; 8: for (i=1;i<n;i++) 9: s+=( double )1/( double )i; 10: } 11: int main ( int argc, char *argv[]) { 12: int th_id, nthreads=5; 13: omp_set_num_threads(nthreads); 14: #pragma omp parallel private (th_id) 15: { 16: th_id = omp_get_thread_num(); 17: consume(); 18: printf( "Hello World from thread %d\n" , th_id); 19: #pragma omp barrier 20: if ( th_id == 0 ) { 21:...

Nvidia Nsight Installation Failed

Image
I have a Windows 7 (64bits) OS with Visual Studio 2008 with SP1. After starting  Parallel_Nsight_Host_Win64_1.0.10200 (Jul 2010) I got the following error message: “ The required version of Visual Studio (2008 SP1) was not detected ” – see screen capture: I guess the problem is in the system registry of VS2008 which partly located  as a 32bit system and partly as a 64bit system and Nsight didn’t find what it expected.  SP1 seems to be installed as can be seen in the image below:   It turned out that although SP1 is installed, it was not installed correctly. After trying to reinstall SP1 I got the following error message: I checked the log file:   Exe (C:\Users\telzur\AppData\Local\Temp\Microsoft Visual Studio 2008 SP1\VC_x86Runtime.exe) succeeded. [8/6/2010, 18:34:11] (IronSpigot::ExeInstallerBase::PerformAction) Log File: dd_VC_x86RuntimeMSI18CE.txt [8/6/2010, 18:34:11] (IronSpigot::ExeInstallerBase::PerformAction) Log File: dd_VC_x86RuntimeUI18CE.tx...

Sharing USB disk with Virtual Box guest OS

Assuming the host OS is Windows and the guest OS is Linux (CentOS in my case): make a directory at the guest OS for the flash storage: mkdir /home/telzur/shared Plug the memory stick and check the guest OS log: tail /var/log/messages find the name of the new device, in my case, ./dev/sdb1 as root: mount –t vfat /dev/sdb1 /home/telzur/shared Your files are now in the shared folder. Enjoy!

Parallel Computing with Python and MPI

Image
I installed PyMPI (version 2.5b0) on my CentOS  5.5 (as a VirtualBox guest system). The following short demo works: import mpi import time time.sleep(10) print "Hello World! my rank=", mpi.rank, " group size is=", mpi.size see screen capture: Before installing PyMPI I installed these packages: 1. MPICH2 2. Python-develop Installation of PyMPI: 1. ./configure --with-includes=-I/usr/local/include 2. make 3. make check 4. make install  (as root) Good luck!

A day with my laptop

When I came in the morning to work on my laptop I discovered that it had restarted due to some critical updates by Microsoft. One hour later iTunes opened a pop-up window and asked me to install a new version. So I allowed it. Tons of megabytes were downloaded and network became slow. Then, The AVG Anti-Virus had updated its Definition Table. I like when this happens, it gives me a good feeling that my laptop is well taken care, but then also appeared a notification about a serious patch which required a restart. OK, I confirmed that. At noon, Firefox installed a new version and requested a permission to restart as well, So I confirmed that too. Then, a few of my favorites plug-ins had stopped working because they were not compatible anymore with the new version of Firefox. Just then, without any correlation, the USB driver hung and the mouse was dead. so I gave up the mouse and continued to work with the touch pad. Then, the computer was slow. I got angry and opened the Task Manager t...

How to count the number of cores in a Linux machine

Image
Use the following command: cat /proc/cpuinfo | grep processor | wc –l It is convenient to put it in a script which I will call, for example, ncores: #!/bin/sh cat /proc/cpuinfo | grep processor | wc –l See enclosed screen shot: