Posted on November 28, 2008 by kurniawano
#include “mpi.h”
int main(int argc,char** argv)
{
MPI_Init(&argc,&argv);
…
…
MPI_Finalize();
}
then compile with
mpicxx
to run it, use
mpirun -np 4 ./a.out
for using 4 copies in 4 processors.
Filed under: Uncategorized | Tagged: Add new tag, c++, mpi | Leave a Comment »
Posted on November 28, 2008 by kurniawano
I am simulating a photodetector using Atlas from Silvaco. The simulation uses Luminous module to calculate the photocurrent for a range of optical wavelength. Somehow the simulation cannot converge for higher wavelengths.
It turns out due to the Schrodinger-Poisson calculation. I added in SCHRO in models statement since I wanted to calculate the conduction band [...]
Filed under: Uncategorized | Tagged: silvaco | Leave a Comment »
Posted on November 21, 2008 by kurniawano
I am currently trying out IT++ and so far it was great. It is as easy as Octave but written for C++ programming. One thing that I had trouble was that in my code I need to compute
complex acos(complex a)
However, it gives me error
for the function acos. It turns out acos for complex number was [...]
Filed under: Uncategorized | Tagged: c++, IT++ | 6 Comments »
Posted on November 20, 2008 by kurniawano
We can use “valgrind”, simply compile your code with -g option, and then run
valgrind –leak-check=full ./program > output.log
if you run “top” then you will see a process called “memcheck”.
this is a kind of output you will get:
==1651== Memcheck, a memory error detector.
==1651== Copyright (C) 2002-2007, and GNU GPL’d, by Julian Seward et al.
==1651== Using [...]
Filed under: Uncategorized | Tagged: c++, linux | Leave a Comment »
Posted on November 19, 2008 by kurniawano
I am currently trying to use IT++ in Kubuntu 8.04. Download the source from
http://itpp.sourceforge.net/
unzip the archive, and cd into the directory. Then do as usual: ./configure, make, make check, make install. But when I did a make check, 2 tests failed. It is documented in the FAQ #1. So I need to run configure as
./configure [...]
Filed under: Uncategorized | Tagged: c++, kubuntu, linux | 1 Comment »
Posted on November 18, 2008 by kurniawano
After I upgraded to Kubuntu Intrepid, knetwork-manager can detect wireless, and it’s activated, but it can never connect to the network.
After browsing through, I decided to try WICD, to install in Kubuntu, follow the instruction given in this page.
After installation, quit knetwork-manager, and run from konsole “wicd-client&”, this will run the tray application. click the [...]
Filed under: Uncategorized | Tagged: kubuntu, linux, ubuntu | Leave a Comment »
Posted on November 17, 2008 by kurniawano
One of the biggest annoyance in updgrading to Kubuntu Intrepid is that g77 is no longer in repository. So I need to install g77 from source. To do that:
wget http://gcc.releasenotes.org/releases/gcc-3.4.6/gcc-3.4.6.tar.gz
tar xvzf gcc-3.4.6.tar.gz
then cd to that directory, and run configure with this options:
./configure –enable-languages=c,f77 –disable-checking –prefix=$HOME/local
make CC=/usr/bin/gcc
make install
more info in this post.
UPDATE: I am having some [...]
Filed under: Uncategorized | Tagged: kubuntu, linux, ubuntu | 22 Comments »
Posted on November 12, 2008 by kurniawano
I am not sure what happened, but suddenly my kubuntu couldn’t connect to internet, while my windows can. It seems that my eth0 is activated, but somehow I couldn’t browse the net. I suspect it’s the DNS problem. So this is what I did and it solves the problem
# route add default gw 10.0.0.2
# cp [...]
Filed under: Uncategorized | Tagged: kubuntu, ubuntu | Leave a Comment »
Posted on November 10, 2008 by kurniawano
Previously I post on how to call GSL function, now it’s time for ARPACK. In octave, when you run interactively, you just need to run “eigs” for various matrix function. So Octave has provided some bindings to call ARPACK functions. So following the same steps as calling GSL function:
download arpack-1.0.6.tar.gz.
unzip the file and type [...]
Filed under: Uncategorized | Tagged: c++, octave | Leave a Comment »
Posted on November 7, 2008 by kurniawano
Kubuntu intrepid changed some of its settings and I can’t use my old method to disable my touchpad of my laptop. To overcome this problem,
sudo apt-get install gsynaptics
After that download shmconfig.fdi.tar.gz
extract the files and copy to
/etc/hal/fdi/policy/
restart your Kubuntu, and after login, go to Konsole and type
gsynaptics
You can disable your touchpad using the GUI. Hope this [...]
Filed under: Uncategorized | Tagged: kubuntu, linux, ubuntu | Leave a Comment »