-
Notifications
You must be signed in to change notification settings - Fork 335
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
Long filepaths for ElmerSolver input #413
Comments
Maybe one could use |
I guess this was addressed and can be closed? |
Is this relevant to the error when user uses very long path names?
|
I confirm that the 128 character path restriction still holds. Would it be possible to increase this or use |
I confirm that the 128 character path restriction still holds. Would it be possible to increase this or use MAX_STRING_LEN for paths also?
My take is that we can safely increase the number. What might be the appropriate length to cover all usages ?
|
I think 512 would be enough for most realistic purposes. Though, in optimal scenario of course any linux paths could be supported, which I guess is usually 4096 characters (value of |
added a separate MAX_PATH_LEN variable (4096), and tried to use it in relevant places. don't know whether I did
cover all places, so any testing appreciated ...
|
Thanks! I think we are missing the relevant variables in at least in ElmerSolver.F90. ModelName seems to be the variable holding the path to the sif file. Maybe also OutputDirectory, MeshDir, MeshName would need the path limit Taking a quick look at the code it is maybe not very straightforward task to find all relevant variable declarations where MAX_PATH_LEN should be used. For example one could define output files inside specific solvers with `Filename = "very_long_path/with_many_parts.dat". Changing these consistently in all solvers could be quite tedious.. Not sure what would be the optimal solution here in the end |
Thanks. I changed the variables referring to files or directories to larger buffer sizes. I guess, we can change further variables if problems arise.
At some point I can also check which of those could reasonably be changed to dynamics strings...
|
There are still some inconsistencies with the path lengths: If I try setting
Maybe due to the Also If the combined length of |
Yes, it seems Mesh_t-strucure sometimes holds the name of the mesh. I'll change that to dynamic.
|
|
Thanks! Tested that Elmer can be now run with long paths to Would it be possible to also increase the size of solver output path buffers? I did some testing in a fork and these changes seem to be sufficient for the solvers we use tmyllaeri@9e92f9a. Not sure if all of them are strictly necessary |
@juharu thanks for the efforts! It looks like there are still some places where the longer paths are required. In my understanding the changes proposed by @tmyllaeri above is enough for his work to continue but is not sufficient to solve the whole issue. Could you help us with this? Thanks! |
I created a pull request with the changes that should be sufficient to us |
I tried running ElmerSolver for a sif file with a very long filepath containing hashes and timestamps but it failed due to
where the file to run would have been called
setup.sif
at the end. The amount of characters in the error is 128, which makes me assume this is set byMAX_NAME_LEN
orMAX_STRING_LEN
inelmerfem/fem/src/Types.F90
Line 57 in b72e8ce
Is there a way to circumvent this problem ? (aside from just increasing the value)
The text was updated successfully, but these errors were encountered: