GET_GRID - error while reading variable: h
in grid netCDF file: CROCO_FILES/croco_grd.nc
MAIN - number of records written into history file(s): 0
number of records written into restart file(s): 0
number of records written into averages file(s): 0
It sounds like you have no bathymetry defined within your croco_grd.nc file. You probably missed a step when building it. The error code -57 can mean that there is an issue with variable dimension too.
check dimensions
ncdump -h CROCO_FILES/croco_grd.nc
check values
ncdump -v "h" CROCO_FILES/croco_grd.nc
Also mynode=2 may suggest that you are using CROCO in parallel. If you defined PARALLEL_FILES cpp key you have to split your files using partit
./partit np_xi np_eta croco_grd.nc
same for any other file required at start like croco_ini.nc
The splitting 1x64 with your grid give really small mpi domain <15 points… I suggest to not use this splitting. The 2x32 is better.
But beside that, it seems your grid file does not match the compiled grid dimensions.
Can you precise which version of CROCO you are using ?
And can you attached your param.h, cppdefs.h and the results of ncdump -h on your grid file please ?
Yes you’re right, 1 X 64 is not the best, I was testing different combinations to see which one was the fastest.
I’m using croco-v2.1.1.
This is because the error log I copied was from another experiment, but the same messages appear with the test 1 x 64 (except that mynode takes value from 0 to 63).
I think the issue comes from the MPI domain decomposition. With 800 grid points split over 64 MPI subdomains, you end up with about 12–13 points per subdomain. In that case, the last MPI domain can go out of bounds: for example, if 13 points are assigned per domain, then 13×63=819, which already exceeds 800 before reaching the last domain.
As far as I know, CROCO does not explicitly check for this situation in its MPI decomposition, so this kind of configuration can lead to indexing errors.
In this case, the safest solution is to use a decomposition that results in larger subdomains — typically at least 20–30 grid points per MPI domain — which avoids these boundary issues and is generally more robust.
you are undef PARALLEL_FILES It’s very good (they have a very critical bug) . but define NC4PAR . its good for mpi job. how many vertical levels you have in. in your system how many cores do you want to use at a time?
Thank you!
Indeed. MPI tiling. (for better mpi you need your region of interest x/y ratio maintain square then decomposition is easy).
check there is an easy grid there you can choose LLm MMm etc (maybe).
and your OMP_NUM_THREADS is 1 or 2?
First try :
export HDF5_USE_FILE_LOCKING=FALSE
(Disabling locking does NOT make parallel I/O safe but try it first)
during compile the lib use --enable-parallel --enable-shared.
then test it all ($ make check all)
then check:
h5pcc -showconfig | grep -i parallel
which compiler did you use for the compiling model?
Thank you.
Thanks for the suggestions, I take note, unfortunately I cannot work anymore on this topic for the moment due to other committments, but I’ll surely try what you indicate and will keep you informed.