AMD Processors
Decrease font size
Increase font size
Topic Title: Does Opteron do UNIX?
Topic Summary:
Created On: 12/02/2003 10:02 PM
Status: Read Only
Linear : Threading : Single : Branch
1 2 3 4 5 6 7 Next Last unread
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 12/02/2003 10:02 PM
User is offline View Users Profile Print this message

Author Icon
Blackhawk
Member

Posts: 81
Joined: 12/02/2003

I'm way out of my comfort zone with a problem. I need a new box to use in porting some 32 bit VC++ apps to run in a 64 bit UNIX environment. Being a long time Athlon user, I want a dually Opteron. Speed thrills, and all that....

Alas, I haven't been able to determine if there's any flavor or UNIX that runs in such a system.

Not only that, I don't know if an app that runs on Linux is easily ported to UNIX. Since Mandrake AMD64 apparently runs on Opteron, maybe that could be an intermediate step, or maybe UNIX flavors are quite happy with Linux apps.

It's a whole new world for this duck, and if anybody can give a few pointers, I'll really appreciate it!
 12/03/2003 03:12 AM
User is offline View Users Profile Print this message

Author Icon
deuxway
Member

Posts: 193
Joined: 10/08/2003

Blackhawk, yes Opteron does UNIX.
Some implementations are more mature than others.

For examples there is SuSE 9.0 for AMD64, which supports dual Opterons, and is available as a commercialy supported distribution from SuSe (now part of Novel). There are others.

Have a look at migrating from True64 Unix to Linux & AMD64' ">http://forums.amd.com/index.php?showtopic=176 to see jes's analysis. The thread is dated 7th November in the AMD Opteron™ General Info and Specs forum. Many of these will have progressed since then.

