CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   problem for parallel processing (https://www.cfd-online.com/Forums/openfoam-solving/146529-problem-parallel-processing.html)

minaret December 31, 2014 00:40

problem for parallel processing
 
hi
my system's CPU is core i7.
I have run some cases in parallel processing mode in openfoam version 2.1.1 on cae linux OS successfully.
but I can not do that in openfoam version 2.3.1 on openSUSE distribution.
for example this error appeared for cavity case:


dc@linux-37pc:~/Desktop/cavity> mpirun -np 4 icoFoam -parallel
--------------------------------------------------------------------------
It looks like opal_init failed for some reason; your parallel process is
likely to abort. There are many reasons that a parallel process can
fail during opal_init; some of which are due to configuration or
environment problems. This failure appears to be an internal failure;
here's some additional information (which may only be relevant to an
Open MPI developer):

opal_shmem_base_select failed
--> Returned value -1 instead of OPAL_SUCCESS
--------------------------------------------------------------------------
--------------------------------------------------------------------------
It looks like orte_init failed for some reason; your parallel process is
likely to abort. There are many reasons that a parallel process can
fail during orte_init; some of which are due to configuration or
environment problems. This failure appears to be an internal failure;
here's some additional information (which may only be relevant to an
Open MPI developer):

opal_init failed
--> Returned value Error (-1) instead of ORTE_SUCCESS
--------------------------------------------------------------------------
dc@linux-37pc:~/Desktop/cavity>




(pre!)thank you for the help! :cool:

wyldckat December 31, 2014 14:15

Greetings minaret,

Which installations instructions did you follow and which openSUSE version are you using?

Best regards,
Bruno

minaret January 1, 2015 01:09

Quote:

Originally Posted by wyldckat (Post 525726)
Greetings minaret,

Which installations instructions did you follow and which openSUSE version are you using?

Best regards,
Bruno

Dear wyldckat,
Suse version is 13.1

Do you mean installation of openfoam or suse? Both of them was almost normally. Except:
For openfoam,
I did this:

http://www.cfd-online.com/Forums/ope...t-running.html

wyldckat January 1, 2015 04:55

Hi minaret,

Sorry, I was asking about the instructions you had followed for installing OpenFOAM.

In that case, then please follow these instructions: http://openfoamwiki.net/index.php/In...2.3.1/openSUSE

Best regards,
Bruno

minaret January 1, 2015 06:38

Quote:

Originally Posted by wyldckat (Post 525784)
Hi minaret,

Sorry, I was asking about the instructions you had followed for installing OpenFOAM.

In that case, then please follow these instructions: http://openfoamwiki.net/index.php/In...2.3.1/openSUSE

Best regards,
Bruno

wow..
again installation???
it was quite difficult.
now I do not have enough time to do that again!
but I tried to install with the provider's instructions.
maybe later I try your suggestion.

thank you very much :)

wyldckat January 1, 2015 07:00

Quote:

Originally Posted by minaret (Post 525793)
wow..
again installation???
it was quite difficult.

Sorry, it's that these instructions should be fairly easier to follow and it's easier to diagnose if and when anything goes wrong with them.

Otherwise, it's considerably hard to diagnose what's wrong, without having to ask a lot of questions about your specific installation. Unless of course, you're willing to provide most of the details you've followed to perform the installation you currently have.

Nonetheless, there is one possible diagnosis that can be done right now - what do these commands give you?
Code:

mpirun --version
which mpirun


minaret January 2, 2015 04:37

Quote:

Originally Posted by wyldckat (Post 525795)
Sorry, it's that these instructions should be fairly easier to follow and it's easier to diagnose if and when anything goes wrong with them.

Otherwise, it's considerably hard to diagnose what's wrong, without having to ask a lot of questions about your specific installation. Unless of course, you're willing to provide most of the details you've followed to perform the installation you currently have.

Nonetheless, there is one possible diagnosis that can be done right now - what do these commands give you?
Code:

mpirun --version
which mpirun


hi wyldckat
thank you for your patiance.

linux-37pc:~ # mpirun --version
mpirun (Open MPI) 1.7.2

Report bugs to http://www.open-mpi.org/community/help/
linux-37pc:~ # which mpirun
/usr/lib64/mpi/gcc/openmpi/bin/mpirun
linux-37pc:~ #

wyldckat January 2, 2015 06:45

Hi minaret,

What does the following command give you?
Code:

ldd $(which icoFoam)
And what about this one:
Code:

echo $FOAM_MPI
Best regards,
Bruno

minaret January 2, 2015 07:07

Quote:

Originally Posted by wyldckat (Post 525905)
Hi minaret,

What does the following command give you?
Code:

ldd $(which icoFoam)
And what about this one:
Code:

echo $FOAM_MPI
Best regards,
Bruno

Hi wyldckat

