Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Same Python model and input, but different output on Derecho and local computer

Haini Wang

Haini Wang
New Member
I am running a moisture tracing model written in Python, on Derecho and my local computer, respectively. When using exactly the same codes and input data, I got slightly different results (which I'd expect to be the same, bit to bit). The differences are small, O(10−16), and only for a small portion of the output (0.46%).

On both computers, I used the same Conda environment (I created), Python version (3.11.11), libraries (netCDF4 1.7.2, numpy 2.2.2, scipy 1.15.1, xarray 2025.1.2) and float precision (float 64). I also set the number of threads for OpenMP, MKL, OpenBLAS, Veclib, and NumExpr to 1 in both the Python code and runtime environment (even though these libraries were not explicitly invoked during computation).

Could someone explain what caused the different results?

My model on Derecho is located at /glade/derecho/scratch/hainiwang/era5_test/output_1layer/ Modified_1_step2_DRM1d_ERA5_1.py

And the PBS Job shell is located at /glade/derecho/scratch/hainiwang/era5_test/output_1layer/DRM_1layer_1.sh
 
Top