Jump to content
TUFLOW Forum
ndeeks

Log file write error

Recommended Posts

Hi, despite setting a custom log file path in my DCF file (found buy TULFOW), TUFLOW tries to write to "C:\ProgramData\TUFLOW\log\_ All TUFLOW Simulations.log", which returns an error "forrtl: severe (47): write to READONLY file, unit 905, file C:\ProgramData\TUFLOW\log\_ All TUFLOW Simulations.log", and the simulation fails.. This applies to 2020-01-AA-iSP/DP. Can the coding be changed not to write to C:\ ?

Share this post


Link to post
Share on other sites

Hi ndeeks,

The default location of this file changed for the 2020 release of TUFLOW.  For the 2018 version of TUFLOW, this was being written to "C:\BMT_WBM\log\", however, not all users have write access to create files / folders in the root C:\.  The default location was set to C:\ProgramData\TUFLOW\ to avoid this type of issue!

The 2020 version of TUFLOW should do a check on the write permissions for this file and if the file does not have write permissions, outputting to this should be skipped.  A message "CHECK 0623 - No write permission for: <filepath and name>. Skipping." should be output to the screen and .tlf in this instance. However, based on the above this is not occurring and the above error is created.  If you right click on the file in Windows Explorer and select properties, in the security tab you should be able to see the permissions for the file.

The location of this file can also be user defined.  If you add "Simulations Log Folder == <path>" into the .tcf this will set the location.  For example "Simulations Log Folder == C:\" could be used to write to the root directory (I probably wouldn't suggest this).  You can also disable the writing of the "_ All TUFLOW Simulations.log" file by setting the path to "Do Not Use", e.g. "Simulations Log Folder == Do Not Use".

Please get back to us if you continue to have issues with this.

Regards

Phil

 

Share this post


Link to post
Share on other sites

After updating to TUFLOW 2020, we’ve been having issues with running our models because of the change in save location of the All TUFLOW Simulation.log, similarly to the issue outlined in this forum post.

 

We run our models on remote machines, with several users running on the same machine from different logins. It appears that the first user to run a simulation in the latest TUFLOW 2020 version is the “creator” of the C:\ProgramData\TUFLOW\log\_ All TUFLOW Simulations.log file and root folders and these become locked to that user, leading to the aforementioned issue for subsequent users.

 

At the moment we have been using the Simulations Log Folder == command to set a location for the log file or prevent it being written but are looking for a long term solution. Is there any possibility to revert to the previous 2018 default or is there a way to prevent the folder from being locked by the first user?

Share this post


Link to post
Share on other sites

HI groganm and ndeeks,

Yes, we are looking at a better fix for this issue.  groganm are you receiving CHECK 0623, or is this stopping your simulations?

We are looking at changing the file permissions when this file is created, however, on Windows this may not be possible (with Fortran).  Reverting to the previous default of "C:\BMT_WBM\Log" is not preferred as creating this folder causes folder permissions for some users (which is why we changed!).  If it is not possible to set the file permissions when creating the file, the next option will likely be for each user to have a folder underneath the C:\ProgramData\TUFLOW\log\ directory. E.g.

  • C:\ProgramData\TUFLOW\log\groganm\
  • C:\ProgramData\TUFLOW\log\ndeeks\
  • C:\ProgramData\TUFLOW\log\par\

This should avoid any permissions issues.  Any thoughts / issues?

A couple of notes:

  1.  The location "C:\ProgramData\" is not hard coded, TUFLOW uses the environment variable PROGRAMDATA. So if this has been configured differently it will use the correct path.
  2. As well as setting the Simulations Log Folder == using a command in the .tcf, this can also be set using the same command in a “TUFLOW_licence_settings.lcf” file in the same location as the TUFLOW executable.  Refer to Section 11.5.1 of the TUFLOW manual for more details.

Cheers

Phil

Share this post


Link to post
Share on other sites

Hi Phil,

Thanks for that we will have to look into the various commands, but the TUFLOW_licence_settings.lcf looks promising. We are not getting any error or check messages, the TUFLOW log file just has this as the last line: Trying to open (A) file C:\ProgramData\TUFLOW\log\_ All TUFLOW Simulations.log...OK.  File Unit: 905. and then it terminates.

Share this post


Link to post
Share on other sites

Ok thanks.  I'm implementing the approach mentioned in my previous post.  If possible can I send you a beta version over to test that it works on your system?  If you are happy to beta test can you please send me an email at support@tuflow.com.

After testing we'll aim to get a 2020-01-AB update released.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...