LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-21-2005, 05:35 PM   #1
flyingman
LQ Newbie
 
Registered: Aug 2005
Posts: 14

Rep: Reputation: 0
parallell programming w/ MPI


Hi!

We're running MPI on a cluster.
I have just installed MPI on my laptop for testing and I need the compiler (mpicc) to wrap around the gcc compiler.

However, to do this I need to set an environmental variable called LAMMPICC:
This I can do manually:
bjornart@flyingman:~/pp$ LAMMPICC="gcc"
bjornart@flyingman:~/pp$ export LAMMPICC
(gcc is a symbolic link to the main compiler)

But how can I do it permanently? Which file should I edit?

mpicc (the MPI compiler) calls the i486-linux-gnu-gcc executable (a file that doesn't exist on my system) but I have no clue which configuration file I should edit in order to get the correct compiler to be called, nor where that config file is located.

So here's the command that is called whenever mpicc is called:

bjornart@flyingman:~/pp/test$ mpicc -show
i486-linux-gnu-gcc -I/usr/lib/lam/include -pthread -L/usr/lib/lam/lib -llammpio -llamf77mpi -lmpi -llam -lutil -ldl

I have looked into my .bash_profile but I can only find the PATH variable there.
So where should the LAMMPICC variable be?

cheerS!

Last edited by flyingman; 10-22-2005 at 06:30 AM.
 
Old 10-21-2005, 07:15 PM   #2
vladmihaisima
Member
 
Registered: Oct 2002
Location: Delft, Netherlands
Distribution: Gentoo
Posts: 196

Rep: Reputation: 33
And why don't you put LAMMPICC in you .bash_profile ?

About i486-linux-gnu-gcc my first thoughts would be to make either a symbolic link somewhere in you path to the real compiler or to create an alias in .bash_profile. But I'm not 100% sure this works - but it's not hard to test .
 
Old 10-22-2005, 06:30 AM   #3
flyingman
LQ Newbie
 
Registered: Aug 2005
Posts: 14

Original Poster
Rep: Reputation: 0
Hi! Thanks for your tip. Running Ubuntu I actually had to add LAMMPICC=gcc into my /etc/environment file.
/etc/profile nor ~/bash_profile wouldn't work at all.

Anyway, now it works. Only thing now is that when I run more than 17 nodes, MPI crashes and I have to run lamclean to make it work again:


bjornart@flyingman:~/pp/test$ mpirun -c 15 hello_world_MPI
Hello from process 1
Hello from process 2
Hello from process 3
Hello from process 4
Hello from process 5
Hello from process 6
Hello from process 7
Hello from process 8
Hello from process 9
Hello from process 10
Hello from process 11
Hello from process 12
Hello from process 13
Hello from process 14
bjornart@flyingman:~/pp/test$ mpirun -c 16 hello_world_MPI
Hello from process 1
Hello from process 2
Hello from process 3
Hello from process 4
Hello from process 5
Hello from process 6
Hello from process 7
Hello from process 8
Hello from process 9
Hello from process 10
Hello from process 11
Hello from process 12
Hello from process 13
Hello from process 14
Hello from process 15
^[[A^[[Dbjornart@flyingman:~/pp/test$ mpirun -c 17 hello_world_MPI
-----------------------------------------------------------------------------
The selected RPI failed to initialize during MPI_INIT. This is a
fatal error; I must abort.

This occurred on host flyingman (n0).
The PID of failed process was 7824 (MPI_COMM_WORLD rank: 11)
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
The selected RPI failed to initialize during MPI_INIT. This is a
fatal error; I must abort.

This occurred on host flyingman (n0).
The PID of failed process was 7825 (MPI_COMM_WORLD rank: 12)
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
The selected RPI failed to initialize during MPI_INIT. This is a
fatal error; I must abort.

This occurred on host flyingman (n0).
The PID of failed process was 7826 (MPI_COMM_WORLD rank: 13)
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
It seems that [at least] one of the processes that was started with
mpirun did not invoke MPI_INIT before quitting (it is possible that
more than one process did not invoke MPI_INIT -- mpirun was only
notified of the first one, which was on node n18).

mpirun can *only* be used with MPI programs (i.e., programs that
invoke MPI_INIT and MPI_FINALIZE). You can use the "lamexec" program
to run non-MPI programs over the lambooted nodes.
-----------------------------------------------------------------------------
bjornart@flyingman:~/pp/test$
 
Old 09-05-2008, 11:27 PM   #4
wearetherock
LQ Newbie
 
Registered: Jan 2008
Posts: 9

Rep: Reputation: 0
See
http://www.lam-mpi.org/MailArchives/...04/11/9132.php
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mpi chui_yap Programming 1 03-07-2006 07:22 AM
what do I need to know to use MPI kgustaf Linux - Networking 0 07-25-2005 04:13 PM
Parallell port Zip 100 drive RRolleston Debian 2 12-23-2004 07:48 PM
how to access to the parallell port with C?? xyzt Programming 2 04-02-2004 02:54 PM
Missing /dev/lp0 (parallell port) ??? comawhite Debian 1 09-25-2003 07:40 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration