Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming

Reply
 
LinkBack Thread Tools
Old 03-12-08   #101 (permalink)
Custom User Title
 
pauldovi's Avatar
 
intel ati

Join Date: Jul 2005
Location: Daytona Beach, Florida
Posts: 13,341
Blog Entries: 4

Rep: 901 pauldovi is becoming famouspauldovi is becoming famouspauldovi is becoming famouspauldovi is becoming famouspauldovi is becoming famouspauldovi is becoming famouspauldovi is becoming famouspauldovi is becoming famous
Unique Rep: 495
FAQs Submitted: 4
Hardware Reviews: 2
Trader Rating: 36
Default

Quote:
Originally Posted by Licht View Post
Code:
            if (button3.Text == "Stress Components")
            {
                Thread[] threads = new Thread[Environment.ProcessorCount];
                for (int i = 0; i < Environment.ProcessorCount; i++)
                {
                    threads[i] = new Thread(StressTestCPU);
                    threads[i].Start();
                }
                button3.Text = "Cancel";
            }
            else
            {
                for (int i = 0; i < Environment.ProcessorCount; i++)
                {
                    threads[i].Abort(); // Error here
                }
                button3.Text = "Stress Components";
            }
Is there anyways to get around the error "threads does not exist in the current context." error? I know when the program is actually executing it WILL exist however the compiler keeps throwing the error anyways. Quite annoying.

Also someone please explain how to generate a random number.
If that is C, then you need to include math.h in your libraries, set the random seed with the following code:

Code:
#include <stdlib.h>
#include <stdio.h>
#include <math.h>

int main(void)
{
     srand((unsigned int) time(0)); // sets the seed

     // random integer 0 -> n

     x = rand()% (n+1); 

     // random double between a and b

     y = ((double)rand()/RAND_MAX)*(b-a) +a; 
}
__________________
Intel Overclocking Guide * Need A New Password? * Dual Core Folding Guide * Intel Memory Guide * Use Vista's UAC * Don't Post News From Fudzilla!
"Rightful liberty is unobstructed action according to our will within limits drawn around us by the equal rights of others." - Thomas Jefferson
"If everyone is thinking alike, then somebody isn't thinking."
- General George Patton
"Make everything as simple as possible, but not simpler" -Albert Einstein

System: System
CPU
Q6600
Motherboard
Gigabyte GA-EP45T-DS3R
Memory
4GB DDR3-1600 CL7
Graphics Card
VisionTek 4870
Hard Drive
2 x 7200.10 RAID0 + 160GB
Sound Card
Onboard
Power Supply
Silverstone OP650
Case
Custom Stacker
CPU cooling
Stinger V6
GPU cooling
MCW60
OS
Vista Ultimate 64 bit
Monitor
Dual 20.1" Sceptre
pauldovi is offline Overclocked Account   Reply With Quote
Old 03-13-08   #102 (permalink)
The Project Keeper
 
Licht's Avatar
 
amd ati

Join Date: Mar 2007
Location: Bel Air
Posts: 9,406
Blog Entries: 3

Rep: 277 Licht is a proven memberLicht is a proven memberLicht is a proven member
Unique Rep: 184
Folding Team Rank: 875
Trader Rating: 0
Default

Quote:
Originally Posted by pauldovi View Post
If that is C, then you need to include math.h in your libraries, set the random seed with the following code:

Code:
#include <stdlib.h>
#include <stdio.h>
#include <math.h>

int main(void)
{
     srand((unsigned int) time(0)); // sets the seed

     // random integer 0 -> n

     x = rand()% (n+1); 

     // random double between a and b

     y = ((double)rand()/RAND_MAX)*(b-a) +a; 
}
This is C#, the child of C++ and Java basically. I'll include that just in case. Any idea on the first issue? I solved my random number issue with this.

Code:
        private int RandomNumber(int min, int max)
        {
            Random random = new Random();
            return random.Next(min, max);
        }

System: (AMD-AMD-ATI)-(CPU-Chip-GPU)
CPU
AMD Athlon X2 5200+
Motherboard
Gigabyte 790X AM2+
Memory
6GB Kingston DDR2 667MHZ
Graphics Card
Saphire HD 3870
Hard Drive
[RAID0] [2X] WD 160GB 7,200RPM
Sound Card
X-Fi Extreme Gamer Fatality Professional
Power Supply
OCZ Game-X-Stream 700w
Case
NZXT Black Steel
CPU cooling
Stock Heatskin & Fan
GPU cooling
Stock Saphire 3870 Cooling
OS
Windows Vista Home Premium x64 SP1
Monitor
Samsung SyncMaster 19" Widescreen
Licht is offline I fold for Overclock.net Overclocked Account Licht's Gallery   Reply With Quote
Old 03-13-08   #103 (permalink)
WaterCooler
 
killnine's Avatar
 
intel ati

Join Date: Aug 2005
Posts: 2,672

Rep: 137 killnine is acknowledged by manykillnine is acknowledged by many
Unique Rep: 122
FAQs Submitted: 1
Trader Rating: 8
Default

Could you export as VS2005? Not all of us can purchase (O.o) the newest versions of software. =)

System: Teh System
CPU
Q6600@ 3.2Ghz (9x355)
Motherboard
Asus P5W-DH
Memory
Crucial Ballistix (4x1024)
Graphics Card
VisionTek 4870
Hard Drive
Seagate 7200rpm (160)
Sound Card
X-fi Fatal1ty Pro
Power Supply
Silverstone Strider 750W
Case
P180B
CPU cooling
OCZ Vendetta 2
GPU cooling
HR-03 GT
OS
XP Professional
Monitor
Dell 2001FP 20.1&quot;
killnine is offline   Reply With Quote
Old 03-13-08   #104 (permalink)
The Project Keeper
 
Licht's Avatar
 
amd ati

Join Date: Mar 2007
Location: Bel Air
Posts: 9,406
Blog Entries: 3

Rep: 277 Licht is a proven memberLicht is a proven memberLicht is a proven member
Unique Rep: 184
Folding Team Rank: 875
Trader Rating: 0
Default

Quote:
Originally Posted by killnine View Post
Could you export as VS2005? Not all of us can purchase (O.o) the newest versions of software. =)
Visual Studio 2008 Express Edition is totally and completely free to download. Also build 2 is so wildly different from build 3 you may or may not want to bother with it. I'm finishing up build 3 (few things i want to take care of before release.)

http://msdn2.microsoft.com/en-us/exp.../bb421473.aspx

System: (AMD-AMD-ATI)-(CPU-Chip-GPU)
CPU
AMD Athlon X2 5200+
Motherboard
Gigabyte 790X AM2+
Memory
6GB Kingston DDR2 667MHZ
Graphics Card
Saphire HD 3870
Hard Drive
[RAID0] [2X] WD 160GB 7,200RPM
Sound Card
X-Fi Extreme Gamer Fatality Professional
Power Supply
OCZ Game-X-Stream 700w
Case
NZXT Black Steel
CPU cooling
Stock Heatskin & Fan
GPU cooling
Stock Saphire 3870 Cooling
OS
Windows Vista Home Premium x64 SP1
Monitor
Samsung SyncMaster 19" Widescreen

Last edited by Licht : 03-13-08 at 08:16 PM.
Licht is offline I fold for Overclock.net Overclocked Account Licht's Gallery   Reply With Quote
Old 03-14-08   #105 (permalink)
Intel Overclocker
 
SgtSpike's Avatar
 
intel nvidia

Join Date: Jan 2007
Location: Springfield, Oregon
Posts: 2,778

Rep: 229 SgtSpike is acknowledged by manySgtSpike is acknowledged by manySgtSpike is acknowledged by many
Unique Rep: 184
Trader Rating: 4
Default

Quote:
Originally Posted by killnine View Post
Could you export as VS2005? Not all of us can purchase (O.o) the newest versions of software. =)
Haha, yeah I'm still running 2003... o.O

