Your optimism is infectious.drmike wrote:Confusion is the first step in learning, so this is good!

OK, thanks!drmike wrote:I'll do the md5sum this evening - I bet they match.
I prefer beer and scotch to masochismMSimon wrote:The reason it is so hard for most people to learn new stuff is that they hate to be confused. It is rather embarrassing. Some one asks you a question and your answer is not even wrong. Or it is 180 out.
The delicious part comes after much suffering and it all starts to fit.
To make all this work a touch of masochism doesn't hurt. Maybe like a couple of barrels full.
OK, they don't match???dch24 wrote:drmike, I think I understand now what my error means, "gsl: qag.c:261: ERROR: could not integrate function". I don't think it's a bug in your code. The error basically means the integration didn't converge -- it diverged.
So I need to be sure the input data is OK. I'm doing MAXSTEPS=100, and I want to verify that my potential.dat is correct. Can you check that the output below is what you get, too?Code: Select all
localhost $ md5sum potential.dat e234099bd4142c01d4da056389781573 potential.dat localhost $ ls -l potential.dat -rw-r--r-- 1 dch24 dch24 1414808 Jan 29 22:38 potential.dat
Code: Select all
drmike@truth:/sata0/fusion> md5sum potential.dat
5fbf5e66b0a21fbdbd573f118e94384b potential.dat
Code: Select all
cat /usr/local/include/gsl/gsl_version.h
Code: Select all
#define GSL_VERSION "1.4"
Code: Select all
err = 0.000000
ring = 806686282371712224890919312937202483459490826810337205558242705408.000000
Well, I haven't finished my first keg of it, yet.MSimon wrote:The reason it is so hard for most people to learn new stuff is that they hate to be confused. It is rather embarrassing. Some one asks you a question and your answer is not even wrong. Or it is 180 out.
The delicious part comes after much suffering and it all starts to fit.
To make all this work a touch of masochism doesn't hurt. Maybe like a couple of barrels full.
Code: Select all
localhost $ ls -l potential.dat
-rw-r--r-- 1 dch24 dch24 1414808 Jan 30 23:21 potential.dat
localhost $ md5sum potential.dat
e234099bd4142c01d4da056389781573 potential.dat
Oh yeah. I'm laughing out loud and my buddies are looking at me like I'm crazy.drmike wrote:I have to admit this is fun though!
Code: Select all
gcc -o potential -g potential.c -I/usr/src/patches/polywell/gsl-1.4inst/include -L/usr/src/patches/polywell/gsl-1.4inst/lib -lm -lgsl
Code: Select all
e234099bd4142c01d4da056389781573 potential.dat
Code: Select all
0206f2f489a5133a711b11db81c1b2d3 potential.dat
Code: Select all
localhost:~/Desktop/polywell dch24$ md5sum potential*.dat
dea85412261a327fe514ef0a7894498d potential100.dat
4161ffaeb8d2f98c0dc2626d91cdb85c potential400.dat
Code: Select all
localhost $ gcc -o potential -m32 -g -I/usr/src/patches/polywell/gsl-1.9inst/include potential.c -L/usr/src/patches/polywell/gsl-1.9inst/lib -lm -lgsl
localhost $ ./potential
...
(add suffixes to potential.dat files)
...
localhost $ md5sum potential*.dat
e234099bd4142c01d4da056389781573 potential100.dat
fc4c7fe045161a6937e753c540eb236e potential100_m32.dat
0206f2f489a5133a711b11db81c1b2d3 potential400.dat
a91c0e27acc73ed4b7caf097b0b5abba potential400_m32.dat
Uh, wouldn't it be wise to put in some kind of break point so you could check while the calculation is in progress?drmike wrote:Nice work dch24! I bet a single bit difference is all it takes, and with floating point that is very easy at the least significant bits between different hardware. I've got an AMD64 not a PPC, but the floating point units are probably totally different. When it rounds probably matters.
After 8 hours I'm only to step 46 out of 100. I don't think it will finish before I get back to it at the end of the day, but I'll let it run just to see.
Hopefully the result won't be all zeros this time....
:)
If you read the current wars fueled by the proposed IEEE-754r spec, one of them is all about how underflows and certain exceptions are trapped. My suspicion is that the standard is being followed, but one of the nuances may be that underflow handling has different defaults between the two compilers.dch24 wrote:It may be that MacOS handles floating point differently, based on the fact that gsl-1.9 actively selects between i386-linux-gcc and i386-darwin-gcc. But currently I'm going on the opinion the selection is necessary to find the right IEEE 754 headers. The floating-point standard is standard, I hope.
I need to track down exactly what the difference is between 32-bit and 64-bit code. I think the first thing is to generate 32-bit code on Linux (gcc -m32) and see what comes out.
Of course, their prices are a bit steep at $995 per seat for research. Industrial user licenses cost about twice that at $1995 per seat.OOPIC Pro simulates physical systems, including:
* Plasmas
* Beams of charged particles with selfconsistent and externally generated electric and magnetic fields
* Low-to-moderate density neutral gasses
* Wide variety of boundary conditions
OOPIC Pro has electrostatic and electromagnetic field solvers for 2D geometries in both x-y (slab) and r-z (cylindrical) coordinates, and includes Monte Carlo collision and ionization models.