Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Oct 14th, 2005, 1:42 PM   #1
stormlab
Newbie
 
Join Date: Oct 2005
Posts: 1
Rep Power: 0 stormlab is on a distinguished road
Problem with porting of Linux code to Windows, FORTRAN/C.

Hello,

There is a Linux console tool (written in FORTRAN/C) which I want to port under Windows. It can be started with one parameter:

$gribprint gfs1.grib

Example output on the console:

--------------------------------------------------
rec GRIB Lvl Lvl Lvl Time Fcst
Num Code Code one two hour
--------------------------------------------------
1 11 1 0 0 2005-10-11_00:00 +00

I have success with the compilation of the program under Windows. If I run it without argument it works fine and displays a help message. But if I run it with an argument (gfs1.grib) it starts to read the file and then it gives error message (it says that error log is created but I can't find it, W2K). The file is ok. I'm wondering where is the problem and I guess that it's in the file:

/regrid/pregrid/util/cio.c

where are the I/O (read & write) functions. Here are the original sources for UNIX/Linux:

ftp://ftp.ucar.edu/mesouser/MM5V3/REGRID.TAR.gz

Thanks for any ideas!


Best Regards,

Angel
stormlab is offline   Reply With Quote
Old Oct 15th, 2005, 10:18 PM   #2
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,223
Rep Power: 5 grumpy is on a distinguished road
On a quick look at the code, it appears your Fortran functions are doing unformatted I/O. The problem with that is that the structure files created using unformatted I/O are (Fortran) compiler dependent. The cio.c file is also doing binary I/O, and the mapping of data read from such a file into actual data structures (in C) is also compiler dependent.
grumpy is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:16 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC