Chronology Current Month Current Thread Current Date
[Year List] [Month List (current year)] [Date Index] [Thread Index] [Thread Prev] [Thread Next] [Date Prev] [Date Next]

Re: [Phys-L] physics applets running on the graphics card



GPU's have been used for several years to mine bitcoins....no, I haven't found any.

-----Original Message-----
From: Phys-l [mailto:phys-l-bounces@phys-l.org] On Behalf Of John Denker
Sent: Tuesday, March 18, 2014 5:31 PM
To: Phys-L@Phys-L.org
Subject: [Phys-L] physics applets running on the graphics card

On 03/10/2013 10:02 AM, Daniel V. Schroeder asked about:

educational physics "applets" written in HTML5/JavaScript?

Yesterday, in the context of grade school through high
school, I said:

Do not get sucked
into using low-level languages like javascript. That is
not a good use of anybody's time.

If you learn a structured language first, you can then use
a low-level language safely, because you will self-impose
some discipline and structure. The converse does not work.

I stick by that answer.

====================

However, I would now like to address a different question
that leads to a different answer, maybe.

The following is not suitable for high-school students. It
is for mad scientists only. Suppose you are crazy enough,
and suppose you want really high performance -- hundreds of
gigaflops -- running on your desktop, and portable to
somebody else's desktop as well. Then you can run physics
programs on the graphics card!

A particularly physicsy example calculates the probability
density for the hydrogenic wavefunctions. I recommend
everybody should take a look at the following:
http://www.ibiblio.org/e-notes/webgl/chem/vb/ao_p_col.html

Note that the Schrödinger solution is calculated not by
javascript code, but rather by a gnarly shader program
that runs in the GPU.

I suspect we will be seeing more of this sort of
thing in the future. Note that cryptologists have
been running codebreaking code in GPUs for a long
time. It's a cheap way of getting lots of parallel
processing power.

The language (OpenGL) is reasonably portable.

I think the atomic example and numerous others come from
Evgeny Demidov
http://www.ipm.sci-nnov.ru/~Demidov/
and I think the code is in the public domain.

The author obviously knows a lot about physics, and the
code is in some ways clever ... but IMHO in other ways it
is off-scale terrible code that should never be shown to
students. In particular, there are no comments and no
documentation of any kind AFAICT. The code contains some
tricky optimizations that you can figure out if you do
enough reverse engineering, but that's not how things are
supposed to work. Open code is supposed to be open in the
practical sense, not just in the legal sense. That is,
it should be possible to understand, test, maintain, and
extend the code without having to reverse-engineer it.

Maybe someday some more pedagogical examples of this
sort of thing will turn up.

See also
http://www.av8n.com/computer/htm/good-software.htm

_______________________________________________
Forum for Physics Educators
Phys-l@phys-l.org
http://www.phys-l.org/mailman/listinfo/phys-l