- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A simple question for which I think I know the answer, but my customer would like confirmation.
Currently I have source code that compiles using Compaq 6.1 for Windows, the only external libraries used are MSFLIB and DFLIB. My customer inquired if our source code could be compiled on the UNIX Alpha version. They have not purchased the compiler yet.
I don't expect the MSLIB files to work, but I'm only using QuickWin for run-time status and summaries, it can go. Are there other code portability issues between the two compilers? Is there anything else I should tell my customer? (note, I'm not fluent with UNIX, but I can relay the information).
Thanks,
Dennis Hussey
Currently I have source code that compiles using Compaq 6.1 for Windows, the only external libraries used are MSFLIB and DFLIB. My customer inquired if our source code could be compiled on the UNIX Alpha version. They have not purchased the compiler yet.
I don't expect the MSLIB files to work, but I'm only using QuickWin for run-time status and summaries, it can go. Are there other code portability issues between the two compilers? Is there anything else I should tell my customer? (note, I'm not fluent with UNIX, but I can relay the information).
Thanks,
Dennis Hussey
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
By chance, we encountered porting our existing code written in CVF5
into F90/TruUNIX/Alpha and we had no serious problems related with
compilers (we had problems, though, due to different architecture of
systems). Both compilers support most of the same intrinsics and extensions. We protected the OS-dependent stuff with preprocessor
(!DEC$IF DEFINED works fine on both) and there were only few
functions to replace (luckily, in few source file which are compiled only under
UNIX anyway). The porting problems we encountered were:
- Case sensitivity in file names and different folder separator (/ and )
- There were some cray pointers involved, so we had to define a
constant PTR_SIZE:
and declare corresponding pointers as INTEGER(PTR_SIZE);
- We also needed just a few interfaces to standard C library routines
(e.g. localtime -- but that one is specific for interfacing the ported
code with our partners' application environment)
In total, we have only about ten !DEC$IF DEFINED (_UNIX) throughout
the 40,000 lines code, where only 2-3 were absolutely necessary (others
are related with functional differences). So, I'd say that with a little luck
the porting can be done very fast.
Actually, the most of the problems were in synchronizing the data structures interchanged between our F90 and their C code (alignment, shared memory, POINTERs and similar), but for a stand-alone application
I believe there should be no such problems.
HTH
Jugoslav
into F90/TruUNIX/Alpha and we had no serious problems related with
compilers (we had problems, though, due to different architecture of
systems). Both compilers support most of the same intrinsics and extensions. We protected the OS-dependent stuff with preprocessor
(!DEC$IF DEFINED works fine on both) and there were only few
functions to replace (luckily, in few source file which are compiled only under
UNIX anyway). The porting problems we encountered were:
- Case sensitivity in file names and different folder separator (/ and )
- There were some cray pointers involved, so we had to define a
constant PTR_SIZE:
!DEC$IF DEFINED _UNIX INTEGER, PARAMETER:: PTR_SIZE=8 !DEC$ELSE INTEGER, PARAMETER:: PTR_SIZE=4 !DEC$ENDIF
and declare corresponding pointers as INTEGER(PTR_SIZE);
- We also needed just a few interfaces to standard C library routines
(e.g. localtime -- but that one is specific for interfacing the ported
code with our partners' application environment)
In total, we have only about ten !DEC$IF DEFINED (_UNIX) throughout
the 40,000 lines code, where only 2-3 were absolutely necessary (others
are related with functional differences). So, I'd say that with a little luck
the porting can be done very fast.
Actually, the most of the problems were in synchronizing the data structures interchanged between our F90 and their C code (alignment, shared memory, POINTERs and similar), but for a stand-alone application
I believe there should be no such problems.
HTH
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Our UNIX compilers and the CVF compiler are the same underneath, so other than OS-specific features, the compilers are as compatible as can be. DFLIB (MSFLIB is just a synonym for this) isn't supported on UNIX, but CVF does support many UNIX-compatible routines in module DFPORT (in many cases, you may not need to USE DFPORT to use these.)
Jugoslav, you'll like our new INT_PTR_KIND() intrinsic in 6.5A (and 5.4 on UNIX).
Steve
Jugoslav, you'll like our new INT_PTR_KIND() intrinsic in 6.5A (and 5.4 on UNIX).
Steve
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page