Processor is a file. Harddisk is a file. Keyboard is a file. Mouse is a file. Battery is a file. Thermal sensor is a file. LCD display is a file. You can read/write to those devices. In my old Toshiba laptop, I do these to:
$ cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 8 model name : Pentium III (Coppermine) stepping : 10 cpu MHz : 994.720 cache size : 256 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 2 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pse36 mmx fxsr sse up bogomips : 1989.44 clflush size : 32 power management:Note: cat is a command to output file content.
$ cat /proc/acpi/toshiba/lcd brightness: 7 brightness_levels: 8
$ sudo geany /proc/acpi/toshiba/lcd
$ cat /proc/acpi/thermal_zone/THRM/temperature temperature: 53 C
$ cat /proc/acpi/battery/BAT1/state present: yes capacity state: ok charging state: charging present rate: 1806 mA remaining capacity: 333 mAh present voltage: 11340 mV
You see, everything in Linux is abstracted into file.
Comments (2) 03.11.2009. 18:20
$ sudo apt-get install libopenmpi-dev $ sudo apt-get install openmpi-bin $ sudo apt-get install openmpi-doc $ sudo apt-get install ssh
$ ssh-keygen -t dsa $ cd ~/.ssh $ cat id_dsa.pub >> authorized_keys
#include <stdio.h>
#include <mpi.h>
int main(int argc, char** argv) {
int myrank, nprocs;
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
MPI_Comm_rank(MPI_COMM_WORLD, &myrank);
printf("Hello from processor %d of %d\n", myrank, nprocs);
MPI_Finalize();
return 0;
}
$ mpicc MPI_Hello.c -o MPI_Hello
$ mpiexec -n 5 MPI_Hello
Continue reading Comments (2) 14.03.2009. 18:13

C:\Dev-Cpp\Templates


Continue reading Comments (0) 13.03.2009. 19:26
Salah satu algoritme perkalian matriks paralel adalah algoritme Fox. Algoritme Fox mirip dengan algoritme Cannon. Keduanya menggunakan skema dekomposisi data checkerboard yang membagi matriks ke dalam blok-blok persegi. Algoritme Fox bekerja dalam tiga langkah tiap iterasinya, yaitu broadcast, multiply, dan roll.
Laporan berikut ini membahas tentang algoritme Fox menggunakan metode Foster beserta dengan analisis kompleksitas dan isoefisiensinya. Laporan ini disusun sebagai tugas akhir mata kuliah Pemrosesan Paralel Departemen Ilmu Komputer IPB. Terima kasih kepada teman-teman sekelompok yang telah membantu dalam penyusunan laporan ini.
Download: Laporan (662k) | Presentasi (610k) | MPI Code (15k)
Comments (0) 14.02.2009. 09:40
Laporan di bawah ini berisi instalasi dan konfigurasi MPICH2 untuk Windows XP. Juga terdapat kasus uji dengan menggunakan program merge sort paralel. Laporan ini disusun sebagai tugas akhir praktikum Pemrosesan Paralel Departemen Ilmu Komputer IPB. Terima kasih kepada teman-teman sekelompok yang telah membantu dalam menyelesaikan laporan ini.
Download: Laporan (923k) | Presentasi (288k) | MPI Code (4k)
Comments (0) 14.02.2009. 09:07