

|
 |
| Programming > Fortran > Re: Simple Prog... |
|
| << Topic |
< Post |
Post 28 of 34 Topic 8551 of 8908
|
Post > |
Topic >> |
Re: Simple Program, Lots of Issues (F90)
by "Dr Ivan D. Reid" <Ivan.Reid@[EMAIL PROTECTED]
>
Jul 29, 2008 at 07:07 PM
| On Tue, 29 Jul 2008 07:26:26 -0700 (PDT), AnotherSquid <mai@[EMAIL PROTECTED]
>
wrote in
<4403cfeb-a2c1-4299-88b4-8dceab468535@[EMAIL PROTECTED]
>:
> On Jul 25, 7:57 am, e p chandler <e...@[EMAIL PROTECTED]
> wrote:
>> seeftp://ftp.swcp.com/pub/walt/F/Examples/sieve.f95
> I tried this simple program using six Fortran compilers but setting
> the integer parameter last_number to 10000000 (10 million). All
> compiled but four of the six had problems during exection.
> gfortran:
> Segmentation fault
> Program received signal SIGSEGV, Segmentation fault.
> 0x08048875 in MAIN__ () at primes2.f90:29
> 29 nums(2*i:mxn:i)=0
Program received signal SIGSEGV, Segmentation fault.
0x0000000000400c34 in MAIN__ () at sieve.f90:27
27 numbers(2*i : last_number : i) = 0 ! eliminate all multiples
Same as you.
GNU Fortran (GCC) 4.1.2 20070626 (Red Hat 4.1.2-14)
Copyright (C) 2007 Free Software Foundation, Inc.
also:
Program received signal SIGSEGV, Segmentation fault.
0x0000000000400bd6 in MAIN__ () at sieve.f90:27
27 numbers(2*i : last_number : i) = 0 ! eliminate all multiples
GNU Fortran (GCC) 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
Copyright (C) 2007 Free Software Foundation, Inc.
Further printouts suggest this happens when i~last_number/2, for
last_mumber>32762.
> Intel ifort:
> Segmentation fault
> Program received signal SIGSEGV, Segmentation fault.
> 0x0000000000402909 in sieve_of_eratosthenes () at primes2.f90:1
> 1 program Sieve_Of_Eratosthenes
Program received signal SIGSEGV, Segmentation fault.
0x0000000000402954 in sieve_of_eratosthenes () at sieve.f90:37
37 numbers(1:number_of_primes) = pack(numbers, numbers /= 0)
Problem appears to be with PACK.
ifort (IFORT) 9.1 20061101
Copyright (C) 1985-2006 Intel Cor****ation. All rights reserved.
> My conclusion: DO-loops still work better than array syntax.
Given that my ifort is relatively old, I'd rather see someone repeat
it with the latest version. The Ubuntu gfortran is relatively new, I
think.
--
Ivan Reid, School of Engineering & Design, _____________ CMS
Collaboration,
Brunel University. Ivan.Reid@[EMAIL PROTECTED]
|cern.ch] Room 40-1-B12,
CERN
KotPT -- "for stupidity above and beyond the call of duty".


|
34 Posts in Topic:
|
ALevenson <Andrew.Leve |
2008-07-24 10:55:18 |
|
ALevenson <Andrew.Leve |
2008-07-24 10:59:09 |
|
Craig Powers <craig.po |
2008-07-24 14:11:46 |
|
Paul van Delst <Paul.v |
2008-07-24 14:15:22 |
|
Dick Hendrickson <dick |
2008-07-24 18:06:28 |
|
Craig Powers <craig.po |
2008-07-24 14:09:35 |
|
ALevenson <Andrew.Leve |
2008-07-24 11:12:13 |
|
Craig Powers <craig.po |
2008-07-24 14:15:20 |
|
ALevenson <Andrew.Leve |
2008-07-24 11:19:35 |
|
Alois Steindl <Alois.S |
2008-07-24 20:28:47 |
|
Sebastian Hanigk <hani |
2008-07-24 20:45:13 |
|
ALevenson <Andrew.Leve |
2008-07-24 11:40:38 |
|
Gib Bogle <bogle@[EMAI |
2008-07-25 09:47:44 |
|
dpb <none@[EMAIL PROTE |
2008-07-24 17:43:53 |
|
"Kevin G. Rhoads&quo |
2008-07-25 20:29:05 |
|
dpb <none@[EMAIL PROTE |
2008-07-25 17:21:03 |
|
Richard L Walker <rlwa |
2008-07-25 19:06:03 |
|
dpb <none@[EMAIL PROTE |
2008-07-25 19:15:40 |
|
Ron Ford <ron@[EMAIL P |
2008-07-25 01:36:42 |
|
e p chandler <epc8@[EM |
2008-07-25 06:57:35 |
|
Ron Ford <ron@[EMAIL P |
2008-07-25 16:57:39 |
|
"Dr Ivan D. Reid&quo |
2008-07-25 23:12:58 |
|
e p chandler <epc8@[EM |
2008-07-25 17:14:15 |
|
nospam@[EMAIL PROTECTED]
|
2008-07-25 17:30:39 |
|
Ron Ford <ron@[EMAIL P |
2008-07-25 22:49:22 |
|
e p chandler <epc8@[EM |
2008-07-25 18:02:47 |
|
AnotherSquid <mai@[EMA |
2008-07-29 07:26:26 |
|
"Dr Ivan D. Reid&quo |
2008-07-29 19:07:40 |
|
Reinhold Bader <Bader@ |
2008-07-29 21:19:21 |
|
Craig Powers <craig.po |
2008-07-29 15:29:20 |
|
"Dr Ivan D. Reid&quo |
2008-07-29 22:51:25 |
|
Tobias Burnus <burnus@ |
2008-07-29 11:39:10 |
|
kargl@[EMAIL PROTECTED]
|
2008-07-29 19:29:07 |
|
AnotherSquid <mai@[EMA |
2008-07-30 06:49:43 |
|
Post A Reply:

|
|
|
|