* can you help me!
@ 2018-08-15 0:38 amine awad abed
2018-08-15 5:24 ` Janus Weil
0 siblings, 1 reply; 3+ messages in thread
From: amine awad abed @ 2018-08-15 0:38 UTC (permalink / raw)
To: fortran
I HAVE mac mini with Gfortran and it works perfectly.
But i install
Gfortran in a Raspberry PI model b and the example of fibbonaci using
allocate instruction it dose'nt work!
can you help me!!
thanks a lot
! EXAMPLE DE LA SUSECCION DE FIBONACCI USANDO ALLOCAT
! amine awad abed 2018 ©
implicit none
integer(kind=16),allocatable,dimension(:) :: fib_vals,c_vals
integer, allocatable,dimension(:) :: nvals
integer :: i,n
write(*,*)"dame el valor de n"
read *,n
print 5,n
5 format("Número de Elementos. ",i3)
allocate(fib_vals(n),c_vals(n),nvals(n))
open(unit=1, file="fib_val.txt")
15 format(i3,5x,i45)
fib_vals(1)=1
fib_vals(2)=2
do i=3,n
fib_vals(i)=fib_vals(i-1)+fib_vals(i-2)
end do
do i=1,n
print 10,i,fib_vals(i)
10 format("El valor de fibonacci para: ",i4, " es:",i45)
write(unit=1, fmt=15)i,fib_vals(i)
end do
close(unit=1)
deallocate(fib_vals,c_vals,nvals) !Deallocates ARREGLOS
stop
end
||=== Build file: "no target" in "no project" (compiler: unknown) ===|
||Warning: Nonexistent include directory '/home/pi/Desktop/fortran-raspberry/fibo-alloc2.os_output_dir' [-Wmissing-include-dirs]|
/home/pi/Desktop/fortran-raspberry/fibo-alloc2.f90|5|Error: Kind 16 not supported for type INTEGER |
/home/pi/Desktop/fortran-raspberry/fibo-alloc2.f90|15|Error: Allocate-object is neither a data pointer nor an allocatable variable|
/home/pi/Desktop/fortran-raspberry/fibo-alloc2.f90|37|Error: 'fib_vals' is not a variable|
/home/pi/Desktop/fortran-raspberry/fibo-alloc2.f90|20|Error: Function 'fib_vals' has no IMPLICIT type|
/home/pi/Desktop/fortran-raspberry/fibo-alloc2.f90|21|Error: Function 'fib_vals' has no IMPLICIT type|
/home/pi/Desktop/fortran-raspberry/fibo-alloc2.f90|24|Error: Function 'fib_vals' has no IMPLICIT type|
/home/pi/Desktop/fortran-raspberry/fibo-alloc2.f90|24|Error: Function 'fib_vals' has no IMPLICIT type|
/home/pi/Desktop/fortran-raspberry/fibo-alloc2.f90|28|Error: Function 'fib_vals' has no IMPLICIT type|
/home/pi/Desktop/fortran-raspberry/fibo-alloc2.f90|30|Error: Function 'fib_vals' has no IMPLICIT type|
||=== Build failed: 9 error(s), 1 warning(s) (0 minute(s), 1 second(s)) ===|
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: can you help me!
2018-08-15 0:38 can you help me! amine awad abed
@ 2018-08-15 5:24 ` Janus Weil
2018-08-15 5:39 ` Damian Rouson
0 siblings, 1 reply; 3+ messages in thread
From: Janus Weil @ 2018-08-15 5:24 UTC (permalink / raw)
To: amine.awad.raspberry; +Cc: gfortran
Hi Amine,
> I HAVE mac mini with Gfortran and it works perfectly.
> But i install
> Gfortran in a Raspberry PI model b and the example of fibbonaci using
> allocate instruction it dose'nt work!
among the many error messages you see, you crucial one is (as usual) the first:
> /home/pi/Desktop/fortran-raspberry/fibo-alloc2.f90|5|Error: Kind 16 not supported for type INTEGER |
That sounds like your raspi doesn't support kind=16, so you should
probably try to use kind=8, i.e. change this line:
> integer(kind=16),allocatable,dimension(:) :: fib_vals,c_vals
into:
integer(kind=8),allocatable,dimension(:) :: fib_vals,c_vals
Hope that helps ...
Cheers,
Janus
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: can you help me!
2018-08-15 5:24 ` Janus Weil
@ 2018-08-15 5:39 ` Damian Rouson
0 siblings, 0 replies; 3+ messages in thread
From: Damian Rouson @ 2018-08-15 5:39 UTC (permalink / raw)
To: Janus Weil; +Cc: amine.awad.raspberry, gfortran
If you get this to work, please post your configure line or any other
steps. I tried to install gfortran on a Raspberry Pi several months ago and
the installation failed.
Damian
On Tue, Aug 14, 2018 at 10:24 PM Janus Weil <janus@gcc.gnu.org> wrote:
> Hi Amine,
>
> > I HAVE mac mini with Gfortran and it works perfectly.
> > But i install
> > Gfortran in a Raspberry PI model b and the example of fibbonaci using
> > allocate instruction it dose'nt work!
>
> among the many error messages you see, you crucial one is (as usual) the
> first:
>
> > /home/pi/Desktop/fortran-raspberry/fibo-alloc2.f90|5|Error: Kind 16 not
> supported for type INTEGER |
>
> That sounds like your raspi doesn't support kind=16, so you should
> probably try to use kind=8, i.e. change this line:
>
> > integer(kind=16),allocatable,dimension(:) :: fib_vals,c_vals
>
> into:
>
> integer(kind=8),allocatable,dimension(:) :: fib_vals,c_vals
>
> Hope that helps ...
>
> Cheers,
> Janus
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-15 5:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-15 0:38 can you help me! amine awad abed
2018-08-15 5:24 ` Janus Weil
2018-08-15 5:39 ` Damian Rouson
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).