openMPI won't run: fatal error

I installed openMPI library through YaST. Now I’m trying to run a hello world and getting stuck.

I’ve tried:
which openmpi - no openmpi in /etc/etc…

Should I just go with brute force and install it manually or are there some tiny maneuver I missed?

Certainly not!

The executable are in /usr/lib64/mpi/gcc/openmpi/bin (on a 64bit system). Maybe you should add this directory to your path. Notice that there are some libraries in /usr/lib64/mpi/gcc/openmpi/lib64 that you might need too … I can not tell you more.

  • How can you get a “fatal error” without running the program? Or did you just call the fact that you didn’t find it a “fatal error”?

Huh… I tried to locate the folder you referred to. It’s not there, in fact it doesn’t seem to be anywhere to be found. (I searched ‘Everywhere’ on my comp and still noting.) I double check in YaST to see if I had uninstalled it, but no, it’s still check in the package list. I have openmpi and openmpi-devel installed, accord to Yast. Hmm…

Correction

I found the openmpi folder here: /usr/lib64/mpi/gcc/openmpi/bin

Could you explain what to do in a way that a even noob understands…?

Not really. I’m not doing parallel programming. Is that not what you are supposed to learn? I can just tell you that if you want to execute any program from anywhere, the directory where this program is located has to be in your PATH. But it’s the same under Windows. So you would have to add this directory in the environment variable PATH. Does the name “PATH” ring a bell? Further there is not an executable called “openmpi” in the openmpi package. So the command

which openmpi

will fail in any case. I would assume that the command you need to compile a C program will be mpicc or mpic++ for a C++ program. But you should rather ask your prof.

You can redefine and export your PATH in the file ~/.profile or ~/.bashrc if you’re using bash (under Linux, you do). Here’s an example:


PATH=$PATH:/usr/lib64/mpi/gcc/openmpi/bin
export PATH

If this is new to you, I’ll suggest learning Linux basics first. It will save you time after all. IMO, you need probably to do more than just adding this directory to your PATH. Or it might not even be needed if your working environment is set up properly. I have no idea.

The command to execute a program compiled with openmpi is mpirun.
please_try_again explained you already how to set your PATH variable.
In addition you should also add
/usr/lib64/mpi/gcc/openmpi/lib64
to the LD_LIBRARY_PATH variable.

I am a bit reluctant to post more details, because this somehow sounds
like doing your homework for you.


PC: oS 11.4 (dual boot 12.1) 64 bit | Intel Core i7-2600@3.40GHz | KDE
4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.8.0 |
nVidia ION | 3GB Ram

Am 29.01.2012 14:17, schrieb Martin Helm:
> The command to execute a program compiled with openmpi is mpirun.
> please_try_again explained you already how to set your PATH variable.
> In addition you should also add
> /usr/lib64/mpi/gcc/openmpi/lib64
> to the LD_LIBRARY_PATH variable.
>
> I am a bit reluctant to post more details, because this somehow sounds
> like doing your homework for you.
>
>
I forgot to add the easy way, run


source /usr/lib64/mpi/gcc/openmpi/bin/mpivars.sh

it sets the variables as you need it.
And please read the documentation, there is plenty
http://www.open-mpi.org/faq/?category=mpi-apps


PC: oS 11.4 (dual boot 12.1) 64 bit | Intel Core i7-2600@3.40GHz | KDE
4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.8.0 |
nVidia ION | 3GB Ram

Na… Using openSUSE was to get around the lack of OS-skills in the first place. You see I just want it to work, not work it myself.

Turns out the package was installed as root. I changed the permissions in the openmpi folder “PATH”. Now it seems to run smoothly.

Thank you for displaying such a patient attitude towards me and my posts. :sarcastic:

Am 29.01.2012 14:36, schrieb electricFuzz:
>
> please_try_again;2435164 Wrote:
>> If this is new to you, I’ll suggest learning Linux basics first. It will
>> save you time after all. IMO, you need probably to do more than just
>> adding this directory to your PATH. Or it might not even be needed if
>> your working environment is set up properly. I have no idea.
>
> Na… Using openSUSE was to get around the lack of OS-skills in the
> first place. You see I just want it to work, not work it myself.
>
> TURNS OUT THE PACKAGE WAS INSTALLED AS ROOT. I CHANGED THE PERMISSIONS
> IN THE OPENMPI FOLDER “PATH”. NOW IT SEEMS TO RUN SMOOTHLY.
>
> Thank you for displaying such a patient attitude towards me and my
> posts. :sarcastic:
>
>
Something probably unrelated. I just looked at a previous thread from
you “C/C++ Programming of Parallel Computers”, you mention openMP. I
hope it is completely clear to you that openmpi and openmp are
absolutely not the same.

If you want to program with openmp and not mpi you simply need to
install absolutely nothing except the gcc compiler because openmp is
part of gcc.
It is just adding a few preprocessor directives in your source code and
add the openmp switch when compiling to make the program parallel.
If that openmp was just a typo in your previous thread and you meant
openmpi instead ignore what I wrote.


PC: oS 11.4 (dual boot 12.1) 64 bit | Intel Core i7-2600@3.40GHz | KDE
4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.8.0 |
nVidia ION | 3GB Ram

Well the technical terms are somewhat confusing, I agree. We’re going to work in both mpi and openMP. First assignment is in mpi, well… openmpi in my case. :beat-up:

Thanks for the input!