Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Movie : -JG +w option #6398

Open
gd-a opened this issue Feb 28, 2022 · 6 comments
Open

Movie : -JG +w option #6398

gd-a opened this issue Feb 28, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@gd-a
Copy link
Contributor

gd-a commented Feb 28, 2022

Hi,

I'm wrapping up the sea-ice concentration movie for @Esteban82 and I sometimes got an error.
The script can't find a file (absolute path given)

projection="-JG0/0/10c+w25"
gmt grdimage ${DIR_wrk}/inset_illu.nc -Cinset_illu.cpt -t25 $projection -Rg
grdmath (gmtapi_export_grid): Could not find file [ <absolute_path> /inset_illu.nc]
[Session gmt (0)]: Error returned from GMT API: GMT_GRID_WRITE_ERROR (19)

But sometimes it works.

@gd-a gd-a added the bug Something isn't working label Feb 28, 2022
@PaulWessel
Copy link
Member

That is pretty hard to debug or understand. Is it possible that the file actually is not there (yet) or have been removed when this script actually is looking? Or that the directory does not exist (yet)? The system library routines do not lie and if it says it cannot create that file it is usually right.

@gd-a
Copy link
Contributor Author

gd-a commented Mar 30, 2022

Is it possible that the file actually is not there (yet)

In this specific case, inset_illu.cpt is created beforehand and stored in the working directory (during pre.sh).
It is odd that several frames can access it while some other not.

Are modules allowed to access the same file at the same time?

@gd-a
Copy link
Contributor Author

gd-a commented Apr 8, 2022

So .. it appears that inset_illu.nc is created in include.sh (-I in movie) using grdmath.

I moved the line at fault in pre.sh (-Sb in movie) and the problem is resolved.

Confusingly enough :

  1. Despite specifying the absolute path, gmt_api can't access the file (sometimes), so it just skip the plot layer.
  2. I create and use another file (txt) the same way (using math in include.sh) and this one as no problem whatsoever.

Is it a bug ? A feature ? A mystery ?

The script is still running but after several frames, still no error.

@PaulWessel
Copy link
Member

The problem is this:

${DIR_wrk}/inset_illu.nc

DIR_wrk is not a unique file name. Remember you are running lots of jobs simultaneously and they all want to create that file. This means stepping on toes and sometimes there will be no file. I suggest you use one of the MOVIE_* variables when you create a file only to be used by one frame.

@gd-a
Copy link
Contributor Author

gd-a commented Apr 8, 2022

DIR_wrk is not a unique file name

Isn't it though ? It used to be created in -Sb (now in -I) ... these steps are not parallelized right ?

@gd-a
Copy link
Contributor Author

gd-a commented Apr 8, 2022

@PaulWessel : You can see how it makes the animation glitch (lower right corner : https://youtu.be/Uh9YyFryXD4 )

@gd-a gd-a closed this as not planned Won't fix, can't repro, duplicate, stale Feb 26, 2024
@gd-a gd-a reopened this Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants