Super-Computer Competition!

Page 3 - Seeking answers? Join the Tom's Hardware community: where nearly two million members share solutions and discuss the latest tech.
I'm getting the following error:

<b>implicit declaration of function `int printf(...)'</b>
For this line of Code.
printf ("usage : %s number1 number2\n",argv[0]);



Blah, Blah Blahh, Blahh, blahh blah blahh, blah blah.
 
Well i have been working hard for a cluster for a business. i got this job to build a mini-super computer. Gave me $4000.00 for it.

4pc beowulf cluster
OS: Solaris 8 (unix)
4 pc's: "There all the same"
P3 700 (256k)
128mb PC133
15gb ata100
i815 atx mobo (video , sound)
Desktop ATX case(stacked-up 4 high)
Quad ethernet connection (400mb)

Sweet system.

Nice Intel and AMD users get a Cookie.... :smile: Yummy :smile:
 
>I get "undeclared identifier" errors for "exit"
>and "atol".

You need to include stdlib.h

In theory, there is no difference between theory and practice.
In practice, there is.
 
Yea, I'll have to agree with Kelledin here. Something is wrong with either the code you posted, or the result.

I copied your post directly, commented out the non-code text, and added "include <stdlib.h>" so it would compile.

Here is what I got from a P200 I have handy:

[node9]$ g++ -O2 test.cc
[node9]$ time a.out 1 100000000
666666671666.458740
39.52user 0.14system 1:07.46elapsed 58%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (156major+12minor)pagefaults 0swaps

It was running another job at the time, that's why the CPU utilization is so low.

In any case, 67 seconds, and the result is very close to Kelledins result. And Kelledins reasoning on why you answer is wrong is unquestionable.

You might check the code again.

In theory, there is no difference between theory and practice.
In practice, there is.
 
>[nabil@viper nabil]$ time ./sigmasqrt 1 1000000000

Ah, there's the rub...
In your original post you said to run it from 1 to 100000000 (1e+8)
Now you say 1 to 1000000000 (1e+9)

Here's what I get now (again, on a non-idle p200)

[node9]$ time a.out 1 1000000000
21081851083600.382812
393.78user 0.58system 10:53.95elapsed 60%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (156major+12minor)pagefaults 0swaps

Very odd that the fractional part of my answer matches your PIII answer, but the integer part is off??


In theory, there is no difference between theory and practice.
In practice, there is.
 
Here are my results:

>time a.out 1 1000000000
21081851083600.558594
227.43u 0.02s 3:49.29 99.1%

I ran this on one of our UltraSparcII servers @ work.
A 6 processor 366Mhz with 2.5 GB of ram..

Intel Components, AMD Components... all made in Taiwan!
 
Ok girls, no copying off my list!!
I will be adding to my list a few more things.
I have not decided on my case, and a few more exotic goodies.

Supermicro P4DC6
http://www.supermicro.com/PRODUCT/MotherBoards/SUPER P4DC6 SPEC/SUPER P4DC6 SPEC.htm
Dual Xeon 1.7Ghz
Geforce3 64MB DDR
2 GB of PC800 RDRAM
SCSI320 Built in
Intel Pro/1000 Gigabit Ethernet over copper
Intel 500T switch with Gigabit modules
2x DPT Millennium Fibre channel adapters with 256MB on each
8x E-Disk FC235 36GB Solid state Disk FCA RAID-0 (4 on each controller)
http://www.bitmicro.com/edisk_fc235.html
Hercules Game theatre XP
Klipsh Promedia 4.1THX
Kenwood 72x Multibeam
Ricoh DVD-R/CDR Combo drive
Targa 3000 Infinite Editing
http://www.pinnaclesys.com/ProductPage.asp?Product_ID=91
Dual LNB Cisco Aeronet w/ dish @ 3meg / sec
24" Sony Trinitron by emtrem.com
Olympus FMD-150W
http://www.olympus-eye-trek.com/fmd-150w-manual.pdf
Microsoft Internet keyboard and explorer mouse
 
ROFL @ the guy who wants to put SBC's in his PCI slots.
ROFL @ you guys quoting specs/prices on SSD's (solid state disks)

Seems like a few gimps need to do some more research!
 
I don't know either, I am not much of a programmer myself either, but here is what I did my self step by step.
First of all I am working in a Linux environment using a GNU C compiler.
I took this code and put it in an ASCCI file and named it to sigmasqrt.c
#########################
#include <stdio.h>
#include <math.h>

int main (int argc, char** argv) {

long number1, number2, counter;
double result;

if (argc < 3) {
printf ("usage : %s number1 number2\n",argv[0]);
exit(1);
} else {
number1 = atol (argv[1]);
number2 = atol (argv[2]);
result = 0.0;
}

for (counter = number1; counter <= number2; counter++) {
result = result + sqrt((double)counter);
}

printf("%lf\n", result);

return 0;

}
########################

then executed the command:
%gcc -o sigmasqrt sigmasqrt.c -lm

this gave me a ready compile C program called sigmasqrt.
I changed permission on file to execute and ran it as
%./sigmasqrt 1 1000000000


That's it...Hope this can help you out...

_______________________________________________~
Software is like Sex, its better when its Free!
 
I guess We both got same result here, but the funny thing that my PIII-500's and my AMD-200 got exactly same different result which is 21081851083598.382812. So the question here is which is the exact right answer ???

Also is 227.43u in your answer in seconds or minutes ????

_______________________________________________~
Software is like Sex, its better when its Free!
 
i dont think i need to argue with anyone that support jsut isnt there for linux and its about usless for gaming witch is what most end users use comps for. and i cant use almost all my downloaded programs on it. not to mention the fact from as fare as i know i cant use office. since i dont care at all about the other office programs. i loaded and used a linux box for hmm about a day. came to teh conclusion it sux. as far as super computer i highly dout it maybe unix(maybe) but not linux. jsut because it was built off unix dont meen its the same.

Computer Shop owner and Head tech.
 
Yes interseting. Here We are all getting different answers when using different CPU makes....
My PIII-500's and my AMD-200 got exactly:
21081851083598.382812
but Sun Sparc ultraIIe 500 got:
21081851083600.558594

SO the question here how can We find out the right exact answer.?????
It may be 2 minutes or few seconds different but in CPU calculations it is a very big difference......

_______________________________________________~
Software is like Sex, its better when its Free!
 
"Supermicro P4DC6"

I like the onboard SCSI controller. It's Ultra160 now, supposedly upgradable to Ultra320 (with a bios flash?). You mention using a RAID configuration. Would that be software or hardware? Does this onboard SCSI support RAID in hardware? I couldn't find information on that.

-Raystonn

= The views stated herein are my personal views, and not necessarily the views of my employer. =
 
You're using solid state disks. The only thing they're lacking is a hardware RAID solution. As far as the SBCs, I've never used one and so have no idea how well it integrates with a system. If it can be used like a standard SMP system in Windows 2000, then that's fine. Otherwise it won't be of any benefit in any benchmarks.

-Raystonn

= The views stated herein are my personal views, and not necessarily the views of my employer. =
 
I won't argue about Linux's use as a desktop system. But saying it's not fit for a server or supercomputer--especially based on only a single day of experience with one Linux distro--doesn't really fly very well. Especially since a great many professionals use it for supercomputers and servers.

OK Raystonn, am I disqualified now? :wink:

Kelledin

bash-2.04$ kill -9 1
init: Just what do you think you're doing, Dave?
 
Ok, now that we got the right counter, we're good to go. The results are actually right now:
<pre>[ Kelledin@valhalla ~ ] # gcc -O2 -Wall test.c -o sqrt
test.c: In function `main':
test.c:25: warning: use of `l' length character with `f' type character
[ Kelledin@valhalla ~ ] # time ./sqrt 1 1000000000
21081851083600.382812