You might want to go to www.google.com special services (http://www.google.com/options/specialsearches.html) where you can search among Linux and BSD sites more easily.

There are a couple of questions you could answer:
1. Can you say which 64bit UNIX you are aiming for?
If it is strongly oriented towards BSD, then OpenBSD etc may be a better bet.
If it is vanilla UNIX, Linux, and hence Mandrake (but see jes's postings), may be better.

2. What kind of Windows platform services do your VC++ applications use?
a. Windows API: ActiveX, OLE, sockets, ...
b. SQLServer Database
c. Exchange server
d. IIS
e. Active Directory Server
f. ...

If you could identify these subsystems, it may help identify which distribution would provide the pieces you need. If the target services will be available to you anyway (e.g. you may use Oracle DB, and you don't plan to host that on your new machine), then this is less important.

If you are a Microsoft MSDN subscriber, you may want to consider getting a beta of MS Windowws for AMD64, and use VC++ on that to get your application '64 bit clean'.

[At the risk of my skin - If the 64bit UNIX is BSD oriented you may want to consider Apple G5, it's OS X is strongly BSD under the covers, and 10.3 comes with development tools.
I have an Apple iBook as well as a PC running SuSE.]

Hope this helps.
 12/03/2003 03:31 AM
User is offline View Users Profile Print this message

Author Icon
Bitey
Elite

Posts: 1492
Joined: 10/07/2003

odd slightly off topic comment, MS Vc++ Version 6 can be run under linux using wine , of course it still produces windows executables but if your porting that could be very handy anyway
 12/03/2003 04:12 AM
User is offline View Users Profile Print this message

Author Icon
jes
Senior Member

Posts: 1134
Joined: 10/22/2003

Hi Blackhawk,

Just as a followup to Deuxways' post I spotted the other day that FreeBSD has a new release for X86-64 which does now (thankfully) include SMP, however it is still lacking a few things (I found it lacked a lot of "long double" functions last time I checked).

Mandrake has moved on a bit and now have a Release Candidate for X86-64 which runs quite happily, pretty stable and runs 32/64 like a dream. Also Gentoo have an offering for X86-64 too.

I haven't checked out RedHat since I looked at Taroon/Gingin (which in my opinion were just *bad*)...

I would have gone for FreeBSD if it had been a little bit more mature (for X86-64) and had all the functions I needed, because of its good name regarding security/patches. However I've currently got Mandrake installed and I have to say I'm (still) very impressed.

Regarding the porting to Linux/64Bit, as Deuxway points out it really comes down to what your applications do. If they are purely console applications then it makes life quite a bit easier, if your doing any graphical stuff then obviously thats going to add a headache for you (thats why I love Delphi/Kylix so much).

If you could break down what the applications actually do, then maybe we could help point out any pitfalls etc that you may encounter.

-------------------------
The opinions expressed above do not represent those of Advanced Micro Devices or any of their affiliates.
http://www.shellprompt.net
Unix & Oracle Web Hosting Provider powered by AMD Opterons
 12/03/2003 10:10 AM
User is offline View Users Profile Print this message

Author Icon
Blackhawk
Member

Posts: 81
Joined: 12/02/2003

Wow! Thanks for the comprehensive replies! They've helped far more than you can imagine!

The first C++ app I need to port is just a console app that just crunches data and writes compilations of it. It's called from a script and shuts down by itself when finished, so hopefully I can come up with something that will run on most flavors of UNIX without much modification.

My remaining mental fog compels me to ask some other ignorance revealing questions.

1. Is Linux more or less just an OS version(s) of UNIX with high portability among the various UNIX flavors?

2. IOW, if my GUI-less console app's developed on Mandrake AMD64 Linux, are the odds pretty good that it'll run on HP-UX without major modifications?

3. Is it safe to presume that a Linux app runs on most of the Linux versions without mods?
 12/03/2003 10:50 AM
User is offline View Users Profile Print this message

Author Icon
awd4dad
Member

Posts: 117
Joined: 10/06/2003

Sun Solaris now runs perfectly on opteron but in 32 bit mode. It will be ported to full 64 bit mode in 2004 (1st july).
 12/03/2003 01:14 PM
User is offline View Users Profile Print this message

Author Icon
jes
Senior Member

Posts: 1134
Joined: 10/22/2003

QUOTE (Blackhawk @ Dec 3 2003, 07:10 AM)
1.  Is Linux more or less just an OS version(s) of UNIX with high portability among the various UNIX flavors? 


Essentially Linux is a Unix-like operating system which runs on a (very) wide range of hardware, from PC's (286/386's to the latest X86-64 hardware), Alpha's, Sparcs, PowerPCs to embedded Hardware (even PDA's).

There are many distributions which may or may not be free depending on your particular requirements, but the good thing about Linux is that you can spend as much or as little (i.e. nothing) as your budget allows.

QUOTE (Blackhawk @ Dec 3 2003, 07:10 AM)
2.  IOW, if my GUI-less console app's developed on Mandrake AMD64 Linux, are the odds pretty good that it'll run on HP-UX without major modifications? 


Well....the key here is to write "clean" code. In order to make your code as portable as possible you need to keep an eye open for things like byte-order between platforms. HP-UX (so far as I know) is big-endian whereas X86-64 is little-endian. This means that you need to be careful about what exactly your doing when you're throwing bytes/words around because you might not get what you expect when moving between platforms!

The other thing you need to watch out for is to make you code as portable as possible between 64/32bit. It's not rocket science, and the compiler should help you to a certain degree...but many programmers (and I've been guilty of it myself) make assumptions about the size of things (like integers, longs etc) and then just do an artibrary cast to get the bits (no pun intended) that they need...obviously this could be a cause of problems between 32/64bit. However this is well documented and it's not difficult to write 64bit clean code (I recently re-coded a 2000 line program and it took less than 30 minutes to read/change/check).

QUOTE (Blackhawk @ Dec 3 2003, 07:10 AM)
3.  Is it safe to presume that a Linux app runs on most of the Linux versions without mods?


It's a reasonable assumption, but that doesn't mean it's true

If your talking about taking a compiled application from one distribution and running it on another distribution, then it really depends on what that application consists of. The majority of programs these days are compiled dynamically which means (excuse me if you already know this) that they may call functions that reside not within the application itself but in a library somewhere. If that library is not present on the distribution you're attempting to run on, then the program is not going to run.

It's not difficult to check the libraries that are required by your executable (ldd is your friend here!. If they are custom libraries then its perfectly possible to ship the libraries with your executable (obviously compiling the executable so that it looks in a sensible place for them....*never* overwrite someone elses libraries!.

