<font><span style="color:rgb(34,34,34);font-family:arial,helvetica,sans-serif">Dear MPICH2 users, </span></font><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>