CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Fortran compiler problem

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 29, 2005, 13:40
Default Fortran compiler problem
  #1
jeff
Guest
 
Posts: n/a
I have a CFD program which I can run smoothly under WinXP (Pentinum 4).

I recently try to port it to a new workstation. 2 AMD Opteron 64 bit CPUs Fedora Linux OS

The compilation is successful (both f77 and g77). But, the program just crashes after first iteration.

Is there anything I should take care of now?

Thanks a lot...
  Reply With Quote

Old   June 29, 2005, 14:02
Default Re: Fortran compiler problem
  #2
just a hint
Guest
 
Posts: n/a
You have a few options:

1 - Start the debugger, gdb executable_name, type run and wait to see where it is crashing.. You should see the routine name..From there is up to you..

2 - Compile with -g, repeat as above, and if it fails you now know the line of the routine where is failing.. If it does not fail as above, there might be an uninitialized variable in the routine in (1), or an optimization bug.

It is a very good idea to compile using bounds checking.. It will run slower, but safe until you remove all the wrinkles. Remove for production code.

Good luck,
  Reply With Quote

Old   June 29, 2005, 14:23
Default Re: Fortran compiler problem
  #3
jeff
Guest
 
Posts: n/a
thank you for your suggestions.

I finally get some clue that the problem is coming with difference between 32 bit and 64 bit architectures. Any one could recommend some references on how to port 32 bit Fortran program to 64 bit?

thanks a lot
  Reply With Quote

Old   June 29, 2005, 14:45
Default Re: Fortran compiler problem
  #4
agg
Guest
 
Posts: n/a
try using '-64' option (or a similar flag) when u compile your program.
  Reply With Quote

Old   June 29, 2005, 15:15
Default Re: Fortran compiler problem
  #5
jeff
Guest
 
Posts: n/a
unfortunately, the compiler (f77) does not take it. thanks
  Reply With Quote

Old   June 29, 2005, 17:45
Default Re: Fortran compiler problem
  #6
andy
Guest
 
Posts: n/a
There are no references because FORTRAN requires no changes for 32, 48, 64, 128 or whatever bit system. The size of all types is fully defined by the FORTRAN specification. (Of course, this is not the case for C/C++ but this is more of a systems language than a programming language)

Given the above I am curious about what your clue maybe. Some serious numerical code does try to pin down the floating point behaviour around the limits but getting this wrong is almost certainly not going to cause a crash just less than optimal performance.

Given that you have come from Windows there is a fair chance you have got some non-standard FORTRAN that is causing problems?

The easiest way to find the problem area is to compile with -g and run under the visual debugger ddd which will enable you to debug interactively.

Another method is to turn on the strict FORTRAN 77 if this is viable. It is not for most codes because of the limit on the length of variable names and the lack of "end do".

  Reply With Quote

Old   July 1, 2005, 14:12
Default Re: Fortran compiler problem
  #7
Mani
Guest
 
Posts: n/a
It would be helpful to see any message that you might get before the program stalls.

To confirm the previous post: Your code should still work even if your compiler does not have the option of 64 bit.

I am using Linux on AMD opterons in 64 bit mode as well, although with a different compiler, but that shouldn't be the problem. However, to make sure that your system is working properly, try a different Fortran77 code and see if that one works.

How about memory requirements? Could it be that your new machine simply does not have enough RAM to run your code? Could your RAM be faulty (do other codes run well?)

Debug your code, as suggested in previous messages.Chances are that your portability problems will reveal a glitch in your code which remained hidden in XP.
  Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
flow driven problem - fortran Matjaz CFX 4 April 11, 2011 14:52
Fortran Compiler and example Young CFX 1 March 22, 2011 23:26
Fortran compiler problem Luke Siemens 2 September 18, 2008 04:43
Tutorial 17 and Fortran Compiler Young CFX 0 May 6, 2008 00:24
connecting between CFX11 and Fortran compiler. Meir CFX 4 November 19, 2007 15:10


All times are GMT -4. The time now is 10:05.