You could compile your application statically, which will include everything it needs (in theory! I've had this fail before though) into the executable itself, which should make it far more portable.

Or the third option is to recompile the app on the machine you wish to run it on, this way it should be easily determined if everything is there that is required.

Hope this helps a little!


-------------------------
The opinions expressed above do not represent those of Advanced Micro Devices or any of their affiliates.
http://www.shellprompt.net
Unix & Oracle Web Hosting Provider powered by AMD Opterons
 12/03/2003 01:20 PM
User is offline View Users Profile Print this message

Author Icon
jes
Senior Member

Posts: 1134
Joined: 10/22/2003

QUOTE (awd4dad @ Dec 3 2003, 07:50 AM) Sun Solaris now runs perfectly on opteron but in 32 bit mode. It will be ported to full 64 bit mode in 2004 (1st july).
That should be worth a look...although last time I looked at Solaris I hated the window manager they included and Gnome etc was a nightmare to try and compile on it.

-------------------------
The opinions expressed above do not represent those of Advanced Micro Devices or any of their affiliates.
http://www.shellprompt.net
Unix & Oracle Web Hosting Provider powered by AMD Opterons
 12/03/2003 01:50 PM
User is offline View Users Profile Print this message

Author Icon
Blackhawk
Member

Posts: 81
Joined: 12/02/2003

Thanks, jes. That helps a LOT! It even gives me some obscure-to-me terms to check out!

One of my problems is that the VC++ code is proprieitary as to how and what it does so I don't have the option of giving anybody the source code to port over to their particular hardware/OS. If they decompile an .exe, they've taken an express detectable action in violation of the license and legal restrictions.

It's not an onerous concept to customize an .exe to run on each customer's UNIX type setup under what appears to be a high commonality among the 80 or so UNIX flavors likely to be encountered. Job security, and all that you know....
 12/03/2003 01:58 PM
User is offline View Users Profile Print this message

Author Icon
jes
Senior Member

Posts: 1134
Joined: 10/22/2003

lol, yes I understand...I didn't say it was always a good idea to hand your source code over 8-;

By the sounds of it, if the application is purely console based, then you should be able to write something pretty portable, if it doesn't use too many libraries (i.e. just standard ones like libmath) then so much the better, otherwise compile it statically and it should hopefully run on most of the platforms.


-------------------------
The opinions expressed above do not represent those of Advanced Micro Devices or any of their affiliates.
http://www.shellprompt.net
Unix & Oracle Web Hosting Provider powered by AMD Opterons
 12/03/2003 05:44 PM
User is offline View Users Profile Print this message

Author Icon
deuxway
Member

Posts: 193
Joined: 10/08/2003

Here is an article at devx' ">http://www.devx.com/amd/Article/17783 about porting from 32bit Windows to 64bit windows.

It describes some of the issues Jes mentions in detail.
The article also describes a compiler flag (/Wp64) which it says works with 32bit MS compilers. The flag causes the compiler to generate portability warnings.

The article points at other porting tips and an article by AMD, so it should help get your application 64bit clean while you are still in the environment you are familiar with.

As I said, if you are a subscriber to MSDN (Microsoft Developer Network), you can get a beta of the AMD64 OS along with development tools and get clean before porting.

I'm sure you've thought of this, but for a console application, you could consider writing a thin 'veneer' over the OS calls that you use. The two goals are to collect all system dependent code into one place and hence isolate the bulk of your code from system dependencies.

You then have more choice over how to get stuff ported, as only the veneer need be seen by someone else while they port to a specific system. There are commercial libraries which do this, and there are several (some free) UNIX on Windows library if you wanted to have a single, common, tested API to start with.
 12/03/2003 06:29 PM
User is offline View Users Profile Print this message

Author Icon
deuxway
Member

Posts: 193
Joined: 10/08/2003

AMD were saying that there are porting tools; I found this AMD AMD64 Developer Resource Kit' ">http://www.amd.com/us-en/Proce...,,30_2252_9044,00.html but I didn't see the tools I expected. You may want to check these out. There are also some documents and other Developer Resources links on this AMD page.

I believe that there are versions of GNU's gcc which run on Windows, but generate code for AMD64. This would be a bit like the VC++ /Wp64 flag, *but* you would be running the same gcc compiler as you'd be using on Linux or *BSD. You may get different diagnostics which, again you could fix while in Windows. I'm afraid I haven't used gcc this way, so can't help further. As Jes described in the other thread, you can generate AMD64bit code with gcc while running on a 32bit machine.

You probably want to visit Develop with AMD' ">http://www.amd.com/us-en/Proce...AMD/0,,30_2252,00.html too.

You may want to try googling for "HP-UX" or "Linux" and relevant key words (like fopen), along with the nifty "inurl:hp.com" (from O'Reilly's Google Hacks). This finds all pages with URL's containing hp.com, and so may turn up something useful. I found the handy HP-UX Technical Documentation' ">http://docs.hp.com/.

I believe I have seen some stuff about porting between HP-UX or True64 and Linux (but it may be 'the wrong way' :-). I did find OpenSource.hp.com' ">http://opensource.hp.com/ which seemed to have some handy links.
 12/03/2003 06:38 PM
User is offline View Users Profile Print this message

Author Icon
deuxway
Member

Posts: 193
Joined: 10/08/2003

Jes, tiny point, when you say QUOTE In order to make your code as portable as possible you need to keep an eye open for things like byte-order between platforms. HP-UX (so far as I know) is big-endian whereas X86-64 is little-endian.

It is more accurate to say the underlying CPU is little or big-endian. The HP PA-RISC may have been big-endian (seems to ring a bell, but I have tinitus :-), and the OS just has to cope.

I'm not trying to detract from your fundamental point about cavalier casting, which I strongly agree with.
 12/03/2003 07:08 PM
User is offline View Users Profile Print this message

Author Icon
deuxway
Member

Posts: 193
Joined: 10/08/2003

Arrggghhhh! Sorry Blackhawk for not thinking of this sooner.

There is a *free* way to check out Linux API portability while still using Windows (mostly).

Have a look at Cygwin' ">http://www.cygwin.com/. It provides a fairly complete text-based Linux, which runs on top of Windows. I have only used it within consoles. I believe you can use X-Windows, but I've never bothered.

This won't give you 64bit code, but it will let you identify the API differences. Cygwin is pretty much vanilla (I think, gosh, I'm getting old), so if it is straightforward on Cygwin, it should be straightforward on other *nix's. The converse isn't true; just because API's are missing on Cygwin, it may be because there are some libraries which are awkward to emulate on Windows. I don't expect this to be the common case for your console app.

