g95 AND gfortran problem ONLY on PPC OSX Tiger 
Author Message
 g95 AND gfortran problem ONLY on PPC OSX Tiger

Suddenly on PPC OSX Tiger only, my g95 .92 or gfortran 4.4 (full debug
or full optimization) compiles of my application bomb out at start up
with a segmentation fault or bus error.   Running dbg I get:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: ..

but at 2 completely different source codes lines with g95 and
gfortran.

The XLF generated binaries with exactly the same source code work
fine.  The exact same source code compiled on x86 OSX Leopard or
Windows XP (with g95, gfortran, and ivf) also works fine.

I recently increased the amount of data initialized in my modules, so
I thought it may be a "ulimit" problem, but playing with it didn't
help.  Also, if I do a simple compile with g95 or gfortran using only
their default settings (g95 main.f90, gfortran main.f90), the
resulting a.out runs fine!

Anybody got any ideas?

Al Greynolds
www.ruda.com



Wed, 13 Apr 2011 00:40:02 GMT  
 g95 AND gfortran problem ONLY on PPC OSX Tiger

Quote:

> Suddenly on PPC OSX Tiger only, my g95 .92 or gfortran 4.4 (full debug
> or full optimization) compiles of my application bomb out at start up
> with a segmentation fault or bus error.   Running dbg I get:

> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_INVALID_ADDRESS at address: ..

etc...
Any way you can check if all your PC memory is really present?
Loose memory cards can cause this effect.
The compiler can work with somewhat less than a full set, but perhaps
not your executable.

Some smart computers detect memory problems and shut off reference to
that segment, by treating is as 'not present'. And work can continue
quite well
You won't know unless you have the screen on when you boot and you
watch closely to the progress of booting and see how much memory it
finds.



Wed, 13 Apr 2011 14:40:55 GMT  
 g95 AND gfortran problem ONLY on PPC OSX Tiger

Quote:

> Suddenly on PPC OSX Tiger only, my g95 .92 or gfortran 4.4 (full debug
> or full optimization) compiles of my application bomb out at start up
> with a segmentation fault or bus error.   Running dbg I get:

> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_INVALID_ADDRESS at address: ..

> but at 2 completely different source codes lines with g95 and
> gfortran.

> The XLF generated binaries with exactly the same source code work
> fine.  The exact same source code compiled on x86 OSX Leopard or
> Windows XP (with g95, gfortran, and ivf) also works fine.

> I recently increased the amount of data initialized in my modules, so
> I thought it may be a "ulimit" problem, but playing with it didn't
> help.  Also, if I do a simple compile with g95 or gfortran using only
> their default settings (g95 main.f90, gfortran main.f90), the
> resulting a.out runs fine!

> Anybody got any ideas?

> Al Greynolds
> www.ruda.com

This seems familiar.  Try these, alone or in combination:

1.  Before executing:  "unlimit stacksize"

(I read somewhere that on Mac OS the command is "unlimit", not
"ulimit".)

2.  Use dynamic memory allocation for large arrays.

--Dave



Sat, 16 Apr 2011 00:54:05 GMT  
 g95 AND gfortran problem ONLY on PPC OSX Tiger

Quote:
> This seems familiar. ?Try these, alone or in combination:

> 1. ?Before executing: ?"unlimit stacksize"

> (I read somewhere that on Mac OS the command is "unlimit", not
> "ulimit".)

> 2. ?Use dynamic memory allocation for large arrays.

1. I tried increaing the stack (by a variety of methods) but it had no
effect.

2. I ended up (with much pain) going this route.

Thanks to the respondees and Andy Vaught (g95 author) for his help in
trying to diagnose this problem.

Al



Sun, 17 Apr 2011 03:27:20 GMT  
 g95 AND gfortran problem ONLY on PPC OSX Tiger
(snip)

Quote:
>>2.  Use dynamic memory allocation for large arrays.
> 1. I tried increaing the stack (by a variety of methods) but it had no
> effect.
> 2. I ended up (with much pain) going this route.

There are systems where hardware restrictions limit the
size of static data.  I ran into this some years ago on
Alpha, trying to use a 100K byte static array.

I think I remember that PPC has a similar hardware limit.

-- glen



Sun, 17 Apr 2011 04:45:01 GMT  
 g95 AND gfortran problem ONLY on PPC OSX Tiger

Quote:


> (snip)

>>>2.  Use dynamic memory allocation for large arrays.

>> 1. I tried increaing the stack (by a variety of methods) but it had no
>> effect.

>> 2. I ended up (with much pain) going this route.

> There are systems where hardware restrictions limit the
> size of static data.  I ran into this some years ago on
> Alpha, trying to use a 100K byte static array.

> I think I remember that PPC has a similar hardware limit.

> -- glen

Glen,

Can you say a few words on g95, in particular, whether it is C90 right
under the hood?
--
George

I want to thank you for taking time out of your day to come and witness my
{*filter*}.
George W. Bush



Sun, 17 Apr 2011 10:22:13 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Gfortran 4.4 binary (OpenMP and 64bit capability) for PPC Tiger

2. problem with very small numbers - g95 versus gfortran

3. G95 for OSX

4. GNU gfortran on Mac OSX

5. gfortran install on PCC OSX

6. gfortran on osX

7. automatic arrays with negative size in g95 and gfortran

8. Common statement does not work with gfortran, but g95 gives the correct answer

9. gfortran or g95

10. gfortran vs. g95

11. difference between g95 and gfortran

12. Compiler flags for compiling FEM2DLiB with g95 and/or gfortran

 

 
Powered by phpBB® Forum Software