[mpich-discuss] About using g95 to compile MPICH2 problem
謝奇哲
991546107 at stu.nkmu.edu.tw
Tue Oct 9 13:54:50 CDT 2012
Dear MPICH2 users,
Thanks.
I asked other program users, he suggested me to try to use mpich2-1.2.1p1
version.
I used WindosXP, Cygwin and g95 to install MPICH2-1.2.1p1 on my personal
computer (Intel Core2 Quad Q8200).
Now, I can use mpirun to run my cases by set n=1.
But, I have some doubts about "n" .
In my research, I need to couple another models.
So, I need to use the least two processors.
I use mpirun -n 2 to run my case, and get some error messages
rank 1 in job 2 980622-05_3343 caused collective abort of all ranks
exit status of rank 1: killed by signal 9
rank 0 in job 2 980622-05_3343 caused collective abort of all ranks
exit status of rank 0: return code 0
But, I could run cpi using more than 2
Can anyone give me some advices?
Best regards,
Chi-Che Hsieh
2012/10/2 Anthony Chan <chan at mcs.anl.gov>
>
> Since you set both F77 and FC to the same compiler g95.
> Whatever compiler behavior changing flag you set for F77
> should be set for FC during configure as well, i.e. if
> you set FFLAGS=-fno-second-underscore, you should set
> FCFLAGS=-fno-second-underscore. If you do that, you don't
> need to use -fno-second-underscore with mpif90 in compiling
> your code.
>
> However, I don't get why would want to change the default
> name mangling behavior of the Fortran compiler. Based on
> the compiling output of your app, it appears your app is
> pure Fortran90 code. Would it be easier just not setting
> -fno-second-underscore at all in compiling mpich2 and your
> app ?
>
> A.Chan
>
> ----- Original Message -----
> > Dear Jayesh:
> > I had trying to re-install MPICH2.
> > And using the command
> > ./configure F77=g95 FC=g95 FFLAGS=-fno-second-underscore
> > --prefix=/MPICH2/ 2>&1 | tee c.txt
> >
> > When I finished installing, I didn't find the mpif90 in bin file.
> > What's problem with me?Can anyon give me some advices?
> >
> > Best regards,
> > Chi-Che Hsieh
> >
> > 2012/10/2 Jayesh Krishna <jayesh at mcs.anl.gov>
> >
> > > Dear Jayesh:
> > > In my program compiler opions
> > > FFLAGS := -fno-second-underscore
> > >
> > > But, when I configured MPICH2 just using F77=g95 FC=g95
> > > --prefix=/MPICH2/
> > > So, Should I set FFLAGS=-fno-second-underscore when I configure
> > > MPICH2?
> > >
> > > Best regards,
> > > Chi-Che Hsieh
> > >
> > >
> > > 2012/10/1 Jayesh Krishna < jayesh at mcs.anl.gov >
> > >
> > >
> > > Hi,
> > > You seem to be using specific compiler options (like
> > > "-fno-second-underscore") when you are compiling your code. Did you
> > > specify
> > > the same options when building MPICH2 ?
> > >
> > > Regards,
> > > Jayesh
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From: "謝奇哲" < 991546107 at stu.nkmu.edu.tw >
> > > To: "Jayesh Krishna" < jayesh at mcs.anl.gov >,
> > > mpich-discuss at mcs.anl.gov
> > > Sent: Monday, October 1, 2012 8:30:54 AM
> > > Subject: About using g95 to compile MPICH2 problem
> > >
> > > Dear MPICH2 users,
> > >
> > > I'm sorry if I'm asking too many times.
> > >
> > > My case will need using mpi_init, so I install the MPICH2-1.4.1p1
> > > I'm using WindosXP, Cygwin, and g95 to compile.
> > >
> > > And I Used the command
> > > User at 980622-05 /cygdrive/c/cygwin/mpich2-1.4.1p1
> > > $./configure F77=g95 FC=g95 --prefix=/MPICH2/ 2>&1 | tee c.txt
> > > User at 980622-05 /cygdrive/c/cygwin/mpich2-1.4.1p1
> > > $make 2>&1 | tee m.txt
> > > User at 980622-05 /cygdrive/c/cygwin/mpich2-1.4.1p1
> > > $make install 2>&1 | tee mi.txt
> > >
> > > I added right path in cygwin/etc/prfile
> > > MPI_BINDIR=/MPICH2/bin
> > > export MPI_BINDIR
> > > MPI_INCDIR=/MPICH2/include
> > > export MPI_INCDIR
> > > MPI_LIBDIR=/MPICH2/lib
> > > export MPI_LIBDIR
> > >
> > > Then, I try to run the examples hellw and cpi
> > > User at 980622-05 /cygdrive/c/cygwin/mpich2-1.4.1p1/examples
> > > $ make hellow
> > > CC hellow.c
> > > ../bin/mpicc -o hellow hellow.o
> > >
> > > User at 980622-05 /cygdrive/c/cygwin/mpich2-1.4.1p1/examples
> > > $ mpirun -n 5 ./hellow
> > > Hello world from process 0 of 5
> > > Hello world from process 1 of 5
> > > Hello world from process 2 of 5
> > > Hello world from process 3 of 5
> > > Hello world from process 4 of 5
> > >
> > > User at 980622-05 /cygdrive/c/cygwin/mpich2-1.4.1p1/examples
> > > $ mpirun -n 5 ./cpi
> > > Process 0 of 5 is on 980622-05
> > > Process 1 of 5 is on 980622-05
> > > Process 2 of 5 is on 980622-05
> > > Process 3 of 5 is on 980622-05
> > > Process 4 of 5 is on 980622-05
> > > pi is approximately 3.1415926544231230, Error is 0.0000000008333298
> > > wall clock time = 0.000000
> > >
> > > I thought that I finish installing.
> > > And then, I compiled my program, set build.bash
> > > USE_MPI = on
> > > USE_MPIF90 = on
> > > I got some undefined reference about MPI (detail saved in
> > > make_sh_mpif90_on_0928.txt)
> > >
> > > cd /cygdrive/d/ROMS_for_Square_Harbor/trunk/Build;
> > > /MPICH2/bin/mpif90 -c -fno-second-underscore -O3 -ffast-math
> > > master.f90
> > > mpif90 -fno-second-underscore -O3 -ffast-math
> > > /cygdrive/d/ROMS_for_Square_Harbor/trunk/Build/master.o
> > > /cygdrive/d/ROMS_for_Square_Harbor/trunk/Build/ocean_control.o
> > > /cygdrive/d/ROMS_for_Square_Harbor/trunk/Build/ocean_coupler.o
> > > /cygdrive/d/ROMS_for_Square_Harbor/trunk/Build/propagator.o -o
> > > /cygdrive/d/ROMS_for_Square_Harbor/trunk/oceanM.exe
> > > /cygdrive/d/ROMS_for_Square_Harbor/trunk/Build/libNLM.a
> > > /cygdrive/d/ROMS_for_Square_Harbor/trunk/Build/libANA.a
> > > /cygdrive/d/ROMS_for_Square_Harbor/trunk/Build/libICE.a
> > > /cygdrive/d/ROMS_for_Square_Harbor/trunk/Build/libUTIL.a
> > > /cygdrive/d/ROMS_for_Square_Harbor/trunk/Build/libMODS.a
> > > -L/usr/local/lib
> > > -lnetcdf
> > >
> /cygdrive/d/ROMS_for_Square_Harbor/trunk/Build/master.o:master.f90:(.text+0xe):
> > > undefined reference to `mpi_init_'
> > >
> /cygdrive/d/ROMS_for_Square_Harbor/trunk/Build/master.o:master.f90:(.text+0x34):
> > > undefined reference to `mpi_comm_rank_'
> > >
> /cygdrive/d/ROMS_for_Square_Harbor/trunk/Build/master.o:master.f90:(.text+0x5d):
> > > undefined reference to `mpi_finalize_'
> > >
> /cygdrive/d/ROMS_for_Square_Harbor/trunk/Build/ocean_control.o:ocean_control.f90:(.text+0x3e6):
> > > undefined reference to `mpi_comm_rank_'
> > >
> /cygdrive/d/ROMS_for_Square_Harbor/trunk/Build/ocean_control.o:ocean_control.f90:(.text+0x3fd):
> > > undefined reference to `mpi_comm_size_'
> > >
> > > Can anyone give me some advices to solved this problem?
> > >
> > > Best regards,
> > > Chi-Che Hsieh
> > >
> > >
> >
> > _______________________________________________
> > mpich-discuss mailing list mpich-discuss at mcs.anl.gov
> > To manage subscription options or unsubscribe:
> > https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
> _______________________________________________
> mpich-discuss mailing list mpich-discuss at mcs.anl.gov
> To manage subscription options or unsubscribe:
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20121010/74938042/attachment.html>
More information about the mpich-discuss
mailing list