dc@linux-37pc:~> ldd $(which icoFoam)
linux-vdso.so.1 (0x00007fff4eb9f000)
libfiniteVolume.so => /opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libfiniteVolume.so (0x00007f1f2a08c000)
libsampling.so => /opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libsampling.so (0x00007f1f29afc000)
libOpenFOAM.so => /opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so (0x00007f1f2918b000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f1f28f87000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f1f28c7f000)
libm.so.6 => /lib64/libm.so.6 (0x00007f1f2897c000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f1f28765000)
libc.so.6 => /lib64/libc.so.6 (0x00007f1f283b6000)
libPstream.so => /opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/openmpi-system/libPstream.so (0x00007f1f281a8000)
libtriSurface.so => /opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libtriSurface.so (0x00007f1f27f09000)
libmeshTools.so => /opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libmeshTools.so (0x00007f1f27931000)
libsurfMesh.so => /opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libsurfMesh.so (0x00007f1f2761d000)
libfileFormats.so => /opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libfileFormats.so (0x00007f1f2739d000)
liblagrangian.so => /opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/liblagrangian.so (0x00007f1f2717e000)
libconversion.so => /opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libconversion.so (0x00007f1f26f00000)
libz.so.1 => /lib64/libz.so.1 (0x00007f1f26cea000)
/lib64/ld-linux-x86-64.so.2 (0x00007f1f2b56e000)
libmpi.so.1 => /usr/lib64/mpi/gcc/openmpi/lib64/libmpi.so.1 (0x00007f1f26a1a000)
librt.so.1 => /lib64/librt.so.1 (0x00007f1f26812000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f1f265fa000)
libutil.so.1 => /lib64/libutil.so.1 (0x00007f1f263f7000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f1f261d9000)
libopen-rte.so.5 => /usr/lib64/mpi/gcc/openmpi/lib64/libopen-rte.so.5 (0x00007f1f25f6a000)
libopen-pal.so.5 => /usr/lib64/mpi/gcc/openmpi/lib64/libopen-pal.so.5 (0x00007f1f25ca9000)
dc@linux-37pc:~>


and this:

dc@linux-37pc:~> echo $FOAM_MPI
openmpi-system
dc@linux-37pc:~>


so I made a mistake about openfoam version. sorry. it is 2.3.0.
thanks

wyldckat January 2, 2015 10:09

Try adding this line to your "~/.bashrc" file, before the line that loads the OpenFOAM environment:
Code:

source /etc/profile.d/mpi-selector.sh
Then start a new terminal window and try again.

minaret January 2, 2015 12:40

Quote:

Originally Posted by wyldckat (Post 525921)
Try adding this line to your "~/.bashrc" file, before the line that loads the OpenFOAM environment:
Code:

source /etc/profile.d/mpi-selector.sh
Then start a new terminal window and try again.

hi
I added the line and ran cavity:

dc@linux-37pc:~/Desktop/cavity> mpirun -np 4 icoFoam -parallel
--------------------------------------------------------------------------
It looks like opal_init failed for some reason; your parallel process is
likely to abort. There are many reasons that a parallel process can
fail during opal_init; some of which are due to configuration or
environment problems. This failure appears to be an internal failure;
here's some additional information (which may only be relevant to an
Open MPI developer):

opal_shmem_base_select failed
--> Returned value -1 instead of OPAL_SUCCESS
--------------------------------------------------------------------------
--------------------------------------------------------------------------
It looks like orte_init failed for some reason; your parallel process is
likely to abort. There are many reasons that a parallel process can
fail during orte_init; some of which are due to configuration or
environment problems. This failure appears to be an internal failure;
here's some additional information (which may only be relevant to an
Open MPI developer):

opal_init failed
--> Returned value Error (-1) instead of ORTE_SUCCESS
--------------------------------------------------------------------------
dc@linux-37pc:~/Desktop/cavity>


is it good to update OS?
zypper update?

wyldckat January 2, 2015 14:57

Hi minaret,

Sorry, but the error message is too generic. If you and I had an openSUSE installation that was almost identical, and if I was able to reproduce the same error, it would be a lot easier for me to debug the problem and fix it.

Using "zypper update" is strongly advisable, usually in the sense of keeping your system up-to-date and with as many security fixes put into place as possible.
Nonetheless, if you haven't updated for quite sometime now, then you might get unexpected problems with the update, because there are too many variables on what could go wrong. On the other hand, if you have not added any strange repositories to zypper, then you should update your system's packages, since that should mean that openSUSE's quality assurance should make sure that any update made should not break one's system.

But still, if you haven't got time right now to spend updating the system and to fix any problems that could arise from an update that could go wrong, then it's best not to update.

And since your OpenFOAM version is installed at "/opt", I suspect that something didn't work the way it should have worked. Again, because I don't know what were the exact steps you've taken to install OpenFOAM, I'm not able to reproduce the same exact error you're getting.


You can at least try running the most basic tests:
  1. Run this command:
    Code:

    mpirun -np 2 ls
    If it gives the same exact error message, then there is something very wrong in your installation, since this command is one of the most simple ones we could use to run mpirun with.
  2. The other one is indicated by the following text:
    Quote:

    On how to test if MPI is working: post #4 of "openfoam 1.6 on debian etch", and/or post #19 of "OpenFOAM updates" - Note: As of OpenFOAM 2.0.0, the application "parallelTest" is now called "Test-parallel".
    This is from this blog post of mine: Notes about running OpenFOAM in parallel
Beyond this, I can't think of anything else than to suggest the steps that are suggested here: http://www.cfd-online.com/Forums/ope...tml#post428473 post #6

Best regards,
Bruno

minaret January 2, 2015 22:33

Quote:

Originally Posted by wyldckat (Post 525934)
Hi minaret,

Sorry, but the error message is too generic. If you and I had an openSUSE installation that was almost identical, and if I was able to reproduce the same error, it would be a lot easier for me to debug the problem and fix it.

Using "zypper update" is strongly advisable, usually in the sense of keeping your system up-to-date and with as many security fixes put into place as possible.
Nonetheless, if you haven't updated for quite sometime now, then you might get unexpected problems with the update, because there are too many variables on what could go wrong. On the other hand, if you have not added any strange repositories to zypper, then you should update your system's packages, since that should mean that openSUSE's quality assurance should make sure that any update made should not break one's system.

But still, if you haven't got time right now to spend updating the system and to fix any problems that could arise from an update that could go wrong, then it's best not to update.

And since your OpenFOAM version is installed at "/opt", I suspect that something didn't work the way it should have worked. Again, because I don't know what were the exact steps you've taken to install OpenFOAM, I'm not able to reproduce the same exact error you're getting.


You can at least try running the most basic tests:
  1. Run this command:
    Code:

    mpirun -np 2 ls
    If it gives the same exact error message, then there is something very wrong in your installation, since this command is one of the most simple ones we could use to run mpirun with.
  2. The other one is indicated by the following text:
    This is from this blog post of mine: Notes about running OpenFOAM in parallel
Beyond this, I can't think of anything else than to suggest the steps that are suggested here: http://www.cfd-online.com/Forums/ope...tml#post428473 post #6

Best regards,
Bruno

HI
thank you for the extended reply.
but again error.
although I tried to install as openfoam's provider instructions but it seems that I should install again as you said.
nowadays I must take two exams. and the night before I got some results for my project without parallel processing. but this will be continued after my exams.
So I should try your suggestion later.
thank you very much for your assistance.
best regards,
Ali

giu January 19, 2015 12:15

Hi minaret,
I believe I was facing the same problem as you did. When checking the following

Code:

which mpirun
which icoFoam

I found out that they were not in the same file directory:

Code:

student@sm-skp-lx09:/> which mpirun
/usr/lib64/mpi/gcc/openmpi/bin/mpirun
student@sm-skp-lx09:/> which icoFoam
/opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/bin/icoFoam

So what I did was to install mpirun again in the /opt directory following these instructions:
http://www.itp.phys.ethz.ch/educatio...es/openmpi.pdf

When it comes to the point of modifying the .bashrc it somehow didn't work for me to change the path. What I do since then is, instead of using the command mpirun, giving the whole path of where the command is located. In my case this means for executing icoFoam in parallel that I type:
/home/student/opt/openmpi/bin/mpirun -np 4 icoFoam -parallel

Probably not the most elegant solution, but I am finally just happy not to see this error message again.

Hope this helps for you too, in case you are still struggling with this!

Regards,
Julietta

minaret January 19, 2015 23:41

Quote:

Originally Posted by giu (Post 528170)
Hi minaret,
I believe I was facing the same problem as you did. When checking the following

Code:

which mpirun
which icoFoam

I found out that they were not in the same file directory:

Code:

student@sm-skp-lx09:/> which mpirun
/usr/lib64/mpi/gcc/openmpi/bin/mpirun
student@sm-skp-lx09:/> which icoFoam
/opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/bin/icoFoam

So what I did was to install mpirun again in the /opt directory following these instructions:
http://www.itp.phys.ethz.ch/educatio...es/openmpi.pdf

When it comes to the point of modifying the .bashrc it somehow didn't work for me to change the path. What I do since then is, instead of using the command mpirun, giving the whole path of where the command is located. In my case this means for executing icoFoam in parallel that I type:
/home/student/opt/openmpi/bin/mpirun -np 4 icoFoam -parallel

Probably not the most elegant solution, but I am finally just happy not to see this error message again.

Hope this helps for you too, in case you are still struggling with this!

Regards,
Julietta

hi
innovative :)
thanks. it works now by your method.
thank you for your assistance.

Best Regards,
Ali


All times are GMT -4. The time now is 00:44.