public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* Error message
@ 2022-10-17  9:28 Salvatore Filippone
  2022-10-17 14:42 ` Andrew Benson
  0 siblings, 1 reply; 7+ messages in thread
From: Salvatore Filippone @ 2022-10-17  9:28 UTC (permalink / raw)
  To: Fortran List

[-- Attachment #1: Type: text/plain, Size: 870 bytes --]

Dear all
I am getting the following error message, which I find quite confusing

   68 |   use amg_prec_mod
      |       1
Fatal Error: Mismatch in components of derived type
'__vtype_psb_c_par_mat_mod_Psb_c_par_mat_type' from 'psb_c_par_mat_mod' at
(1): expecting 'bldext', but got 'aclsum'
compilation terminated.

from
 mpifort -v
mpifort for MPICH version 3.4.3
Using built-in specs.
COLLECT_GCC=/opt/gnu/12.1.0/bin/gfortran
COLLECT_LTO_WRAPPER=/opt/gnu/12.1.0/libexec/gcc/x86_64-pc-linux-gnu/12.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-12.1.0/configure --prefix=/opt/gnu/12.1.0
--enable-languages=c,c++,fortran
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.1.0 (GCC)


What might  the compiler be  complaining about? Where can I find additional
info on what to do?
Any help greatly appreciated

Salvatore

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Error message
  2022-10-17  9:28 Error message Salvatore Filippone
@ 2022-10-17 14:42 ` Andrew Benson
  2022-10-17 16:05   ` Salvatore Filippone
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Benson @ 2022-10-17 14:42 UTC (permalink / raw)
  To: Salvatore Filippone; +Cc: Fortran List

Hi Salvatore,

I've run into similar error messages occasionally. I've never been able to 
fully track down the cause, but it seems to happen if I change the content of 
a derived type (e.g. add some new variable to it), recompile the module 
containing it, but don't recompile some other module that USEs that first 
module. It seems like there are then multiple definitions of the derived type 
(from different modules) that are out of sync. So, recompiling everything 
resolves this issue for me. 

But, as I said, I'm not 100% sure that this is the explanation!

-Andrew

On Monday, October 17, 2022 2:28:33 AM PDT Salvatore Filippone via Fortran 
wrote:
> Dear all
> I am getting the following error message, which I find quite confusing
> 
>    68 |   use amg_prec_mod
> 
>       |       1
> 
> Fatal Error: Mismatch in components of derived type
> '__vtype_psb_c_par_mat_mod_Psb_c_par_mat_type' from 'psb_c_par_mat_mod' at
> (1): expecting 'bldext', but got 'aclsum'
> compilation terminated.
> 
> from
>  mpifort -v
> mpifort for MPICH version 3.4.3
> Using built-in specs.
> COLLECT_GCC=/opt/gnu/12.1.0/bin/gfortran
> COLLECT_LTO_WRAPPER=/opt/gnu/12.1.0/libexec/gcc/x86_64-pc-linux-gnu/12.1.0/l
> to-wrapper Target: x86_64-pc-linux-gnu
> Configured with: ../gcc-12.1.0/configure --prefix=/opt/gnu/12.1.0
> --enable-languages=c,c++,fortran
> Thread model: posix
> Supported LTO compression algorithms: zlib
> gcc version 12.1.0 (GCC)
> 
> 
> What might  the compiler be  complaining about? Where can I find additional
> info on what to do?
> Any help greatly appreciated
> 
> Salvatore


-- 

* Andrew Benson: https://abensonca.github.io

* Galacticus: https://github.com/galacticusorg/galacticus




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Error message
  2022-10-17 14:42 ` Andrew Benson
@ 2022-10-17 16:05   ` Salvatore Filippone
  0 siblings, 0 replies; 7+ messages in thread
From: Salvatore Filippone @ 2022-10-17 16:05 UTC (permalink / raw)
  To: Andrew Benson; +Cc: Fortran List

[-- Attachment #1: Type: text/plain, Size: 2083 bytes --]

It was indeed a case of misalignment of compiled files (in my case, make
install going to one location, and the code to be compiled picking up from
a different one)

Thanks to all,
Salvatore

On Mon, Oct 17, 2022 at 4:42 PM Andrew Benson <abenson@carnegiescience.edu>
wrote:

> Hi Salvatore,
>
> I've run into similar error messages occasionally. I've never been able to
> fully track down the cause, but it seems to happen if I change the content
> of
> a derived type (e.g. add some new variable to it), recompile the module
> containing it, but don't recompile some other module that USEs that first
> module. It seems like there are then multiple definitions of the derived
> type
> (from different modules) that are out of sync. So, recompiling everything
> resolves this issue for me.
>
> But, as I said, I'm not 100% sure that this is the explanation!
>
> -Andrew
>
> On Monday, October 17, 2022 2:28:33 AM PDT Salvatore Filippone via Fortran
> wrote:
> > Dear all
> > I am getting the following error message, which I find quite confusing
> >
> >    68 |   use amg_prec_mod
> >
> >       |       1
> >
> > Fatal Error: Mismatch in components of derived type
> > '__vtype_psb_c_par_mat_mod_Psb_c_par_mat_type' from 'psb_c_par_mat_mod'
> at
> > (1): expecting 'bldext', but got 'aclsum'
> > compilation terminated.
> >
> > from
> >  mpifort -v
> > mpifort for MPICH version 3.4.3
> > Using built-in specs.
> > COLLECT_GCC=/opt/gnu/12.1.0/bin/gfortran
> >
> COLLECT_LTO_WRAPPER=/opt/gnu/12.1.0/libexec/gcc/x86_64-pc-linux-gnu/12.1.0/l
> > to-wrapper Target: x86_64-pc-linux-gnu
> > Configured with: ../gcc-12.1.0/configure --prefix=/opt/gnu/12.1.0
> > --enable-languages=c,c++,fortran
> > Thread model: posix
> > Supported LTO compression algorithms: zlib
> > gcc version 12.1.0 (GCC)
> >
> >
> > What might  the compiler be  complaining about? Where can I find
> additional
> > info on what to do?
> > Any help greatly appreciated
> >
> > Salvatore
>
>
> --
>
> * Andrew Benson: https://abensonca.github.io
>
> * Galacticus: https://github.com/galacticusorg/galacticus
>
>
>
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* error message
@ 2018-02-05 17:16 paul starr
  0 siblings, 0 replies; 7+ messages in thread
From: paul starr @ 2018-02-05 17:16 UTC (permalink / raw)
  To: fortran

When trying to compile a very simple 4 line f77 program on my macbook I got
the following message:

undefined symbols for architecture x86_64.  "start" referenced from -u
command line option

....... symbols not found for architecture x86_64.

Can you help?  Also, I downloaded gcc to a PC and have no idea what
directory I have to be in to compile and execute.

Thanks.

Dan Purrington

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Error message
  2008-04-04 15:37 ` Tobias Burnus
