[mpich-discuss] undefined reference to `__isoc99_sscanf'
Alison Boeckmann
alisonboeckmann at fastmail.fm
Fri Nov 12 11:49:43 CST 2010
Andy,
You spotted the problem. I was using a version of the library that was
built on a
different Linux system.
I replaced libmpich.a in my working directory with the file libmpich.a
that was built on the Ubuntu box that I
am working on, and it now runs ok.
Thank you *very* much for your help.
-- Alison
On Fri, 12 Nov 2010 11:26:28 -0600 (CST), "Anthony Chan"
<chan at mcs.anl.gov> said:
>
> Here is what your mpif90 links to
>
> % mpif90 -compile-info
> ifort -I/home/aboeckma/mpi-install/include -I/home/aboeckma/mpi-
> install/include -L/home/aboeckma/mpi-install/lib -L/home/aboeckma/mpi-
> install/lib -lmpichf90 -lmpichf90 -lmpich -lopa -lpthread -lrt
>
> The mpich2 install dir is /home/aboeckma/mpi-install
>
> But your original link error is
> /c/nm72ifort/mpi/mpi_lini/libmpich.a(argstr.o): In function
> `MPIU_Str_get_binary_arg': argstr.c:(.text+0xc53):
> undefined reference to `__isoc99_sscanf'
>
> /c/nm72ifort/mpi/mpi_lini is some other mpich2 installation ?
> or you didn't use mpif90 to link your app ?
>
> A.Chan
>
>
>
> ----- Original Message -----
> > Yes this works:
> >
> > % pwd
> > /home/aboeckma/mpich2-1.2.1p1/examples/f90
> >
> > % mpif90 pi3f90.f90
> >
> > % a.out
> > Process 0 of 1 is alive
> > Enter the number of intervals: (0 quits)
> > 0
> > %
> >
> > On Fri, 12 Nov 2010 11:08:03 -0600 (CST), "Anthony Chan"
> > <chan at mcs.anl.gov> said:
> > >
> > > Sure.
> > >
> > > Can you use mpif90 to compile/link pif90.f90 which is in
> > > mpich2-xxx/examples/f90 ?
> > >
> > > A.Chan
> > >
> > > ----- Original Message -----
> > > > Andy, I am replying directly to you. I am new to this discussion
> > > > list
> > > > and don't know what the custom is.
> > > >
> > > > % mpif90 -compile-info
> > > > ifort -I/home/aboeckma/mpi-install/include -I/home/aboeckma/mpi-
> > > > install/include -L/home/aboeckma/mpi-install/lib
> > > > -L/home/aboeckma/mpi-
> > > > install/lib -lmpichf90 -lmpichf90 -lmpich -lopa -lpthread -lrt
> > > >
> > > >
> > > > % ifort -V
> > > > Intel(R) Fortran Compiler for applications running on IA-32,
> > > > Version
> > > > 10.0 Build 20070426 Package ID: l_fc_p_10.0.023 Copyright (C)
> > > > 1985-
> > > > 2007 Intel Corporation. All rights reserved.
> > > >
> > > > % cat t.f
> > > > program t
> > > > print *,'hi'
> > > > end
> > > >
> > > > % mpif90 t.f
> > > > % a.out
> > > > hi
> > > >
> > > > On Fri, 12 Nov 2010 10:50:30 -0600 (CST), "Anthony Chan"
> > > > <chan at mcs.anl.gov> said:
> > > > >
> > > > > What version of ifort that you are using ? BTW, can you use
> > > > > ifort to
> > > > > compile/link a simple fortran program ?
> > > > >
> > > > > ----- Original Message -----
> > > > > > I use mpif90 to link the execuatable. This is when the error
> > > > > > occurs.
> > > > > >
> > > > > > If the executable is built, it is launched with mpirun on the
> > > > > > Mac
> > > > > >
> > > > > >
> > > > > > On Fri, 12 Nov 2010 10:14:34 -0600 (CST), "Anthony Chan"
> > > > > > <chan at mcs.anl.gov> said:
> > > > > > >
> > > > > > > How do you link and run your program ? did you use MPI
> > > > > > > wrappers(mpif90) in linking and mpiexec to launch your app ?
> > > > > > >
> > > > > > > A.Chan
> > > > > > >
> > > > > > > ----- Original Message -----
> > > > > > > > I am installing mpich2-1.2.1p1 on Ubuntu 7.04 - the Feisty
> > > > > > > > Fawn
> > > > > > > > (This is a virtual machine running on a dual core Mac,
> > > > > > > > using
> > > > > > > > OS
> > > > > > > > 10.5.8)It installed perfectly on the native Mac.
> > > > > > > >
> > > > > > > > However when I try to run the same problem on Ubuntu,
> > > > > > > > there is
> > > > > > > > a
> > > > > > > > message when the MPI library is linked with my code:
> > > > > > > >
> > > > > > > > /c/nm72ifort/mpi/mpi_lini/libmpich.a(argstr.o): In
> > > > > > > > function
> > > > > > > > `MPIU_Str_get_binary_arg': argstr.c:(.text+0xc53):
> > > > > > > > undefined
> > > > > > > > reference to `__isoc99_sscanf'
> > > > > > > >
> > > > > > > > There are no error messages during the make:
> > > > > > > > m.txt: CC
> > > > > > > > /home/aboeckma/mpich2-1.2.1p1/src/util/mem/argstr.c
> > > > > > > > m.txt: AR cr ../../../lib/libmpich.a trmem.o handlemem.o
> > > > > > > > safestr.o argstr.o
> > > > > > > >
> > > > > > > > The compiler is ifort, but it also happens with gfortran.
> > > > > > > > Is
> > > > > > > > there a system library that is needed ?
> > > > > > > > --
> > > > > > > > Alison Boeckmann alisonboeckmann at fastmail.fm
> > > > > > > >
> > > > > > > > _______________________________________________
> > > > > > > > mpich-discuss mailing list mpich-discuss at mcs.anl.gov
> > > > > > > > https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
> > > > > > --
> > > > > > Alison Boeckmann alisonboeckmann at fastmail.fm
> > > > --
> > > > Alison Boeckmann
> > > > alisonboeckmann at fastmail.fm
> > --
> > Alison Boeckmann
> > alisonboeckmann at fastmail.fm
--
Alison Boeckmann
alisonboeckmann at fastmail.fm
More information about the mpich-discuss
mailing list