|
Hello,
am have been working on buiding a High Performance Computing Cluster, i decided to use Michaels PelicanHPC v2.2 and have been practicing generic mpi programming and then tried to understand the octave- mpi examples on the live cd, like kernel_example. reffered to also the old parallel knoppix mpi examples like montecarlo, kernel so that i could deeply understand the concept of parallel programming, i seem to well appreciate the concept of parallel programming. However now i want to have hands on based approach with the examples and concepts of octave and mpi i have bn understanding. On opening the octave script, it looks like i cant write my code and save it so that i can compile and run it, like how i was doing when i was doing the generic mpi, I go to pico/nano editor and write my code, save it then run it at the command prompt. so my problem is i cant do something similar in octave script. i really feel stuck going ahead on rewriting the code in the octave command prompt though i understand the concepts. help me. |
|
Administrator
|
I'm not sure what the problem is exactly. How exactly are you running kernel_example on PelicanHPC? From the terminal prompt or from the Octave prompt?
|
|
am not actually running kernel_example, am trying to learn by practice by rewriting the kernel_example code myself from start in the octave prompt, may be i edit out some parts of the code to see the behaviour of the output but it does seem to work for me.
i have looked at pelican V2.6 Econometrics document chapter 22 Sections of Using text editor for Octave, where u can prepare programs with NEdit & call octave from within editor, which almost appear like they explain using the editor in octave, but iam confused on how to start using the octave editor, it doesnot seem straight forward like using the text editor for writing generic mpi programs, which u can after compile, and then run at terminal prompt. my major problem is am still failing to use the (octave - hands on) for writing parallel programs which i have been learning. hope u now understand my problem |
|
In reply to this post by Michael Creel
the pelican version 2.6 browser doesnt seem to connect to the internet, it tells me the protocol is not supported, do why need to install any kind of additional packages. i have tried it on two different networks and it still says the protocol is not supported on both of the networks.
|
|
Does your frontend have two networking devices? If you have only 1 and you use it for the cluster, you have no connection. If you have a laptop with ethernet and wireless, you can use ethernet for the cluster and wireless for the internet connection. A wireless cluster is possible too, but a little silly.
|
|
well my frontend is a desktop which initially had one network card.
However i added a second network card already, so am trying to install the drivers for the 2nd LAN Card but i need to connect to the internet in order to get the sources, but when i try to browse with my first NIC Connected to the LAN point, it says the protocol is not supported. |
|
In reply to this post by Michael Creel
am not actually running kernel_example, am trying to learn by practice by rewriting the kernel_example code myself from start in the octave prompt, may be i edit out some parts of the code to see the behaviour of the output but it does seem to work for me.
i have looked at pelican V2.6 Econometrics document chapter 22 Sections of Using text editor for Octave, where u can prepare programs with NEdit & call octave from within editor, which almost appear like they explain using the editor in octave, but iam confused on how to start using the octave editor, it doesnot seem straight forward like using the text editor for writing generic mpi programs, which u can after compile, and then run at terminal prompt. my major problem is am still failing to use the (octave - hands on) for writing parallel programs which i have been learning. hope u now understand my problem |
|
Administrator
|
This post was updated on .
Editing from the Octave prompt justs opens up whatever text editor is specified in ~/.octaverc. On PelicanHPC it's either vim or kate, I don't remember right now what the released images use. There's no need to edit Octave scripts from octave, though, they can be edited outside octave using whatever editor you like. Also, Octave is interpreted, not compiled, so you don't have any compilation step. There is a bit of background on Octave you need to learn before trying to write your own scripts that use MPI.
Regarding internet access from PelicanHPC, if your machine receives an IP from a dhcp server, you should have a connection automatically. If not, then you need to configure networking. All of this works just as with Debian GNU Linux. If your net cards are not supported by the Debian kernel, then that could explain the problem. |
|
Thanx a lot Michael, i will take a study on this background bit you suggested. also i will cross check my network cards support.
|
|
In reply to this post by Michael Creel
Hello M.
I have been able to use the vim editor manual to learn how to use the editor for writing and editing scripts in octave. thanx a lot. i now try to combine the use of mpi and octave codes script practicing, but when i run the octave and mpi code, i get an error : 'mpirun' undefined near line 2 column 1. am abit lost on what the problem could be, i thought i have initialized the mpi execution environment and most of the mpi send and receive concepts seem to be ok , but i dont know why it still says mpirun undefined, may be something is missing . heres the code, a section of the kernel example code, : function Taza( n, use_mpi, show_plot) if (nargin < 1) n= 2000; endif if (nargin < 2) use_mpi = false; endif if (nargin <3) show_plot = true; endif if ((use_mpi) && not (MPI_Initialized)) MPI_Init; endif x = (0:n-1)/n; x = x'; trueline = sin(2*pi*x) + cos(10*2*pi*x); sig = 0.5; y = trueline + sig*randn(n,1); sig = 0.5; y2 = trueline2 + sig*rand(n,1); y = [y y2]; trueline = [trueline trueline2]; if use_mpi CW = MPI_Comm_Load("NEWORLD"); nodes = MPI_Comm_size(CW); if (nodes < 2) MPI_Finalize; error("kernel_example: when using MPI, must specify at least 2 ranks"); endif if (not(MPI_Comm_rank(CW)) & (nodes > 1)) for i=1: nodes-1 MPI_Send(y, i, 42, CW); endfor else y = MPI_Recv(0,42,CW); endif i decided to only run this section to see the behaviour so i used the following command at the octave prompt to run the code On my virtual cluster of 2 nodes: mpirun -np 2 --hostfile /home/user/tmp/bhosts octave -q --eval " Taza(2000,true,false)" |
|
Administrator
|
You need to make the mpirun call from the terminal prompt, not from the Octave prompt. Do it just like you do for kernel_example.
|
|
In reply to this post by Michael Creel
i have been trying to use octave on the pelicanhpc to run a model simulation for Pricing the Asian Options and it seems to work well so far, however i have also read and understood some background information about Option pricing. but now i want to try and parallelize the same simulation on about 3 computer nodes and see how the response would look like. it involves using MPI library to assume communications between the processors using the predefined routines for the interprocessors communication.(i.e MPI_Send,MPI_Recv etc).
there seems to be various schemes for parallezing the montecarlo method for Pricing ASIAN Options. i have done some introduction to parallel programming tutorials with MPI. thou since am a newbie to this modelling, i do not know which method scheme is most suitable for parallelizing the montecarlo simulation for begginers.( thou i have had a brief overview of trapezium scheme but it was confusing), i request for your guidance on this dilemma and a deeper insight on how i can tackle this confusion of having to parallelize the simulation model using MPI on my pelican hpc cluster. |
|
In reply to this post by Michael Creel
i have been trying to use octave on the pelicanhpc to run a model simulation for Pricing the Asian Options and it seems to work well so far, however i have also read and understood some background information about Option pricing. but now i want to try and parallelize the same simulation on about 3 computer nodes and see how the response would look like. it involves using MPI library to assume communications between the processors using the predefined routines for the interprocessors communication.(i.e MPI_Send,MPI_Recv etc).
there seems to be various schemes for parallezing the montecarlo method for Pricing ASIAN Options. i have done some introduction to parallel programming tutorials with MPI. thou since am a newbie to this modelling, i do not know which method scheme is most suitable for parallelizing the montecarlo simulation for begginers.( thou i have had a brief overview of trapezium scheme but it was confusing), i request for your guidance on this dilemma and a deeper insight on how i can tackle this confusion of having to parallelize the simulation model using MPI on my pelican hpc cluster. |
|
Administrator
|
There is a file called mc_example.m on PelicanHPC which shows how you can do Monte Carlo, and the main funcion which is used is montecarlo.m.
|
| Powered by Nabble | See how NAML generates this page |
