Dear Jayesh:<br>  I had trying to re-install MPICH2.<br>  And using the command <br>  ./configure F77=g95 FC=g95 FFLAGS=-fno-second-underscore --prefix=/MPICH2/ 2>&1 | tee c.txt<br> <br>  When I finished installing, I didn't find the mpif90 in bin file.<br>
  What's problem with me?Can anyon give me some advices?<br><br>  Best regards,<br>  Chi-Che Hsieh <br><br><div class="gmail_quote">2012/10/2 Jayesh Krishna <span dir="ltr"><<a href="mailto:jayesh@mcs.anl.gov" target="_blank">jayesh@mcs.anl.gov</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">Dear Jayesh:<br>
In my program compiler opions<br>
FFLAGS := -fno-second-underscore<br>
<br>
But, when I configured MPICH2 just using F77=g95 FC=g95 --prefix=/MPICH2/<br>
So, Should I set FFLAGS=-fno-second-underscore when I configure MPICH2?<br>
<br>
Best regards,<br>
Chi-Che Hsieh<br>
<br>
<br>
2012/10/1 Jayesh Krishna < <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> ><br>
<br>
<br>
Hi,<br>
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 ?<br>
<br>
Regards,<br>
Jayesh<br>
<br>
<br>
<br>
----- Original Message -----<br>
From: "Á©_­õ" < <a href="mailto:991546107@stu.nkmu.edu.tw">991546107@stu.nkmu.edu.tw</a> ><br>
To: "Jayesh Krishna" < <a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a> >, <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>
Sent: Monday, October 1, 2012 8:30:54 AM<br>
Subject: About using g95 to compile MPICH2 problem<br>
<br>
Dear MPICH2 users,<br>
<br>
I'm sorry if I'm asking too many times.<br>
<br>
My case will need using mpi_init, so I install the MPICH2-1.4.1p1<br>
I'm using WindosXP, Cygwin, and g95 to compile.<br>
<br>
And I Used the command<br>
User@980622-05 /cygdrive/c/cygwin/mpich2-1.4.1p1<br>
$./configure F77=g95 FC=g95 --prefix=/MPICH2/ 2>&1 | tee c.txt<br>
User@980622-05 /cygdrive/c/cygwin/mpich2-1.4.1p1<br>
$make 2>&1 | tee m.txt<br>
User@980622-05 /cygdrive/c/cygwin/mpich2-1.4.1p1<br>
$make install 2>&1 | tee mi.txt<br>
<br>
I added right path in cygwin/etc/prfile<br>
MPI_BINDIR=/MPICH2/bin<br>
export MPI_BINDIR<br>
MPI_INCDIR=/MPICH2/include<br>
export MPI_INCDIR<br>
MPI_LIBDIR=/MPICH2/lib<br>
export MPI_LIBDIR<br>
<br>
Then, I try to run the examples hellw and cpi<br>
User@980622-05 /cygdrive/c/cygwin/mpich2-1.4.1p1/examples<br>
$ make hellow<br>
CC hellow.c<br>
../bin/mpicc -o hellow hellow.o<br>
<br>
User@980622-05 /cygdrive/c/cygwin/mpich2-1.4.1p1/examples<br>
$ mpirun -n 5 ./hellow<br>
Hello world from process 0 of 5<br>
Hello world from process 1 of 5<br>
Hello world from process 2 of 5<br>
Hello world from process 3 of 5<br>
Hello world from process 4 of 5<br>
<br>
User@980622-05 /cygdrive/c/cygwin/mpich2-1.4.1p1/examples<br>
$ mpirun -n 5 ./cpi<br>
Process 0 of 5 is on 980622-05<br>
Process 1 of 5 is on 980622-05<br>
Process 2 of 5 is on 980622-05<br>
Process 3 of 5 is on 980622-05<br>
Process 4 of 5 is on 980622-05<br>
pi is approximately 3.1415926544231230, Error is 0.0000000008333298<br>
wall clock time = 0.000000<br>
<br>
I thought that I finish installing.<br>
And then, I compiled my program, set build.bash<br>
USE_MPI = on<br>
USE_MPIF90 = on<br>
I got some undefined reference about MPI (detail saved in make_sh_mpif90_on_0928.txt)<br>
<br>
cd /cygdrive/d/ROMS_for_Square_Harbor/trunk/Build;<br>
/MPICH2/bin/mpif90 -c -fno-second-underscore -O3 -ffast-math master.f90<br>
mpif90 -fno-second-underscore -O3 -ffast-math<br>
/cygdrive/d/ROMS_for_Square_Harbor/trunk/Build/master.o<br>
/cygdrive/d/ROMS_for_Square_Harbor/trunk/Build/ocean_control.o<br>
/cygdrive/d/ROMS_for_Square_Harbor/trunk/Build/ocean_coupler.o<br>
/cygdrive/d/ROMS_for_Square_Harbor/trunk/Build/propagator.o -o<br>
/cygdrive/d/ROMS_for_Square_Harbor/trunk/oceanM.exe<br>
/cygdrive/d/ROMS_for_Square_Harbor/trunk/Build/libNLM.a<br>
/cygdrive/d/ROMS_for_Square_Harbor/trunk/Build/libANA.a<br>
/cygdrive/d/ROMS_for_Square_Harbor/trunk/Build/libICE.a<br>
/cygdrive/d/ROMS_for_Square_Harbor/trunk/Build/libUTIL.a<br>
/cygdrive/d/ROMS_for_Square_Harbor/trunk/Build/libMODS.a -L/usr/local/lib -lnetcdf<br>
/cygdrive/d/ROMS_for_Square_Harbor/trunk/Build/master.o:master.f90:(.text+0xe): undefined reference to `mpi_init_'<br>
/cygdrive/d/ROMS_for_Square_Harbor/trunk/Build/master.o:master.f90:(.text+0x34): undefined reference to `mpi_comm_rank_'<br>
/cygdrive/d/ROMS_for_Square_Harbor/trunk/Build/master.o:master.f90:(.text+0x5d): undefined reference to `mpi_finalize_'<br>
/cygdrive/d/ROMS_for_Square_Harbor/trunk/Build/ocean_control.o:ocean_control.f90:(.text+0x3e6): undefined reference to `mpi_comm_rank_'<br>
/cygdrive/d/ROMS_for_Square_Harbor/trunk/Build/ocean_control.o:ocean_control.f90:(.text+0x3fd): undefined reference to `mpi_comm_size_'<br>
<br>
Can anyone give me some advices to solved this problem?<br>
<br>
Best regards,<br>
Chi-Che Hsieh<br>
<br>
</div></div></blockquote></div><br>