Cygwin is pretty complete vanilla Linux emulation. You can get gcc++, the normal development libraries, as well as Linux/UNIX tools like Make, and a debugger etc. [Update: I just checked, it's an up-to-date version of gcc, so it may understand 64bit stuff.]

It's a bit weird, as you are in a complete Linux-like environment while in a Windows command window. The generated binaries are .exe's and can be linked to run standalone (no dynamic loading) on a Windows machine.

This would allow you to work on the same code within both a Windows and a simulated Linux environment, and with less hassle than having to set up a new OS.

You will need reasonable bandwidth to download it all. Take care to read the install instructions. It has a very sneaky installer, which can be confusing the first time. Though you can run it multiple times to pull down pieces, I have a DSL line, and just grabbed everything. Whatever you do, don't forget the documentation (man pages).

You will need to select the options you want at the installer. It is broken up into lots of independant pieces for the benefit of the low-speed-connected, so you may need to wade through a long list of pieces if you want to keep its footprint down.
 12/04/2003 05:46 AM
User is offline View Users Profile Print this message

Author Icon
jes
Senior Member

Posts: 1134
Joined: 10/22/2003

QUOTE (deuxway @ Dec 3 2003, 03:38 PM) Jes, tiny point, when you say

It is more accurate to say the underlying CPU is little or big-endian. The HP PA-RISC may have been big-endian (seems to ring a bell, but I have tinitus :-), and the OS just has to cope.

I'm not trying to detract from your fundamental point about cavalier casting, which I strongly agree with.
Yep...of course your right, very bad wording on my part.

Oh and you made me spill my coffee laughing with the tinitus quote 8-;

-------------------------
The opinions expressed above do not represent those of Advanced Micro Devices or any of their affiliates.
http://www.shellprompt.net
Unix & Oracle Web Hosting Provider powered by AMD Opterons
 12/04/2003 05:51 AM
User is offline View Users Profile Print this message

Author Icon
jes
Senior Member

Posts: 1134
Joined: 10/22/2003

Blackhawk, if you need a 64bit machine to poke around/test some things, let me know and I'll give you access to my dual 244 machine.

-------------------------
The opinions expressed above do not represent those of Advanced Micro Devices or any of their affiliates.
http://www.shellprompt.net
Unix & Oracle Web Hosting Provider powered by AMD Opterons
 12/04/2003 06:30 PM
User is offline View Users Profile Print this message

Author Icon
Blackhawk
Member

Posts: 81
Joined: 12/02/2003

deuxway and jes:

You two are magnificant! Thanks for all the help, but it'll take me the rest of the year to follow up on all the tips, tricks, and hints you've given me! I really appreciate the help!
 12/04/2003 06:37 PM
User is offline View Users Profile Print this message

Author Icon
jes
Senior Member

Posts: 1134
Joined: 10/22/2003

QUOTE (Blackhawk @ Dec 4 2003, 03:30 PM) deuxway and jes:

You two are magnificant! Thanks for all the help, but it'll take me the rest of the year to follow up on all the tips, tricks, and hints you've given me! I really appreciate the help!
No problem at all, let us know how you get on in the wonderful world of 64bit.

-------------------------
The opinions expressed above do not represent those of Advanced Micro Devices or any of their affiliates.
http://www.shellprompt.net
Unix & Oracle Web Hosting Provider powered by AMD Opterons
 12/04/2003 06:39 PM
User is offline View Users Profile Print this message

Author Icon
Blackhawk
Member

Posts: 81
Joined: 12/02/2003

QUOTE (jes @ Dec 4 2003, 02:51 AM)Blackhawk, if you need a 64bit machine to poke around/test some things, let me know and I'll give you access to my dual 244 machine.
Thanks for the offer, jes!

However, I've got things finagled to have this project justify a dual 248 machine, and that's turning into a project as well. Looks like the Tyan Thunder 7885(?) owns the MB field with Opterons. Any tips on that project will also be greatly appreciated!

(Just once, I'd like to have a machine that's serious overkill.... )

BTW: Any idea if I can set up one as a dual boot Win/*-ux?
 12/04/2003 06:54 PM
User is offline View Users Profile Print this message

Author Icon
jes
Senior Member

Posts: 1134
Joined: 10/22/2003

QUOTE (Blackhawk)
Looks like the Tyan Thunder 7885(?) owns the MB field with Opterons.  Any tips on that project will also be greatly appreciated! 

(Just once, I'd like to have a machine that's serious overkill.... )

BTW: Any idea if I can set up one as a dual boot Win/*-ux?


Hmmm, I'm guessing you mean the S2885 Which is the K8W? That's an excellent board, I have the server version (S2880 - K8S) it has pretty much everything I need, SCSI, IDE, SATA, 2 x Gigabit LAN etc. You'll get more tweaks with the workstation version to allow for a bit of overclocking etc (not vital for me, because I need stability more than OC'ing).

Yes you'll be able to dual boot, the only things to watch out for are SATA issues, which have just about been resolved with 64Bit linux, I think there's still some outstanding issues regarding SATA with the on board Promise controller with 64bit windows but hopefully they'll be ironed out soon

-------------------------
The opinions expressed above do not represent those of Advanced Micro Devices or any of their affiliates.
http://www.shellprompt.net
Unix & Oracle Web Hosting Provider powered by AMD Opterons
Statistics
112018 users are registered to the AMD Processors forum.
There are currently 0 users logged in.

FuseTalk Hosting Executive Plan v3.2 - © 1999-2014 FuseTalk Inc. All rights reserved.



Contact AMD Terms and Conditions ©2007 Advanced Micro Devices, Inc. Privacy Trademark information