Post by Alfredo ButtariPost by SeanI am trying to install mpich1.2.7 on my box, and I want to use the
compiler I built from source myself (instead of using the /usr/bin/f77)
So, I configure in this way, but it seems that it failed to build mpif77
mpif90 (any fortran related mpi compiler). Any suggestion?
#configure -cc=/home/sean/originalgcc402/objgcc402/bin/gcc
-fc=/home/sean/originalgcc402/objgcc402/bin/gfortran
-f90=/home/sean/originalgcc402/objgcc402/bin/gfortran
#make
#ls ./bin
clog2alog clogTOslog2 mpichversion mpireconfig.dat
mpirun_dbg.dbx mpirun_dbg.xxgdb slog2navigator tstmachines
clog2print jumpshot mpicxx mpirun
mpirun_dbg.ddd mpirun.p4shmem slog2print
clog2TOslog2 logconvertor mpiinstall mpirun.args
mpirun_dbg.gdb mpirun.pg slog2updater
clogprint mpicc mpiman mpirun.ch_p4
mpirun_dbg.ladebug mpirun.rand tarch
clog_print mpiCC mpireconfig mpirun.ch_p4.args
mpirun_dbg.totalview slog2filter tdevice
Hi Sean,
the gfortran version doesn't make any difference. The problem is that
mpich configure fails to determine the way gfortran provides command
export F77_GETARGDECL=" "
before running configure.
Hope it helps.
alfredo
Thanks a lot for the help!
It still does not work. Here I paste some log that I think may give some
hints--("cannot run Fortran 77 compiled programs.")
mpich-1.2.7p1>export F77_GETARGDECL=" "
mpich-1.2.7p1>configure -cc=/home/sean/originalgcc402/objgcc402/bin/gcc
-fc=/home/sean/originalgcc402/objgcc402/bin/gfortran >myconfigure.log 2>&1
mpich-1.2.7p1>cat myconfigure.log
.....
checking for an ANSI C-conforming const... no
checking for Fortran 77 compiler default output file name... a.out
checking whether the Fortran 77 compiler works... configure: error:
cannot run Fortran 77 compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
Error configuring the Fortran subsystem!
Turning off Fortran support
....
Also, this is the default config.log
mpich-1.2.7p1>cat config.log
configure:home/mygcc411/bin/gcc -DUSE_SOCKLEN_T -DUSE_U_INT_FOR_XDR
conftest.c -o conftest
configure: failed program was:
#define MPE_USE_EXTENSIONS 1
#define HAS_VOLATILE 1
#define HAVE_MPICH_MPID_H 1
#include "confdefs.h"
#include <ctype.h>
int main() { exit(0); }
int t() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_gethrtime) || defined (__stub___gethrtime)
choke me
#else
/* Override any gcc2 internal prototype to avoid an error. */
extern char gethrtime(); gethrtime();
#endif
}
conftest.c: In function 'main':
conftest.c:3: warning: incompatible implicit declaration of built-in
function 'exit'
/tmp/ccmx0vqM.o: In function `t':
conftest.c:(.text+0x24): undefined reference to `gethrtime'
collect2: ld returned 1 exit status
configure:home/mygcc411/bin/gcc -DUSE_SOCKLEN_T -DUSE_U_INT_FOR_XDR
conftest.c -o conftest
configure: failed program was:
#define MPE_USE_EXTENSIONS 1
#define HAS_VOLATILE 1
#define HAVE_MPICH_MPID_H 1
#include "confdefs.h"
#include <ctype.h>
int main() { exit(0); }
int t() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_clock_gettime) || defined (__stub___clock_gettime)
choke me
#else
/* Override any gcc2 internal prototype to avoid an error. */
extern char clock_gettime(); clock_gettime();
#endif
}
conftest.c: In function 'main':
conftest.c:3: warning: incompatible implicit declaration of built-in
function 'exit'
/tmp/cckXQnPY.o: In function `t':
conftest.c:(.text+0x24): undefined reference to `clock_gettime'
collect2: ld returned 1 exit status
configure:home/mygcc411/bin/gcc -DUSE_SOCKLEN_T -DUSE_U_INT_FOR_XDR
conftest.c -o conftest
configure: failed program was:
#define MPE_USE_EXTENSIONS 1
#define HAS_VOLATILE 1
#define HAVE_MPICH_MPID_H 1
#include "confdefs.h"
#include <ctype.h>
int main() { exit(0); }
int t() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_clock_gettime) || defined (__stub___clock_gettime)
choke me
#else
/* Override any gcc2 internal prototype to avoid an error. */
extern char clock_gettime(); clock_gettime();
#endif
}
conftest.c: In function 'main':
conftest.c:3: warning: incompatible implicit declaration of built-in
function 'exit'
/tmp/ccUjKMl5.o: In function `t':
conftest.c:(.text+0x24): undefined reference to `clock_gettime'
collect2: ld returned 1 exit status
configure:home/mygcc411/bin/gcc -DUSE_SOCKLEN_T -DUSE_U_INT_FOR_XDR
conftest.c -o conftest
configure: failed program was:
#define MPE_USE_EXTENSIONS 1
#define HAS_VOLATILE 1
#define HAVE_MPICH_MPID_H 1
#include "confdefs.h"
#include <ctype.h>
int main() { exit(0); }
int t() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_clock_getres) || defined (__stub___clock_getres)
choke me
#else
/* Override any gcc2 internal prototype to avoid an error. */
extern char clock_getres(); clock_getres();
#endif
}
conftest.c: In function 'main':
conftest.c:3: warning: incompatible implicit declaration of built-in
function 'exit'
/tmp/cc0tc7vh.o: In function `t':
conftest.c:(.text+0x24): undefined reference to `clock_getres'
collect2: ld returned 1 exit status
configure:home/mygcc411/bin/gcc -DUSE_SOCKLEN_T -DUSE_U_INT_FOR_XDR
conftest.c -o conftest
configure: failed program was:
#define MPE_USE_EXTENSIONS 1
#define HAS_VOLATILE 1
#define HAVE_MPICH_MPID_H 1
#include "confdefs.h"
#include <ctype.h>
int main() { exit(0); }
int t() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_clock_getres) || defined (__stub___clock_getres)
choke me
#else
/* Override any gcc2 internal prototype to avoid an error. */
extern char clock_getres(); clock_getres();
#endif
}
conftest.c: In function 'main':
conftest.c:3: warning: incompatible implicit declaration of built-in
function 'exit'
/tmp/ccIayqdo.o: In function `t':
conftest.c:(.text+0x24): undefined reference to `clock_getres'
collect2: ld returned 1 exit status
#include "confdefs.h"
#include <stdio.h>
#include <stdarg.h>
int func( int a, ... ){
int b;
va_list ap;
va_start( ap );
b = va_arg(ap, int);
printf( "%d-%d\n", a, b );
va_end(ap);
fflush(stdout);
return 0;
}
int main() { func( 1, 2 ); return 0;}
conftest.c:7:14: error: macro "va_start" requires 2 arguments, but only
1 given
conftest.c: In function 'func':
conftest.c:7: error: 'va_start' undeclared (first use in this function)
conftest.c:7: error: (Each undeclared identifier is reported only once
conftest.c:7: error: for each function it appears in.)
configure:home/mygcc411/bin/gcc -DUSE_SOCKLEN_T -DUSE_U_INT_FOR_XDR
conftest.c -o conftest
configure: failed program was:
#define MPE_USE_EXTENSIONS 1
#define HAS_VOLATILE 1
#define HAVE_MPICH_MPID_H 1
#define HAVE_SIGNAL_H 1
#define HAVE_SIGACTION 1
#define HAVE_PRAGMA_WEAK 1
#define HAVE_WEAK_SYMBOLS 1
#define HAS_XDR 1
#define HAVE_UNAME 1
#define HAVE_NETDB_H 1
#define HAVE_GETHOSTBYNAME 1
#define HAVE_CATOPEN 1
#define HAVE_CATCLOSE 1
#define HAVE_CATGETS 1
#define HAVE_GENCAT 1
#define HAVE_NL_TYPES_H 1
#define STDC_HEADERS 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_UNISTD_H 1
#define HAVE_STDARG_H 1
#define USE_STDARG 1
#define MALLOC_RET_VOID 1
#define HAVE_SYSTEM 1
#define HAVE_NICE 1
#define HAVE_STRDUP 1
#define HAVE_MEMORY_H 1
#define HAVE_SYS_IOCTL_H 1
#include "confdefs.h"
#include <sys/sockio.h>
int main() { exit(0); }
int t() { main(); }
conftest.c:3:24: error: sys/sockio.h: No such file or directory
conftest.c: In function 'main':
conftest.c:4: warning: incompatible implicit declaration of built-in
function 'exit'
home/mygcc411/bin/gcc -DUSE_SOCKLEN_T -DUSE_U_INT_FOR_XDR ... test for
quotes in defn
home/mygcc411/bin/gcc -DUSE_SOCKLEN_T -DUSE_U_INT_FOR_XDR conftest.o -o
conftest foo.a