- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Compiled Fortran File from another OS...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2003 11:23 AM
01-30-2003 11:23 AM
Compiled Fortran File from another OS...
I've a little problem here... I've an IBM workstation running AIX 4.3.2 and XLfortran.... On that machine, some users have compiled Fortran progs, and now I have change my IBM for and HP Visualize B2600 running HP-UX 11i and without a Fortran compiler...
What I have done, is moved the file from the IBM on the HP station, with the same rights of rwx on each file.... The problem is when I call on compiled app, it says to me:
/elec/bin/excu[57]: //elec/bin/exec/zturb: cannot execute
What's on the line in my "excu" script on line 57, is to run that prog "zturb"....
any clue.?.?.? or somebody know why this program is not executable... is it really because of the compilation on an IBM machine???
Regards
Jonathan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2003 11:30 AM
01-30-2003 11:30 AM
Re: Compiled Fortran File from another OS...
Different compiler, different architecture: it's definitely not going to work.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2003 11:38 AM
01-30-2003 11:38 AM
Re: Compiled Fortran File from another OS...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2003 11:39 AM
01-30-2003 11:39 AM
Re: Compiled Fortran File from another OS...
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2003 11:43 AM
01-30-2003 11:43 AM
Re: Compiled Fortran File from another OS...
I just hit the gcc web site and it says it will compile fortran. I've never tried it before. Sounds like fun!
http://gcc.gnu.org/onlinedocs/gcc-3.2.1/gcc/G---and-GCC.html#G++%20and%20GCC
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2003 11:50 AM
01-30-2003 11:50 AM
Re: Compiled Fortran File from another OS...
http://hpux.cs.utah.edu/hppd/hpux/Gnu/gcc-3.2/
Or the GCC compiler depot from HP:
http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,547,00.html
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2003 11:52 AM
01-30-2003 11:52 AM
Re: Compiled Fortran File from another OS...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2003 12:01 PM
01-30-2003 12:01 PM
Re: Compiled Fortran File from another OS...
If your code is written in f90 standards, the compile will most likely fail.
The HP fortran compiler has both f77 and f90, so definately a safer route if your not sure.
You can download egcs from the HP porting center. http://hpux.cs.utah.edu/hppd/hpux/
Good luck!
Shannon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2003 12:08 PM
01-30-2003 12:08 PM
Re: Compiled Fortran File from another OS...
Does the g77 compiler support the "old" f77 extensions of do...while and do...until constructs ??
It's been about 20 years since I've written an F77 program!
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2003 12:11 PM
01-30-2003 12:11 PM
Re: Compiled Fortran File from another OS...
My curiousity is peaked also. I took a Fortran programming class a LONG time ago when I was in college. I won't say how long ago, but the U.S. president at the time was a former Southern governor, and not from Arkansas! :)
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2003 01:02 PM
01-30-2003 01:02 PM
Re: Compiled Fortran File from another OS...
I took some of my code and it worked. My code may predate yours, and was pretty basic math code for Calculus.
I'm not sure about how certain things would work though, as my code was mainframe based so file descriptors were much different than a Unix counterpart.
The basic routines all worked though. The one I compiled was a root number find program, which required no file i/o, just had a seed imbedded in the code.
Regards,
Shannon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2003 06:11 AM
01-31-2003 06:11 AM
Re: Compiled Fortran File from another OS...
I did g77
Somebody can help me please??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2003 07:04 AM
01-31-2003 07:04 AM
Re: Compiled Fortran File from another OS...
But I guess as it builds on gcc they are basically very similar.
So look for file a.out (if the compile went without errors) which should be your executable.
Since the name isn't very fancy (and only for historic reasons) you can tell g77 to name the binary something else.
e.g.
g77 -o my_number_cruncher number_cruncher.for
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2003 07:20 AM
01-31-2003 07:20 AM
Re: Compiled Fortran File from another OS...
Here is a link to the Fortran docs on the GNU site. Maybe they will help:
http://gcc.gnu.org/onlinedocs/gcc-3.2.1/g77/
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2003 07:57 AM
01-31-2003 07:57 AM
Re: Compiled Fortran File from another OS...
Also, make sure that your path includes the ~/bin directory for both bin-utils and egcs.
Regards,
Shannon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2003 11:09 AM
01-31-2003 11:09 AM
Re: Compiled Fortran File from another OS...
programs. It supports the usual F77
extensions like "end do". I've had no
problems using it on our applications
(30000 lines of F77 code).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2003 10:50 AM
02-03-2003 10:50 AM
Re: Compiled Fortran File from another OS...
# g77 qn0460a.f
qn0460a.f: In subroutine `chdate':
qn0460a.f:42: warning:
CALL IDATE(IMOIS,IJOUR,IAN)
^
Intrinsic `IDATE', invoked at (^), known to be non-Y2K-compliant [info -f g77 M
Y2KBAD]
/usr/ccs/bin/ld: Unsatisfied symbols:
MAIN__ (first referenced in /usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.2/
../../../libfrtbegin.a(frtbegin.o)) (code)
ltitsb_ (first referenced in /var/tmp//ccckg4zb.o) (code)
collect2: ld returned 1 exit status
thanks!
jonathan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2003 11:30 AM
02-03-2003 11:30 AM
Re: Compiled Fortran File from another OS...
Step 2: Make sure you have a main program
defined somewhere. If the app is halfway
decently written there'll be a PROGRAM
and/or STOP statement somewhere.
Otherwise, look for code that is not encased
in a SUBROUTINE or FUNCTION or BLOCK
DATA program unit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2003 01:52 PM
02-06-2003 01:52 PM
Re: Compiled Fortran File from another OS...
the message from the compiler is pretty
self-explanatory. If you're concerned with
Y2K compliance then you need to fix the
warning. Otherwise, you can ignore it and
the program ought to run. (The reason why
your example above doesn't work is the
missing main program -- the warning about
IDATE is unrelated).
From the syntax you show, it seems that the
original programmer was using the VAX IDATE;
g77 believes that the VAX IDATE is not Y2K
compliant, hence the warning. However, if
you use the Unix IDATE syntax, g77 is satisifed
and the warning will go away. But you'll
need to modify your program a bit:
integer ibuf(3)
call idate(ibuf)
ijour = buf(1)
imoi = buf(2)
ian = buf(3)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2003 02:46 PM
02-06-2003 02:46 PM
Re: Compiled Fortran File from another OS...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2003 07:19 AM
02-14-2003 07:19 AM
Re: Compiled Fortran File from another OS...
The problem was with the order of the compilation of the files...
Thank you all!!