System: Must...Go...Faster...
CPU
E6300 @ 3.74ghz - 1.44v
Motherboard
Gigabyte P35-DS3L @ 535FSB, +.3v MCH/FSB
Memory
2x1GB G'Skill 800mhz @ 1070mhz - 2.2v
Graphics Card
EVGA 8800GT 512MB
Hard Drive
2x 250GB WDC 7200rpm, OC'd to 8100rpm
Sound Card
X-Fi Xtreme Gamer (2.1 CA with 12" 500w sub)
Power Supply
500w XClio Goodpower
Case
Custom
CPU cooling
Sycthe Mini-Ninja
GPU cooling
VF-900
OS
Windows Vista Home Premium
Monitor
19" Widescreen HannsG
SgtSpike is offline   Reply With Quote
Old 03-14-08   #106 (permalink)
The Project Keeper
 
Licht's Avatar
 
amd ati

Join Date: Mar 2007
Location: Bel Air
Posts: 9,406
Blog Entries: 3

Rep: 277 Licht is a proven memberLicht is a proven memberLicht is a proven member
Unique Rep: 184
Folding Team Rank: 875
Trader Rating: 0
Default

Quote:
Originally Posted by SgtSpike View Post
Haha, yeah I'm still running 2003... o.O
I think it would be wise you click the link i provided.

Also at the moment im repairing my PC. Finally found my issues were within the BIOS settings which were optimized defaults from a overclock failure. I had never imagined that it would have set them to a way that would damage my system. (Floppy drive was enabled and trying to boot from as well as SATA settings being incorrect, system couldn't properly access the RAID0 array correctly somehow.)

----

Little over 100 posts, little under 2000 views.

Also i want to tell people im very sick at the moment, forgive my slowness.

System: (AMD-AMD-ATI)-(CPU-Chip-GPU)
CPU
AMD Athlon X2 5200+
Motherboard
Gigabyte 790X AM2+
Memory
6GB Kingston DDR2 667MHZ
Graphics Card
Saphire HD 3870
Hard Drive
[RAID0] [2X] WD 160GB 7,200RPM
Sound Card
X-Fi Extreme Gamer Fatality Professional
Power Supply
OCZ Game-X-Stream 700w
Case
NZXT Black Steel
CPU cooling
Stock Heatskin & Fan
GPU cooling
Stock Saphire 3870 Cooling
OS
Windows Vista Home Premium x64 SP1
Monitor
Samsung SyncMaster 19" Widescreen

Last edited by Licht : 03-14-08 at 08:45 PM.
Licht is offline I fold for Overclock.net Overclocked Account Licht's Gallery   Reply With Quote
Old 03-16-08   #107 (permalink)
WaterCooler
 
killnine's Avatar
 
intel ati

Join Date: Aug 2005
Posts: 2,672

Rep: 137 killnine is acknowledged by manykillnine is acknowledged by many
Unique Rep: 122
FAQs Submitted: 1
Trader Rating: 8
Default

Quote:
Originally Posted by Licht View Post
Visual Studio 2008 Express Edition is totally and completely free to download. Also build 2 is so wildly different from build 3 you may or may not want to bother with it. I'm finishing up build 3 (few things i want to take care of before release.)

http://msdn2.microsoft.com/en-us/exp.../bb421473.aspx
Dont be upset when I say this, but there isn't a chance in hell that I would download VS 2008 express and use it over Visual Studio Pro 2005 just to develop some features for your benchmark. lol.


I was thinking about maybe working on a gpu component to this application using the XNA package MS released a little while ago.

System: Teh System
CPU
Q6600@ 3.2Ghz (9x355)
Motherboard
Asus P5W-DH
Memory
Crucial Ballistix (4x1024)
Graphics Card
VisionTek 4870
Hard Drive
Seagate 7200rpm (160)
Sound Card
X-fi Fatal1ty Pro
Power Supply
Silverstone Strider 750W
Case
P180B
CPU cooling
OCZ Vendetta 2
GPU cooling
HR-03 GT
OS
XP Professional
Monitor
Dell 2001FP 20.1&quot;
killnine is offline   Reply With Quote
Old 03-16-08   #108 (permalink)
The Project Keeper
 
Licht's Avatar
 
amd ati

Join Date: Mar 2007
Location: Bel Air
Posts: 9,406
Blog Entries: 3

Rep: 277 Licht is a proven memberLicht is a proven memberLicht is a proven member
Unique Rep: 184
Folding Team Rank: 875
Trader Rating: 0
Default

Quote:
Originally Posted by killnine View Post
Dont be upset when I say this, but there isn't a chance in hell that I would download VS 2008 express and use it over Visual Studio Pro 2005 just to develop some features for your benchmark. lol.


I was thinking about maybe working on a gpu component to this application using the XNA package MS released a little while ago.
I never asked you to, the source is just there for people who are interested in looking over the code. I myself will only make official releases containing code i developed (although sometimes with help) and not extensions others made.

Way ahead of you.
<<< Has experience in 3D graphics design and implementation.

System: (AMD-AMD-ATI)-(CPU-Chip-GPU)
CPU
AMD Athlon X2 5200+
Motherboard
Gigabyte 790X AM2+
Memory
6GB Kingston DDR2 667MHZ
Graphics Card
Saphire HD 3870
Hard Drive
[RAID0] [2X] WD 160GB 7,200RPM
Sound Card
X-Fi Extreme Gamer Fatality Professional
Power Supply
OCZ Game-X-Stream 700w
Case
NZXT Black Steel
CPU cooling
Stock Heatskin & Fan
GPU cooling
Stock Saphire 3870 Cooling
OS
Windows Vista Home Premium x64 SP1
Monitor
Samsung SyncMaster 19" Widescreen
Licht is offline I fold for Overclock.net Overclocked Account Licht's Gallery   Reply With Quote
Old 03-16-08   #109 (permalink)
Programmer
 
JoBlo69's Avatar
 
intel nvidia

Join Date: Jan 2007
Posts: 3,363

Rep: 170 JoBlo69 is acknowledged by manyJoBlo69 is acknowledged by many
Unique Rep: 146
Trader Rating: 16
Default

I'd like to see the code you have up till now...

Kinda curious on how far along you with build3.
__________________
My Lego case thread. With PICS!!!
-----------------------------------------------------------------------
Video card RMA database thread. I am working on an application that allows users to input their cards issues into a database, to build a knowledge base for what types of cards have a lower fail rate.

System: The "hold-me-over-until-i-can-get-a-i7" PC
CPU
E7200
Motherboard
Gigabyte GA-EP45-DS3L
Memory
Nothing!!! (new ram pending)
Graphics Card
8800GT
Hard Drive
2 x 74gb raptor raid0
Case
craptastic!!!
OS
64x vista ult.
Monitor
24" samsung
JoBlo69 is offline JoBlo69's Gallery   Reply With Quote
Old 03-16-08   #110 (permalink)
The Project Keeper
 
Licht's Avatar
 
amd ati

Join Date: Mar 2007
Location: Bel Air
Posts: 9,406
Blog Entries: 3

Rep: 277 Licht is a proven memberLicht is a proven memberLicht is a proven member
Unique Rep: 184
Folding Team Rank: 875
Trader Rating: 0
Default

Quote:
Originally Posted by JoBlo69 View Post
I'd like to see the code you have up till now...

Kinda curious on how far along you with build3.
As i had mentioned earlier (i think) i became very ill recently. I spent almost this entire week sleeping. I will edit in some snippets shortly of what bit i did get done before that though, but first Visual Studio will need to finish downloading. (PC crashed while i was sick, just got it running again yesterday.)

------

Got an old code from thepope, much much work lost sadly. I'll see if theres anything worth posting.

------

Completely outdated work, nothing worth posting. I lost the stress test which was done, i lost my highly revised algorithm for prime numerization. I lost almost everything, even GUI work for the stress test. Sorry to disappoint you.

System: (AMD-AMD-ATI)-(CPU-Chip-GPU)
CPU
AMD Athlon X2 5200+
Motherboard
Gigabyte 790X AM2+
Memory
6GB Kingston DDR2 667MHZ
Graphics Card
Saphire HD 3870
Hard Drive
[RAID0] [2X] WD 160GB 7,200RPM
Sound Card
X-Fi Extreme Gamer Fatality Professional
Power Supply
OCZ Game-X-Stream 700w
Case
NZXT Black Steel
CPU cooling
Stock Heatskin & Fan
GPU cooling
Stock Saphire 3870 Cooling
OS
Windows Vista Home Premium x64 SP1
Monitor
Samsung SyncMaster 19" Widescreen

Last edited by Licht : 03-16-08 at 11:54 PM.
Licht is offline I fold for Overclock.net Overclocked Account Licht's Gallery   Reply With Quote
Reply

Tags
benchmark, doublemark, doublemark topic, multi-thread, stress test



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools



All times are GMT -4. The time now is 07:41 AM.


Overclock.net is a Carbon Neutral Site Creative Commons License Internet Security By ControlScan

Terms of Service / Forum Rules | Privacy Policy | Advertising | Become an Official Vendor