real 0m24.264s
user 0m24.240s
sys 0m0.020s
[ Kelledin@valhalla ~ ] #
</pre><p>This was on a T-bird 1.33GHz.

Kelledin

bash-2.04$ kill -9 1
init: Just what do you think you're doing, Dave?
 
In general an SBC works just like a standard motherboard, it's just compressed onto a single full-length card with a PICMG connector (combined ISA/PCI connector on the board edge, in line with where an ISA connector would be). It doesn't plug into a motherboard and make a second system though, it has to plug into a backplane (which is just slots, power connectors, and maybe keyboard connectors and PCI bridges).

Oh, and concerning FUGGER's RAID array--he's using a dedicated fiber channel RAID controller. The onboard SCSI would probaby be used just for controlling basic ASPI-driven SCSI devices.

Kelledin

bash-2.04$ kill -9 1
init: Just what do you think you're doing, Dave?
 
Ahhh, ANother different answer!..Yours is exactly 2.00000 more than what I had in one set of CPU's and -0.175782 from My Sparc one !!!hummm...Still looking to know who is really wrong and who is right !
Also interersting to see a 1.33GHZ speed do it in 24 seconds...I did the same test on a Beowulf 3 system node setup total 3 CPU's = 1.5GHZ and still got about a minute and some seconds....What is your OS and what version of gcc did you use ??? ALso how much ram do you have, I don't know if Ram matters in this test or not.

_______________________________________________~
Software is like Sex, its better when its Free!
 
Cool,.. All Intel stuff got same answer so far = 21081851083598.382812. Although Sparc and some AMD's got about 2 points more ????
What was the execution time on that BTW:


_______________________________________________~
Software is like Sex, its better when its Free!
 
Woops, let me run another one here. I didnt slap in the date. BTW I'm using Redhat 7.1. It's not going to be great, there are a few users currently logged in.

21081851083598.382812
Same answer. I'll try it out on my duron when I get home, see if I get something different

3mins 28sec.


Blah, Blah Blahh, Blahh, blahh blah blahh, blah blah.