Hi,<br>thank you for reply.<br><br>I tried to install it make it using following options now and i get following error with undefined reference to main. options given while configuring the same are :<br>export F90=fortran;F90FLAGS="-ff2c".<br>
but error of undefined reference to main is observed in every executable like :<br><br>./mpicc -v<br>mpicc for 1.2.7 (release) of : 2005/06/22 16:33:49<br>Using built-in specs.<br>Target: x86_64-redhat-linux<br>Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --disable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux<br>
Thread model: posix<br>gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)<br> /usr/libexec/gcc/x86_64-redhat-linux/4.1.2/collect2 --eh-frame-hdr -m elf_x86_64 --hash-style=gnu -dynamic-linker /lib64/ld-linux-x86-64.so.2 /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtbegin.o -L/scratch1/np_cs/trial2/build/lib -L/opt/intel/mkl/<a href="http://10.2.2.025/lib/em64t">10.2.2.025/lib/em64t</a> -L/opt/intel/mkl/<a href="http://10.2.2.025/lib/em64t">10.2.2.025/lib/em64t</a> -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2 -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2 -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -lmpich -lpthread -lrt -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtend.o /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crtn.o<br>
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crt1.o: In function `_start':<br>(.text+0x20): undefined reference to `main'<br>collect2: ld returned 1 exit status<br><br>./mpif90 -v<br>mpif90 for 1.2.7 (release) of : 2005/06/22 16:33:49<br>
Driving: gfortran -L/scratch1/np_cs/trial2/build/lib -v -lmpichf90 -lmpich -lpthread -lrt -lgfortranbegin -lgfortran -lm -shared-libgcc<br>Using built-in specs.<br>Target: x86_64-redhat-linux<br>Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --disable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux<br>
Thread model: posix<br>gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)<br> /usr/libexec/gcc/x86_64-redhat-linux/4.1.2/collect2 --eh-frame-hdr -m elf_x86_64 --hash-style=gnu -dynamic-linker /lib64/ld-linux-x86-64.so.2 /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtbegin.o -L/scratch1/np_cs/trial2/build/lib -L/opt/intel/mkl/<a href="http://10.2.2.025/lib/em64t">10.2.2.025/lib/em64t</a> -L/opt/intel/mkl/<a href="http://10.2.2.025/lib/em64t">10.2.2.025/lib/em64t</a> -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2 -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2 -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -lmpichf90 -lmpich -lpthread -lrt -lgfortranbegin -lgfortran -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtend.o /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crtn.o<br>
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/libgfortranbegin.a(fmain.o): In function `main':<br>(.text+0xa): undefined reference to `MAIN__'<br>collect2: ld returned 1 exit status<br><br>Am i missing somethin?<br>thank you<br>
-akshar<br><br><div class="gmail_quote">On Mon, Sep 12, 2011 at 1:24 AM, William Gropp <span dir="ltr"><<a href="mailto:wgropp@illinois.edu">wgropp@illinois.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
You can use gfortran for F77 and F90. If your requirement is to use gfortran for F77 and a different fortran for F90, then they will need to use consistent linker names, calling conventions, data sizes, and libraries. The config.log file will have details on why configure decided that the Fortran 77 and Fortran 90 compilers were not compatible.<br>
<br>
Bill<div><div></div><div class="h5"><br>
<br>
On Sep 9, 2011, at 4:28 PM, akshar bhosale wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
hi,<br>
we have requirement of mpich-1.2.7 with gfortran. We have fiven flags as : CC=gcc;F90=fortran;F77=<u></u>gfortran; and tried to configure, it throws error as configure: error: Fortran 90 and Fortran 77 compilers are not compatible..<br>
We have to do it using gfortran only. os is rhel5.1 64 bit<br>
what extran flags settings we have to do?<br>
<br>
-akshar<br></div></div><div class="im">
______________________________<u></u>_________________<br>
mpich-discuss mailing list <a href="mailto:mpich-discuss@mcs.anl.gov" target="_blank">mpich-discuss@mcs.anl.gov</a><br>
To manage subscription options or unsubscribe:<br>
<a href="https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss" target="_blank">https://lists.mcs.anl.gov/<u></u>mailman/listinfo/mpich-discuss</a><br>
</div></blockquote><font color="#888888">
<br>
William Gropp<br>
Director, Parallel Computing Institute<br>
Deputy Director for Research<br>
Institute for Advanced Computing Applications and Technologies<br>
Paul and Cynthia Saylor Professor of Computer Science<br>
University of Illinois Urbana-Champaign<br>
<br>
<br>
<br>
</font></blockquote></div><br>