logoalt Hacker News

noobermin11/07/20242 repliesview on HN

Here we go with the CS people saying "the old fortran codes are terrible." Yeah, the "high error" between code predictions and laser shots is because LPI is inherently noisy and it's essentially impossible to fully control conditions. I would work on expensive sims for days to weeks and the experiments would see differences that would be off from that from an order or mag because their focal point is off by a micron. There's nothing wrong with the "old Fortran codes," they have the right physics, the problem is the initial conditions are just uncontrollable so that's why simulating these systems is hard.

Codes are not magic, they are physical codes, as in, they generally encode the physics as we understand it relevant to the experiment, so you might as well say our physical models are wrong, which is a much harder bar to clear, you'd have to invalid probably near 100 years of plasma physics. The problem likely is as I said, the experiments are just hard to control and we don't know the correct inputs. It's not like weather forecasting where we can have a weather balloons across the world, we're not able to probe every micron of the target at all times for a plasma temperature and density.


Replies

chriskanan11/09/2024

Based on what the physicists have told me, the main issue with the Fortran code is that it is SLOW and hard to accelerate. Because the codebase is 30+ years old, much it sounds like it isn't well understood. They think it would benefit a lot from things like GPU acceleration, but that's hard to do with it in its current state.

Otherwise, the major issue is just that it makes a lot of assumptions and has a lot of inaccuracies, but that issue isn't due to Fortran but just because it doesn't capture all of the physics and there is a sim2real gap. So it DOES NOT have the right physics, but re-writing it probably wouldn't result in the "right" physics either.

The main version of the code they run uses 1-D physics (so one spatial dimension), which takes about 8 minutes to run on a modern CPU. The code can't be parallelized without being re-written. Running the 3D version of the code takes 1+ weeks for a single run, and that still has a big sim2real gap.

phreeza11/08/2024

I understood the comment as saying the fortran code maybe used some sort of inefficient numerical scheme and/or some inaccurate approximations? Doesn't seem completely outlandish that more modern methods could help there? Of course fortran is not a problem in itself, you are right.

show 1 reply