replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Mixed programming in FORTRAN with ANSI C
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Mixed programming in FORTRAN with ANSI C

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
xian1633



Joined: 18 Nov 2008
Posts: 4

PostPosted: Wed Nov 26, 2008 2:42 pm    Post subject: Mixed programming in FORTRAN with ANSI C Reply with quote

Hi,

I wonder if any of you have met problems in mixed FORTRAN+C programming. Our SATURN software has always been coded in FORTAN with the Salford compiler and recently I have added a new algorithm implemneted in C. We mainly call C modules from inside SATURN, and occasionally call some FORTRAN functions inside C modules. We also utilise common arrays between FORTRAN and C. We are constrained to use the Salfod C compiler also, in consistent to Salford FORTRAN compiler (both the latest version).

We came across problems in model large transport networks -- the software works fine for small models but it will crash for large models in C's malloc (not enough memory). For example, from Windows Task Manger, it crashed when I used up around 1.35GB of RAM (just beyond my physical memory limit). I thought that the paging would help in virtual memory management and I would certainly be allowed to use more memories than the physical memory limit?

It seemed to me also that sometime when the runs crashed, the window system got stuck and error messages on win***.exe appearing?

I wonder if anyone has experienced the similar things before. Any comeents and advice would most be most appreciated.

Yanling Xiang
Atkins
UK
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Wed Nov 26, 2008 3:03 pm    Post subject: Reply with quote

You may find it helpful to look at the Announcements section of this forum under "Beta: Extra memory available for larger machines". Also search in this forum for the 3GB switch in SLINK.

If you use the salflibc.dll mentioned in the Announcements then you should avoid using realloc for the time being.

This may allow you to go above 1.35GB but somewhere around 1.8GB in one chunk may be the limit. Try a simple test C program that just calls malloc for increasing large chunks.
Back to top
View user's profile Send private message AIM Address
xian1633



Joined: 18 Nov 2008
Posts: 4

PostPosted: Wed Nov 26, 2008 3:56 pm    Post subject: Mixed programming in FORTRAN with ANSI C Reply with quote

Dear paul,

Many thanks for the propmt reply -- we are investigating according the way you suggested and shall get back to you with our findings.

Yanling
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group