If you need assistance, please send an email to forum at 4hv dot org. To ensure your email is not marked as spam, please include the phrase "4hv help" in the subject line. You can also find assistance via IRC, at irc.shadowworld.net, room #hvcomm.
Support 4hv.org!
Donate:
4hv.org is hosted on a dedicated server. Unfortunately, this server costs and we rely on the help of site members to keep 4hv.org running. Please consider donating. We will place your name on the thanks list and you'll be helping to keep 4hv.org alive and free for everyone. Members whose names appear in red bold have donated recently. Green bold denotes those who have recently donated to keep the server carbon neutral.
Special Thanks To:
Aaron Holmes
Aaron Wheeler
Adam Horden
Alan Scrimgeour
Andre
Andrew Haynes
Anonymous000
asabase
Austin Weil
barney
Barry
Bert Hickman
Bill Kukowski
Blitzorn
Brandon Paradelas
Bruce Bowling
BubeeMike
Byong Park
Cesiumsponge
Chris F.
Chris Hooper
Corey Worthington
Derek Woodroffe
Dalus
Dan Strother
Daniel Davis
Daniel Uhrenholt
datasheetarchive
Dave Billington
Dave Marshall
David F.
Dennis Rogers
drelectrix
Dr. John Gudenas
Dr. Spark
E.TexasTesla
eastvoltresearch
Eirik Taylor
Erik Dyakov
Erlend^SE
Finn Hammer
Firebug24k
GalliumMan
Gary Peterson
George Slade
GhostNull
Gordon Mcknight
Graham Armitage
Grant
GreySoul
Henry H
IamSmooth
In memory of Leo Powning
Jacob Cash
James Howells
James Pawson
Jeff Greenfield
Jeff Thomas
Jesse Frost
Jim Mitchell
jlr134
Joe Mastroianni
John Forcina
John Oberg
John Willcutt
Jon Newcomb
klugesmith
Leslie Wright
Lutz Hoffman
Mads Barnkob
Martin King
Mats Karlsson
Matt Gibson
Matthew Guidry
mbd
Michael D'Angelo
Mikkel
mileswaldron
mister_rf
Neil Foster
Nick de Smith
Nick Soroka
nicklenorp
Nik
Norman Stanley
Patrick Coleman
Paul Brodie
Paul Jordan
Paul Montgomery
Ped
Peter Krogen
Peter Terren
PhilGood
Richard Feldman
Robert Bush
Royce Bailey
Scott Fusare
Scott Newman
smiffy
Stella
Steven Busic
Steve Conner
Steve Jones
Steve Ward
Sulaiman
Thomas Coyle
Thomas A. Wallace
Thomas W
Timo
Torch
Ulf Jonsson
vasil
Vaxian
vladi mazzilli
wastehl
Weston
William Kim
William N.
William Stehl
Wesley Venis
The aforementioned have contributed financially to the continuing triumph of 4hv.org. They are deserving of my most heartfelt thanks.
Registered Member #65
Joined: Thu Feb 09 2006, 06:43AM
Location:
Posts: 1155
Not sure why you nested the loops instead of an abstraction for a dynamic programming solution. And, there is still an instantiation like cost when going parallel.
GPUs have a very small amount of memory per computational unit and have big penalties for conditional and branched code. In the case of your loops, optimising depends mostly on what 'stuff' actually is.
It sounds like you are trying to bruteforce a problem instead of solving it. Can you tell us any more?
Registered Member #4266
Joined: Fri Dec 16 2011, 03:15AM
Location:
Posts: 874
I'm not sure how to workout the numbers apart from bruteforce, the below just checks to see if the the combinations when mixed with water can occupier the space
test = atoms[l]+atoms[l1]+atoms[l2]; test = test + H2O if(test == 100000 || test == 200000 || test == 300000) { fprintf(out,"%s%s%s",atomsname[l],atomsname[l1]
,atomsname[l2]); } someother test based on numbers
The code is currently a bit broken and I'm assuming the actual table is more complicated for real atoms. It is important to get the method working first, then optimise the algorithm and lastly optimise the code.
In the case of this algorithm the first two tests fail automatically because they are less than the value for water on it's own. The goal value, 300000 would best be represented by a variable set to 300000-H2O which pushes code out of the inner loop (and out of all of them, but this is where it costs the most).
If the real values for atom[x] are a progressive sequence then the inner loop can be replaced by a binary search tree, which would speed up the code by about ten times. If the real values for atom[x] are not in a progressive sequence, then reorder them. The absolute representation of the atoms is not important to the code.
Registered Member #4266
Joined: Fri Dec 16 2011, 03:15AM
Location:
Posts: 874
Thanks Wastrel I have to run the bruteforce code more than once, I've saved the combinations to hdd, and will load it in ram, what I understood from the binary search tree, split the combinations into 5 files and can select the part to bruteforce with a check.
@Shrad Checked out a blade server 24cores 64gig of ram and 2* 1tb hdd for $340 month,
Registered Member #3215
Joined: Sun Sept 19 2010, 08:42PM
Location:
Posts: 780
yup, that's the kind of machines you would use for pure CPU taskforce
you have to use a unix server distro to take full advantage of it through some paralleling libraries
if you have multiple less-capable scavenged servers you also have the opportunity to cluster them, there are specialized distros but that's another story
Registered Member #3215
Joined: Sun Sept 19 2010, 08:42PM
Location:
Posts: 780
it occurs only with flash memory.. as it has a limited read/write count before a memory cell is dead, if you use some small files which are updated really fast in permanent use, you'll eat the cells pretty fast..
the same will occur with mechanical devices but it will be from mechanical use/abuse
the solution is to create a small ramdisk (something like 4Gb) and make all your file access from there, so you also gain in speed (by a factor of 100 sometimes)
This site is powered by e107, which is released under the GNU GPL License. All work on this site, except where otherwise noted, is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. By submitting any information to this site, you agree that anything submitted will be so licensed. Please read our Disclaimer and Policies page for information on your rights and responsibilities regarding this site.