SPARC to Intel Problem

SPARC to Intel Problem

Post by Kevin W. Thom » Thu, 16 Oct 1997 04:00:00



I have a very large application that display binary radar data.  The data
is created on SPARC systems, both Solaris 1.x and 2.x.  The application works
fine on both SPARC systems.  It also works fine for HP-UX 9.x and HP-UX 10.x.

Today, I tried to get it running on Solaris 2.x X86, with disastrous results.
After putting some debugging statements in the code, I find that there is a byte
order problem.  A quick test program using swab() confirms that this is
happening.

Is there any way to easily fix this?  I have no interest in going line by
line over 66000 lines of code.

        Kevin W. Thomas
        Sun System Administrator & Meteorologist
        National Severe Storms Laboratory
        Norman, Oklahoma


 
 
 

SPARC to Intel Problem

Post by Gavin Maltb » Fri, 17 Oct 1997 04:00:00



Quote:

> I have a very large application that display binary radar data.  The data
> is created on SPARC systems, both Solaris 1.x and 2.x.  The application works
> fine on both SPARC systems.  It also works fine for HP-UX 9.x and HP-UX 10.x.

> Today, I tried to get it running on Solaris 2.x X86, with disastrous results.
> After putting some debugging statements in the code, I find that there is a byte
> order problem.  A quick test program using swab() confirms that this is
> happening.

> Is there any way to easily fix this?  I have no interest in going line by
> line over 66000 lines of code.

You may be able to use the 'swab' option in dd to re-order data
as it is interpreted on the x86 system.

Cheers

Gavin

 
 
 

SPARC to Intel Problem

Post by Casper H.S. Dik - Network Security Engine » Fri, 17 Oct 1997 04:00:00


[[ Reply by email or post, don't do both ]]


Quote:>Today, I tried to get it running on Solaris 2.x X86, with disastrous results.
>After putting some debugging statements in the code, I find that there is a byte
>order problem.  A quick test program using swab() confirms that this is
>happening.
>Is there any way to easily fix this?  I have no interest in going line by
>line over 66000 lines of code.

Depends; if the data is read in at one location, then that's where you need
to change your code.

Or you can write a data filter that swaps the data and makes it little
endian.

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

 
 
 

SPARC to Intel Problem

Post by BRANDON WILLIAM HU » Sat, 18 Oct 1997 04:00:00



: Today, I tried to get it running on Solaris 2.x X86, with disastrous results.
: After putting some debugging statements in the code, I find that there is a byte

x86 is little-endian.  Sparcs are big-endian.  This is an architecture
specific problem.

: Is there any way to easily fix this?  I have no interest in going line by
: line over 66000 lines of code.

If you're not willing to fix your code to make it less architecture specific,
and since I don't know where in your code the byte order of the machine would
affect things, the only real solution is: Don't run it on Intel boxes.  :)

Otherwise, you might want to check out /usr/include/sys/byteorder.h for some
handy compiler directives which might help you out.

--
|   Brandon Hume aka "Hurricane" - hume at ug.cs.dal.ca & isisnet.com   |
|          "What was your username again?  *Clickity-click*"            |

 
 
 

1. sparc (ultra sparc) solaris 8 vs. intel solaris 8 comparison

Hi all:

A newbie question:

Can anyone give an opinion for  comparison between Sparc (or Ultra sparc)
Solaris 8 and IA solaris 8?  I currently has a Sparc 20 machine running
solaris 8.  Thinking about installing IA solaris on a intel pc machine.

Any hardware installation problem/limitations and software limitations?  I
also appreciate any hyper links.

Thank you very much.

Chang

2. PLIP - how can I find out what irq and io uses my parallel port?

3. Flexlm problem (Intel/Sparc)

4. Need help for Xconfigurator!!

5. slowness problem on redhat 5.1 intel/sparc

6. Need Assistance Please!!!!

7. Problem connecting sockets betwen sparc and intel systems

8. PATCH 2.5: kconfig remove ia64 ACPI relics

9. Difference between Sparc 2, Sparc 10 and Ultra Sparc 10

10. Sparc 5 vs Sparc 10 vs Sparc 20

11. Intel + Sparc Together?

12. compatibility Sparc vs Intel

13. newbie: differences b/w apps running on Sparc v.s. Intel