From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: shanmu@netscape.com (Shanmugav Shanmuganatha) Newsgroups: gmane.os.tru64.managers Subject: Processor speed Date: Tue, 19 Nov 2002 18:57:27 -0800 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: <3DDAFA17.1080704@netscape.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1037760981 18643 80.91.224.249 (20 Nov 2002 02:56:21 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 20 Nov 2002 02:56:21 +0000 (UTC) Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.20.101]) by main.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 18EL2J-0004qV-00 for ; Wed, 20 Nov 2002 03:56:19 +0100 Original-Received: (qmail 20590 invoked by uid 5); 20 Nov 2002 02:58:01 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 20575 invoked by uid 49493); 20 Nov 2002 02:58:01 -0000 Original-Received: from shanmu@netscape.com by sws1 by uid 49491 with qmail-scanner-1.14 (clamscan: 0.51. spamassassin: 2.50-cvs. Clear:SA:0(0.3/5.0):. Processed in 0.470046 secs); 20 Nov 2002 02:58:01 -0000 Original-Received: from unknown (HELO emroute3.ornl.gov) (160.91.4.110) by 0 with SMTP; 20 Nov 2002 02:58:01 -0000 Original-Received: from emroute3.ornl.gov (localhost [127.0.0.1]) by emroute3.ornl.gov (PMDF V6.1-1 #39060) with ESMTP id <0H5U00JV4TKOX2@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Tue, 19 Nov 2002 21:58:00 -0500 (EST) Original-Received: from netscape.com (r2d2.aoltw.net [64.236.137.26]) by emroute3.ornl.gov (PMDF V6.1-1 #39060) with ESMTP id <0H5U0072CTK26J@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Tue, 19 Nov 2002 21:57:39 -0500 (EST) Original-Received: from judge.mcom.com (judge.nscp.aoltw.net [10.169.8.47]) by netscape.com (8.10.0/8.10.0) with ESMTP id gAK2vXb20638 for ; Tue, 19 Nov 2002 18:57:33 -0800 (PST) Original-Received: from netscape.com ([10.169.99.161]) by judge.mcom.com (Netscape Messaging Server 4.15) with ESMTP id H5UTJX00.99M for ; Tue, 19 Nov 2002 18:57:33 -0800 Original-To: tru64-unix-managers@ornl.gov X-Accept-Language: en-us, en User-Agent: Mozilla/5.0 (X11; U; OSF1 alpha; en-US; rv:1.3a) Gecko/20021118 Xref: main.gmane.org gmane.os.tru64.managers:2504 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:2504 Hi, I wrote a small C program to get the processor speed of a multi-processor system. When I compiled the program I am getting the following error. cc -o proc proc_speed.c ld: Unresolved: __sve_p_online __sve_processor_info I tried compiling the program with -D__SVE__, but that generated other errors. Any clues to make the compilation succesfull will be greatly appreciated. Thanks, Shanmuganathan. #include #include #include #include #include #include #define MAX_PROCESSORS 8 /* Info collected on this many processors max */ main() { int processors[MAX_PROCESSORS]; int count = 0; int i = 0; int nConfigured = sysconf(_SC_NPROCESSORS_CONF); for (i = 0; i < nConfigured; i++) { int status = p_online(i, P_STATUS); if (status == -1 && errno == EINVAL) continue; if (status == P_ONLINE && count < MAX_PROCESSORS) { proc_info_t info; processor_info(i, &info); processors[count++] = info.pi_clock; printf("Proc speed %d\n",info.pi_clock); } } }