You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in cmor.c line 1683 a test for write permissions is being performed by creating a temporary file in the outpath. However this filename is not unique.
We are using CMOR in parallel for several variables.
Sometimes it occures that CMOR wants to create this test-file for more than one process at the same time and exists, falsely raising this missing write permissions error.
I suggest to add the process_id to the filename of this temporary file or to make it unique in any other possible way to prevent that from happening.
Kind regards,
Martin
The text was updated successfully, but these errors were encountered:
ierr = mkdir(cmor_current_dataset.outpath, S_IRWXU | S_IRGRP | S_IXGRP |
S_IROTH | S_IXOTH);
if (ierr != 0) {
sprintf(msg,
"CMOR was unable to create this directory %s\n! "
"You do not have write permissions!",
cmor_current_dataset.outpath);
If you run CMOR parallel for the same CMOR variable, e.g. for different times, two processes try to create the same directory and one will give an error. Of course, the user could create the root directory for the output which is not a big deal. However, it might be no reason for CMOR to exit. Maybe a test for errno EEXIST of mkdir if (ierr != 0 && ierr != EEXIST ) {
will solve it.
Hello,
cmor/Src/cmor.c
Line 1683 in 7aee13f
in cmor.c line 1683 a test for write permissions is being performed by creating a temporary file in the outpath. However this filename is not unique.
We are using CMOR in parallel for several variables.
Sometimes it occures that CMOR wants to create this test-file for more than one process at the same time and exists, falsely raising this missing write permissions error.
I suggest to add the process_id to the filename of this temporary file or to make it unique in any other possible way to prevent that from happening.
Kind regards,
Martin
The text was updated successfully, but these errors were encountered: