[mpich-discuss] Problems with running make
Gustavo Correa
gus at ldeo.columbia.edu
Sun Mar 2 10:43:20 CST 2014
Hi Ron
On Mar 2, 2014, at 7:20 AM, Ron Palmer wrote:
> Gus, Reuti, Rajeev and others,
> I do have mpif77 and mpif90 in mpi/bin, so I conclude that it has compiled ok.
>
It looks like it compiled the F77 and F90 MPICH interfaces with gfortran.
> I have checked reuti's suggestions, indicating that the environment is ok. I had added 'PATH=/my/mpi/bin:$PATH' to each of the .bashrc files (for the user I am running on all three)
>
Absolutely, you must setup the environment, PATH in particular, if MPICH is not
installed on a standard directory searched by Linux by default.
Just for our understanding:
Separate home directories on each computer, or a single home on NFS share?
> I am using the same username on all three computers - is that ok?
>
Rajeev may correct me if I am wrong,
but I think you *must* run MPI as the same user (name and UID) everywhere.
> I have installed MPI on to a NFS drive, all accessing the same; 'which' confirms. Are there any libraries that needs to be installed elsewhere? do need to run make install as root?
>
Great. That is the simplest thing to do in a small cluster/set of computers.
> I have added the 'LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/my/mpi/lib', though made no difference. (should those "{" and "}" be included? I entered it exactly like I have typed)
>
The curly braces are just to protect the string from shell overinterpretation.
You can remove them if you want, probably won't make any difference.
LD_LIBRARY_PATH is important if you built MPICH with shared libraries.
Check the MPICH lib directory for .so files, or do ldd cpi and see if there is any MPICH
shared libraries there.
> I have mpicc the cpi program as suggested by Gus and tried it, as well as the originally provided cpi (part of the downloaded mpi) which I called cpi_orig, see the screen shot below. It looks like there is an issue with libgfortran.so.3... Perhaps I have not got the various compilers installed correctly? I would appreciate if someone could give me a suggestion on how to properly remove and re-install these (and select the correct ones).
>
A) I am rather surprised that libgfortran is playing a role in cpi, which presumably is a C program.
Did you compile it with mpicc?
Did you compile the C cpi.c program, or did you compile a different program,
perhaps a Fortran version of it?
B) Having said that, I concur with what Reuti already told you.
Your gfortran installation may not be complete, it may lack runtime libraries, maybe
some include files.
Some times the Linux distribution packs them in separate rpms.
Try "yum list | grep gfortran", and install anything that you may not have.
NOTE: You *must install on ALL computers* otherwise the runtime will be missing
in some of them.
Note that rpms install on *local* directories (/usr and friends), not on you NFS share
(as opposed to what you did with MPICH).
Was this the issue?
So far you didn't say if the actual program you need to run is Fortran or C.
If it is Fortran you definitely need a Fortran compiler (gfortran) fully installed on all nodes.
What is it?
> By the way, in the runs of cpi below, I reduced the number of cores to be used on the first pc listed in the machinefile, from 8 to 4, in the case there was an issue with the 9th one. As can be seen, it is the first node (or core) on a remote computer where the problems start to be listed which is node 5 in this case...
>
I wild-guessed there might be a problem with rank 9, but that was only in *your program*.
In any case, the printout you sent before with your program output may have just
issued a red herring, not so important.
Let's concentrate on cpi for now.
If you get cpi running, it is a big leap forward, because after that you can
be sure MPICH is working with all bells and whistles.
Divide and conquer, so to speak.
Then you can address the issues with your program, which is a separate problem.
> If I run cpi on only one computer, it works. And yes, hostname works even if all computers are included in the machinefile.
>
I would guess something is blocking the launching of mpi tasks on the other computers.
Besides the head computer (seargent ?), where you seem to have turned off the firewall'
already, do you have firewalls in the *other* computers?
Any other access restrictions (on /hosts/deny /hosts/allow or other)?
Can you ssh passwordless *back and forth* across *any pair* of computers,
using the same user name and UID that you use to launch cpi and other MPI programs?
> Clear as mud, hey?
>
Cristal clear, as any issue with parallel programs. :)
I hope it helps,
Gus Correa
> Thanks for your help.
>
> Ron
>
>
> <ehddjihc.png>
>
>
> On 2/03/2014 05:20, Gustavo Correa wrote:
>> Hi Ron
>>
>> Please, see my comments inline.
>>
>> On Mar 1, 2014, at 6:29 AM, Reuti wrote:
>>
>>
>>> Hi,
>>>
>>> Am 01.03.2014 um 12:18 schrieb Ron Palmer:
>>>
>>>
>>>> Gus and others,
>>>> many thanks for your comments and suggestions. I am unsure whether I need fortran included as I am not in control of the software to be run on this linux cluster. I have asked but not yet got a reply...
>>>>
>>>> However, I did a yum search gfortran and installed the gcc-gfortran.x86_64 (I hope that was the one you referred to). I followed up with the ./configure ... as per your suggestion. That did not work. I then tried with only ./configure --prefix=/my/bin/folder. That worked so I also did make and make install.
>>>>
>>>>
>> Maybe there was a misspell in the configure command line with
>> I am not 100% sure about the required gfortran yum RPMs.
>> It may also need the corresponding "devel" package, if you want to check,
>> but I am not really sure. Maybe you already installed everything you need for
>> a functional gfortran.
>>
>> As far as I can tell from your c2.txt file, configure seems to have recognized gfortran.
>> I can't tell for sure if it actually built the MPICH F77 and F90, although chances are that it did.
>> However, you may check if you have mpif77 and mpif90 in the MPICH bin directory,
>> which would be a good sign.
>>
>> I would not leave the F77 and F90 interfaces out of the game,
>> because sooner or later somebody will come with a Fortran MPI program
>> to run on your machine.
>>
>>
>>>> I have a machinefile with three linux computers, all sharing the same mpi binaries. Running hostname on all 20 cores works, so I guess I should conclude that mpi works, right?
>>>>
>>> Are they using the same binaries /my/bin/folder for a non-interactive startup too, i.e.:
>>>
>>> $ ssh sargeant which hydra_pmi_proxy
>>>
>>> returns the same as on the master (maybe ~/.bashrc needs to set the $PATH)?
>>>
>>> -- Reuti
>>>
>>>
>> Make sure you check Reuti's suggestions.
>>
>> Did you install MPICH in an NFS shared (across all machines) directory,
>> or did you install on each machine in a local directory?
>>
>> As Reuti pointed out, the environment setup is important.
>> If MPICH is not installed in a directory that Linux searches by default, such as /usr or /usr/local,
>> you need to add the MPICH bin directory to the PATH, and probably the lib directory to
>> LD_LIBRARY_PATH (if built with shared libraries).
>> The simplest way is in the .bashrc/.tcshrc file in the user home directory (which I presume
>> is shared via NFS across the computers, otherwise you need to edit these files on each
>> computer)
>> Say:
>>
>> - bash:
>>
>> export PATH=${PATH}:/my/mpich/bin
>> export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/my/mpich/lib
>>
>> - tcsh:
>>
>> setenv PATH ${PATH}:/my/mpich/bin
>> setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/my/mpich/lib
>>
>> Also, you can go a long way troubleshooting these problems if you read the MPICH
>> documentation (Installer's Guide, User's Guide, README file)
>>
>>
>> http://www.mpich.org/documentation/guides/
>>
>>
>> If you really could run mpiexec hostname across all computers, I would guess you
>> don't have any security or network related issues (i.e. passwordless ssh works
>> across the nodes, there is no firewall blocking, the nodes names are properly
>> resolved most likely via /etc/hosts, and so on).
>>
>> To make sure MPICH works with a simple MPI program,
>> compile the cpi.c program in the examples directory (comes with the source code tarball),
>> and run it across all nodes.
>>
>> Something like this:
>>
>> mpicc -o cpi cpi.c
>> mpiexec -machinefile all_machines -np 24 ./cpi
>>
>> If it runs, then MPICH is alright, and any issues you are having with the other program,
>> are not an MPICH issue, but a bug or misconfiguration in the other program.
>>
>>
>>
>>>> I then tried the software I am supposed to run on the cluster. It works on all nodes on the master computer, but not if other computers are involved. I have captured the output from such failed attempt to run that software on all available nodes on all available computers in the cluster, see below. I have attached c2.txt and m2.txt (and the output of the failed run) in the attached gzipped file (the failed run in run2.txt and in the image below may not be from the same failed run...).
>>>>
>>>>
>>>> So, is it an issue for the software developers or is it an issue with mpich?
>>>>
>>>>
>> The screenshot you sent MPI ranks 9, 11,12, 14 don't printout their ranks.
>> This may or may not indicate a programming error, however combined with the fact that
>> the program fails in MPI_Barrier, which is a collective call, suggests it may be a bug in the program.
>> One possibility is that the MPI program is wrong, and somehow ranks 9,11,12,14
>> did not call MPI_Barrier (collective calls, as the name says, are collective,
>> must be called by all ranks in the "communicator").
>>
>> Another line of search would be that in both the screenshot and the run2.txt file
>> complain of "Communication error with rank 8" in the MPI_Barrier.
>> In each case rank 8 is in a different computer (gainsborough and constable).
>> It may be that rank 8 never called MPI_Barrier somehow.
>> For instance, MPI collective calls inside "if" conditionals can cause traps like this,
>> as the "if" condition may turn out to be true on some ranks and false on others.
>>
>> Judging from the small amount of output, the program seems to have failed
>> very early, which may help search for a possible bug (early in the code).
>>
>> However, these are just wild guesses.
>>
>> Is this an in-house program, public domain, or commercial software?
>> Anyway, this may be an issue to bring to that code developers.
>>
>> I hope this helps,
>> Gus Correa
>>
>>
>
> _______________________________________________
> discuss mailing list discuss at mpich.org
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss
More information about the discuss
mailing list