[OMPI users] Openmpi ./configure error - Fortran compiling error
Hi there, I'm having some trouble installing Openmpi and, not being too savvy with these sorts of things, I'm in need of some help. I think the problem is something to do with locating the lf2c libraries. Here's what I've done: >From the openmpi directory I do a *./configure* it spits out loads of stuff until I get: *** Fortran 90/95 compiler checking for gfortran... gfortran checking whether we are using the GNU Fortran compiler... yes checking whether gfortran accepts -g... yes checking if Fortran 77 compiler works... no ** * It appears that your Fortran 77 compiler is unable to produce working * executables. A simple test application failed to properly * execute. Note that this is likely not a problem with Open MPI, * but a problem with the local compiler installation. More * information (including exactly what command was given to the * compiler and what error resulted when the command was executed) is * available in the config.log file in this directory. ** configure: error: Could not run a simple Fortran 77 program. Aborting. So after a bit of messing around making sure gfortran is installed - I thought it came with XCode - I compile a simple "Hello World" fortran file just to make sure it works, and it did. I also checked (after looking at the config.log) that f2c was working, and it does. I think the relevant text from the output log is below, but the whole thing is attached. configure:28274: checking for gfortran configure:28290: found /usr/local/bin/gfortran configure:28301: result: gfortran configure:28327: checking for Fortran compiler version configure:28336: gfortran --version >&5 GNU Fortran (GCC) 4.8.0 20120603 (experimental) Copyright (C) 2012 Free Software Foundation, Inc. GNU Fortran comes with NO WARRANTY, to the extent permitted by law. You may redistribute copies of GNU Fortran under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING configure:28347: $? = 0 configure:28336: gfortran -v >&5 Using built-in specs. COLLECT_GCC=gfortran COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin11.4.0/4.8.0/lto-wrapper Target: x86_64-apple-darwin11.4.0 Configured with: ../gcc-4.8-20120603/configure --enable-languages=fortran Thread model: posix gcc version 4.8.0 20120603 (experimental) (GCC) configure:28347: $? = 0 configure:28336: gfortran -V >&5 gfortran: error: unrecognized command line option '-V' gfortran: fatal error: no input files compilation terminated. configure:28347: $? = 1 configure:28336: gfortran -qversion >&5 gfortran: error: unrecognized command line option '-qversion' gfortran: fatal error: no input files compilation terminated. configure:28347: $? = 1 configure:28356: checking whether we are using the GNU Fortran compiler configure:28369: gfortran -c conftest.F >&5 configure:28369: $? = 0 configure:28378: result: yes configure:28384: checking whether gfortran accepts -g configure:28395: gfortran -c -g conftest.f >&5 configure:28395: $? = 0 configure:28403: result: yes configure:28580: checking if Fortran 77 compiler works configure:28609: /usr/local/scisoft//packages/iraf/iraf/unix/hlib//f77.sh -o conftest -L/usr/local/scisoft/lib/ conftest.f >&5 + PATH=/v/bin:/bin:/usr/bin:/usr/local/bin + s=/tmp/stderr_45833 + t=/tmp/f77_45833 + CC=cc + CFLAGS='-O3 -DNDEBUG -I/usr/local/scisoft/include/ -finline-functions -fno-strict-aliasing' + EFL=/v/bin/efl + EFLFLAGS='system=portable deltastno=10' + F2C=/usr/local/scisoft//packages/iraf/iraf/unix/bin.macintel//f2c.e + F2CFLAGS='-KRw8 -Nn802' + keepc=0 + warn=1 + xsrc=0 + rc=0 + lib=/lib/num/lib.lo + trap 'rm -f /tmp/stderr_45833 ; exit $rc' 0 + OUTF=a.out + cOPT=1 + G= + CPP=/bin/cat + CPPFLAGS= + case $? in + test X-o '!=' X-- + case "$1" in + OUTF=conftest + shift 2 + test X-L/usr/local/scisoft/lib/ '!=' X-- + case "$1" in + echo 'invalid parameter -L/usr/local/scisoft/lib/' invalid parameter -L/usr/local/scisoft/lib/ + shift + test Xconftest.f '!=' X-- + case "$1" in + set -- -- conftest.f + test X-- '!=' X-- + shift + test -n conftest.f + case "$1" in + case "$1" in + f=.f ++ basename conftest.f .f + b=conftest + '[' 1 = 0 ']' + /usr/local/scisoft//packages/iraf/iraf/unix/bin.macintel//f2c.e -KRw8 -Nn802 conftest.f conftest.f: MAIN main: + '[' 0 = 1 ']' + cc -c -O3 -DNDEBUG -I/usr/local/scisoft/include/ -finline-functions -fno-strict-aliasing conftest.c + rc=0 + sed '/parameter .* is not referenced/d;/warning: too many parameters/d' /tmp/stderr_45833 conftest.c:17:1: warning: control reaches end of non-void function [-Wreturn-type] } /* MAIN__ */ ^ conftest.c:19:52: warning: control reaches end of non-void function [-Wreturn-type] /* Main program alias */ int main_ () { MAIN__ (); } ^ 2 warnings generated. + case $rc in + '[' 0 = 0 ']' + rm -f conftest.c + OF
Re: [OMPI users] Openmpi ./configure error - Fortran compiling error
FWIW, Xcode does not come with a Fortran compiler. You must have gotten that elsewhere (perhaps hpc.sf.net, or Macports?). I can't tell from the files you sent, but perhaps you have an environment variable for FC that specifies gfortran, and an F77 environment variable that specifies /usr/local/scisoft//packages/iraf/iraf/unix/hlib//f77.sh ...? I say this because it seems to be picking up that script for the Fortran 77 compiler, and it doesn't seem to work. If you use gfortran for both, it should work. Or, if you don't need Fortran support, you can --disable-mpi-f77 and it should disable both f77 and f90 MPI support. On Aug 17, 2012, at 3:18 AM, matty hbnkjb wrote: > Hi there, > > I'm having some trouble installing Openmpi and, not being too savvy with > these sorts of things, I'm in need of some help. I think the problem is > something to do with locating the lf2c libraries. > > Here's what I've done: > > From the openmpi directory I do a ./configure it spits out loads of stuff > until I get: > > *** Fortran 90/95 compiler > checking for gfortran... gfortran > checking whether we are using the GNU Fortran compiler... yes > checking whether gfortran accepts -g... yes > checking if Fortran 77 compiler works... no > ** > * It appears that your Fortran 77 compiler is unable to produce working > * executables. A simple test application failed to properly > * execute. Note that this is likely not a problem with Open MPI, > * but a problem with the local compiler installation. More > * information (including exactly what command was given to the > * compiler and what error resulted when the command was executed) is > * available in the config.log file in this directory. > ** > configure: error: Could not run a simple Fortran 77 program. Aborting. > > So after a bit of messing around making sure gfortran is installed - I > thought it came with XCode - I compile a simple "Hello World" fortran file > just to make sure it works, and it did. I also checked (after looking at the > config.log) that f2c was working, and it does. > > I think the relevant text from the output log is below, but the whole thing > is attached. > > configure:28274: checking for gfortran > configure:28290: found /usr/local/bin/gfortran > configure:28301: result: gfortran > configure:28327: checking for Fortran compiler version > configure:28336: gfortran --version >&5 > GNU Fortran (GCC) 4.8.0 20120603 (experimental) > Copyright (C) 2012 Free Software Foundation, Inc. > > GNU Fortran comes with NO WARRANTY, to the extent permitted by law. > You may redistribute copies of GNU Fortran > under the terms of the GNU General Public License. > For more information about these matters, see the file named COPYING > > configure:28347: $? = 0 > configure:28336: gfortran -v >&5 > Using built-in specs. > COLLECT_GCC=gfortran > COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin11.4.0/4.8.0/lto-wrapper > Target: x86_64-apple-darwin11.4.0 > Configured with: ../gcc-4.8-20120603/configure --enable-languages=fortran > Thread model: posix > gcc version 4.8.0 20120603 (experimental) (GCC) > configure:28347: $? = 0 > configure:28336: gfortran -V >&5 > gfortran: error: unrecognized command line option '-V' > gfortran: fatal error: no input files > compilation terminated. > configure:28347: $? = 1 > configure:28336: gfortran -qversion >&5 > gfortran: error: unrecognized command line option '-qversion' > gfortran: fatal error: no input files > compilation terminated. > configure:28347: $? = 1 > configure:28356: checking whether we are using the GNU Fortran compiler > configure:28369: gfortran -c conftest.F >&5 > configure:28369: $? = 0 > configure:28378: result: yes > configure:28384: checking whether gfortran accepts -g > configure:28395: gfortran -c -g conftest.f >&5 > configure:28395: $? = 0 > configure:28403: result: yes > configure:28580: checking if Fortran 77 compiler works > configure:28609: /usr/local/scisoft//packages/iraf/iraf/unix/hlib//f77.sh -o > conftest -L/usr/local/scisoft/lib/ conftest.f >&5 > + PATH=/v/bin:/bin:/usr/bin:/usr/local/bin > + s=/tmp/stderr_45833 > + t=/tmp/f77_45833 > + CC=cc > + CFLAGS='-O3 -DNDEBUG -I/usr/local/scisoft/include/ -finline-functions > -fno-strict-aliasing' > + EFL=/v/bin/efl > + EFLFLAGS='system=portable deltastno=10' > + F2C=/usr/local/scisoft//packages/iraf/iraf/unix/bin.macintel//f2c.e > + F2CFLAGS='-KRw8 -Nn802' > + keepc=0 > + warn=1 > + xsrc=0 > + rc=0 > + lib=/lib/num/lib.lo > + trap 'rm -f /tmp/stderr_45833 ; exit $rc' 0 > + OUTF=a.out > + cOPT=1 > + G= > + CPP=/bin/cat > + CPPFLAGS= > + case $? in > + test X-o '!=' X-- > + case "$1" in > + OUTF=conftest > + shift 2 > + test X-L/usr/local/scisoft/lib/ '!=' X-- > + case "$1" in > + echo 'invalid parameter -L/usr/local/scisoft/lib/' > invalid parameter -L/usr/local/scisoft/lib/
Re: [OMPI users] mpi_group_incl erros
The third argument to MPI_Group_incl() and MPI_Group_excl() is supposed to be an array, not an integer constant. Have a look at the man page for these two functions. On Aug 16, 2012, at 3:30 PM, maryam moein wrote: > I'm so sorry, Actually my problem is in another mpi program which is "sudoku > game". But because of the fact I got inclusion error whenever I use > MPI_Group_incl. For simplicity, I decided to put a simple program with > MPI_Group_incl. Please take a look at the following lines of code, and please > note that in this program I'm supposed to work just with 82 processes and I > tried to divide the processes into 2 groups, namely "master" and "workers", > master for "rank 0" process and workers for rest of processes(81 processes). > > Here is the codes: > > #include > #include "mpi.h" > #include > #include > #include > #include > > int main(int argc, char *argv[]) > { > > //Initializing the MPI world, rank, and size >int size,rank,m,w,i; >MPI_Group group,master,workers; >MPI_Comm comm_world, comm_workers, comm_master; >MPI_Status status; > MPI_Request request; > MPI_Init(&argc, &argv); > MPI_Comm_size(MPI_COMM_WORLD, &size); > MPI_Comm_rank(MPI_COMM_WORLD, &rank); > if (size != 82 ){ > printf("Please run with 82 processors.\n"); > fflush(stdout); > MPI_Finalize(); > exit(1); > } > comm_world = MPI_COMM_WORLD; > MPI_Comm_group(comm_world, &group); > MPI_Group_incl(group, 1, 0 , &master); > MPI_Group_excl(group, 1, 0, &workers); > MPI_Comm_create(comm_world, master, &comm_master); > MPI_Comm_create(comm_world, workers, &comm_workers); > MPI_Finalize(); > } > > From: Jeff Squyres > To: Open MPI Users > Cc: maryam moein > Sent: Thursday, August 16, 2012 7:41 PM > Subject: Re: [OMPI users] mpi_group_incl erros > > Further, if Neven is greater than 3, then you've got uninitialized values in > the members array. That could be causing Open MPI to say "there's a bad rank > number in there!", for example, if members[3] is randomly initialized to 1234. > > > On Aug 16, 2012, at 10:01 AM, Ralph Castain wrote: > > > Well, one thing immediately leaps to the eye. You compute Neven based on > > the number of procs in the job, which you set when executing mpirun. > > However, the number of members you put in your group is fixed. Then you > > pass Neven to the MPI_Group call as the parameter telling it how many > > entries are in your member array! > > > > On Aug 16, 2012, at 5:07 AM, maryam moein > > wrote: > > > >> I'm new memeber in this weblog, and I should deliver my assignment as soon > >> as possible, but I have a big problem that I can't solve it. Please help > >> me. In MPI I should divide my group into two groups. But all the time when > >> I want to run a program I got error about mpi_group_incl. This is my > >> error: > >> > >> [ubuntu:3346] *** An error occurred in MPI_Group_incl > >> [ubuntu:3346] *** on communicator MPI_COMM_WORLD > >> [ubuntu:3346] *** MPI_ERR_RANK: invalid rank > >> [ubuntu:3346] *** MPI_ERRORS_ARE_FATAL (your MPI job will now abort) > >> -- > >> mpiexec has exited due to process rank 0 with PID 3345 on > >> node ubuntu exiting without calling "finalize". This may > >> have caused other processes in the application to be > >> terminated by signals sent by mpiexec (as reported here). > >> > >> > >> I should mention that I run this program with diffrent number of process > >> but I got same errors. In below you can find my c program. > >> > >> #include > >> #include "mpi.h" > >> #include > >> #include > >> #include > >> #include > >> void main(int argc, char *argv[]) > >> { > >> int Iam, p; > >> int Neven, Nodd, members[6], even_rank, odd_rank; > >> MPI_Group group_world, even_group, odd_group; > >> /* Starts MPI processes ... */ > >> MPI_Init(&argc, &argv); /* starts MPI */ > >> MPI_Comm_rank(MPI_COMM_WORLD, &Iam); /* get current process id */ > >> MPI_Comm_size(MPI_COMM_WORLD, &p);/* get number of processes */ > >> Neven = (p + 1)/2;/* All processes of MPI_COMM_WORLD are divided > >> */ > >> Nodd = p - Neven; /* into 2 groups, odd- and even-numbered > >> groups */ > >> members[0] = 2; > >> members[1] = 0; > >> members[2] = 4; > >> MPI_Comm_group(MPI_COMM_WORLD, &group_world); > >> MPI_Group_incl(group_world, Neven, members, &even_group); > >> MPI_Group_excl(group_world, Neven, members, &odd_group); > >> > >> MPI_Barrier(MPI_COMM_WORLD); > >> if(Iam == 0) { > >>printf("MPI_Group_incl/excl Usage Example\n"); > >>printf("\n"); > >>printf("Number of processes is %d\n", p); > >>printf("Number of odd processes is %d\n",