@ 2008-04-04 15:45   ` Salvatore Filippone
  0 siblings, 0 replies; 7+ messages in thread
From: Salvatore Filippone @ 2008-04-04 15:45 UTC (permalink / raw)
  To: Tobias Burnus; +Cc: Fortran

I see, thanks
Salvatore

Il giorno ven, 04/04/2008 alle 17.37 +0200, Tobias Burnus ha scritto:
> Salvatore Filippone wrote:
> > Hi there,
> > I am getting the following error message: 
> >
> > Fortran runtime error: Incorrect extent in return value of PACK intrinsic; is 964, should be 7466
> >
> > What is the compiler trying to tell me?
> Example from the testsuite; compile with -fbounds-check:
> 
> program main
>   integer :: a(2,2), b(5)
>   a = reshape((/ 1, -1, 1, -1 /), shape(a))
>   b = pack(a, a /= 0)
> end program main
> ! { dg-output "Fortran runtime error: Incorrect extent in return value 
> of PACK intrinsic; is 4, should be 5" }
> 
> The problem is that for "b =" an array with size 5 is needed while 
> "pack(a, a /= 0)" returns an array of size 4.
> Solution: Use "b(1:4) =" or "b(2:5) =" or ...
> 
> 
> If you have a Fortran 2003 compiler and b is allocatable, the assignment 
> "b = pack(a, a /= 0)" is actually valid as b will be reallocated to have 
> a size 4. Note, however, that gfortran does not support this yet.
> 
> Tobias

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Error message
  2008-04-04 15:11 Error message Salvatore Filippone
@ 2008-04-04 15:37 ` Tobias Burnus
  2008-04-04 15:45   ` Salvatore Filippone
  0 siblings, 1 reply; 7+ messages in thread
From: Tobias Burnus @ 2008-04-04 15:37 UTC (permalink / raw)
  To: salvatore.filippone; +Cc: Fortran

Salvatore Filippone wrote:
> Hi there,
> I am getting the following error message: 
>
> Fortran runtime error: Incorrect extent in return value of PACK intrinsic; is 964, should be 7466
>
> What is the compiler trying to tell me?
Example from the testsuite; compile with -fbounds-check:

program main
  integer :: a(2,2), b(5)
  a = reshape((/ 1, -1, 1, -1 /), shape(a))
  b = pack(a, a /= 0)
end program main
! { dg-output "Fortran runtime error: Incorrect extent in return value 
of PACK intrinsic; is 4, should be 5" }

The problem is that for "b =" an array with size 5 is needed while 
"pack(a, a /= 0)" returns an array of size 4.
Solution: Use "b(1:4) =" or "b(2:5) =" or ...


If you have a Fortran 2003 compiler and b is allocatable, the assignment 
"b = pack(a, a /= 0)" is actually valid as b will be reallocated to have 
a size 4. Note, however, that gfortran does not support this yet.

Tobias

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Error message
@ 2008-04-04 15:11 Salvatore Filippone
  2008-04-04 15:37 ` Tobias Burnus
  0 siblings, 1 reply; 7+ messages in thread
From: Salvatore Filippone @ 2008-04-04 15:11 UTC (permalink / raw)
  To: Fortran

Hi there,
I am getting the following error message: 

Fortran runtime error: Incorrect extent in return value of PACK intrinsic; is 964, should be 7466

from a code compiled with
gfortran -v
Using built-in specs.
Target: ia64-unknown-linux-gnu
Configured with: ../gcc-4.3.0/configure --prefix=/home3/pasqua/gnu43
--with-mpfr=/home3/pasqua/GNUBUILD/mpfr
--with-gmp-lib=/home3/pasqua/GNUBUILD/gmp/lib/
--with-gmp=/home3/pasqua/GNUBUILD/gmp
Thread model: posix
gcc version 4.3.0 (GCC) 


What is the compiler trying to tell me? 
Thanks
Salvatore 


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-10-17 16:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-17  9:28 Error message Salvatore Filippone
2022-10-17 14:42 ` Andrew Benson
2022-10-17 16:05   ` Salvatore Filippone
  -- strict thread matches above, loose matches on Subject: below --
2018-02-05 17:16 error message paul starr
2008-04-04 15:11 Error message Salvatore Filippone
2008-04-04 15:37 ` Tobias Burnus
2008-04-04 15:45   ` Salvatore Filippone

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).