Re: Problems with gcc
I think my gcc problem is partly solved. It seems related to time_t which doesn't behave on amd64 as on i386 (where it was a double). I don't know yet how to cope with this but there must be a solution, there is a lot of concern about time_t and amd64 on the web. If you have a quick answer to this question too, don't hesitate to talk to me! For the installation and removal of gcc-4.3 base I still can't figure out what to do, but if compilation is possible, I feel less annoyed yet. Thank you again, Emmanuel -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Problems with gcc
On Wed, 16 Jul 2008 10:48:42 -0400, Lennart Sorensen [EMAIL PROTECTED] said: Try 'apt-get -f install' that will try to get the packages into a sane state again. # aget -f install Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Not sure what you did but you manged to install libgcc1 that requries gcc 4.3 but not have gcc-4.3-base installed. So the answer is either install gcc-4.3-base or go back to an older libgcc1 that you do have the requirements for. I first installed etch when I installed the whole system and then upgraded to lenny. gcc-4.3-base is installed, but I can't remove it, because of libgcc1: ... The following packages have unmet dependencies: libgcc1: Depends: gcc-4.3-base (= 4.3.1-2) but it is not going to be installed E: Broken packages Be very careful since removing libgcc1 will likely make your system unusable so don't do that. Either install an older version (apt-get install libgcc1=someversionnumber), or install the required gcc-4.3-base package. 'apt-cache show libgcc1 |grep Version' can get you a list of what versions you have to choose between. # apt-cache show gcc |grep Version Version: 4:4.3.1-1 # apt-cache show libgcc1 |grep Version Version: 1:4.3.1-2 it seems libgcc1 4.3.1-2 doesn't like gcc-base 4.3.1-1, but there is no way to have these version numbers match. -- Len Sorensen You can see a little output of my program at http://rafb.net/p/izqIhT10.html where the correct is mixed with unwanted verbose. Many thanks, Emmanuel -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Problems with gcc
On Wed, 16 Jul 2008 13:17:47 -0400, Lennart Sorensen [EMAIL PROTECTED] said: Do apt-get update. According to packages.debian.org/gcc-3.4-base the current version in lenny is in fact 4.3.1-2 so if you don't see that either you are using a bad mirror, or you didn't run apt-get update recently. gcc is not gcc-4.3-base. right! and my gcc-4.3-base matches libgcc1 Len Sorensen how could I put my system back in the original state without reinstalling from scratch? Emmanuel -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Problems with gcc
On Wed, 16 Jul 2008 14:53:32 -0400, Lennart Sorensen [EMAIL PROTECTED] said: But you had an error saying libgcc1 required a specific gcc-4.3-base which made it look like it was missing. What was the command you ran to get that error then? When I realized that I couldn't run compiled programs I decided to remove all the versions of gcc I had (3.4, 4.1, 4.3) to reinstall them from the mirror (ftp://ftp.fr.debian.org/debian/ lenny main contrib -- changing it later to the main didn't improve the situation) running apt-get clean, then: # sudo apt-get remove gcc-4.3 gcc-4.3-base Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: libgcc1: Depends: gcc-4.3-base (= 4.3.1-2) but it is not going to be installed E: Broken packages After that,trying to remove libgcc1 (just to see) I got : The following packages have unmet dependencies: libc6: Depends: libgcc1 but it is not going to be installed E: Broken packages I can only reinstall these 2 packages but not remove them. Trying to remove libc6 (also for testing) brings up an awful list of software, among them essential ones that wouldn't leave my system usable, but at least it is removable. -- Len Sorensen I think I'm feeling depressed! Emmanuel -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: EM64T compiling options?
Many thanks, I'll read your link with attention. Do you have further links on threads and IPC ? I'm thinking in rewriting an old and unfinished logical interpreter in C that used assembly code (nasm) for truth evaluation of the smallest elements. I'd like also to create a small database for prime numbers (using John Moyer's storage code) in order to test several things on prime numbers distribution. A+ Emmanuel On Tue, 15 Jul 2008 12:56:18 +0200, Cyril Jaquier [EMAIL PROTECTED] said: Hi, I'm migrating from an i686 to an EM64T machine (Intel core 2 quad) and I'd like to know whether there are specific options that I can pass to gcc for an optimization of my code or if everything is blindly set up. How would I manage the 4 cpu cores if I was to write in assembly? GCC has a lot of optimization/architecture flags. Just have a look here [1]. However, this won't make your software use the 4 cores. You should use threads or multiple processes with IPC. I don't know what you want to do but I think you should forget about writing in assembly and use an higher level language. You probably don't need assembly at all. Moreover, higher level language have sometimes concurrency and synchronization facilities which will help you getting the most of your 4 cores. Regards, Cyril Jaquier [1] http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: EM64T compiling options?
The loop sharing looks exciting but openmp seems difficult to use too. Does openmp replace pthreads or work in combination ? Emmanuel On Tue, 15 Jul 2008 14:55:24 +0200, Thomas Preud'homme [EMAIL PROTECTED] said: The Tuesday 15 July 2008 14:39:41 Lennart Sorensen, You wrote : You almost certainly wouldn't. Very few people have any reason to write in assembly anymore. You might write a critical section of code in assembly, but all the glue ought to be in C, inluding anything to manage pthreads to do multiple threads, which is how you take advantage of multiple cores. You also can take a look at openmp which allow you to parallelize for loops and make easy synchronization. The support of openmp is included in latests gcc versions. -- Len Sorensen -- Thomas Preud'homme Why debian : http://www.debian.org/intro/why_debian -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: EM64T compiling options?
There is an environment variable GOMP_AFFINITY in libgomp that binds threads to single cpus. Can I use it the same way with multi-cores (i.e GOMP_CPU_AFFINITY=0 1 2 3 in order to bind thread 1 to core 0 etc..)? Is this a good way to take advantage of the quad architecture? Emmanuel On Tue, 15 Jul 2008 16:24:49 +0200, Thomas Preud'homme [EMAIL PROTECTED] said: The Tuesday 15 July 2008 15:46:06 E. Rens, you wrote : The loop sharing looks exciting but openmp seems difficult to use too. Does openmp replace pthreads or work in combination ? AFAIK it use pthread to work but it create all necessary pthread at startup to avoid creating them at each loop parallelization. It should work properly with pthreads, it wouldn't be packaged with gcc if it wasn't the case. However I didn't test this combination. openmp is really simple to use, easier than programming the same thing with pthreads. You can see examples on wikipedia : http://en.wikipedia.org/wiki/OpenMP The purpose is to do simple parallelization. If you want to write an algorithm which needs modification to support multi-cores, you have to do it yourself with pthreads. Regards Emmanuel -- Thomas Preud'homme Why debian : http://www.debian.org/intro/why_debian -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]