-
Notifications
You must be signed in to change notification settings - Fork 297
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
Can't export FMUs of Buildings Library under Windows because of pathname length limitations #11554
Comments
In fact, we could just use "sim" or "foo" or "exec" or any other short name. There is no risk of name clashes because these files are already contained in a directory with the full model pathame. |
FWIW most commercial tools use the model name w/o the path for the FMU's filename and binary. So for |
- Use the last identifer in the model path for the FMU build OpenModelica#11554 - Build FMUs in parallel with the specified number of processors OpenModelica#11808 - Build FMUs with the specified CC and CXX OpenModelica#11808
- Use the last identifier in the model path for the FMU build OpenModelica#11554 - Build FMUs in parallel with the specified number of processors OpenModelica#11808 - Build FMUs with the specified CC and CXX OpenModelica#11808
- Use the last identifier in the model path for the FMU build OpenModelica#11554 - Build FMUs in parallel with the specified number of processors OpenModelica#11808 - Build FMUs with the specified CC and CXX OpenModelica#11808
- Use the last identifier in the model path for the FMU build OpenModelica#11554 - Build FMUs in parallel with the specified number of processors OpenModelica#11808 - Build FMUs with the specified CC and CXX OpenModelica#11808
- Use the last identifier in the model path for the FMU build OpenModelica#11554 - Build FMUs in parallel with the specified number of processors OpenModelica#11808 - Build FMUs with the specified CC and CXX OpenModelica#11808
- Use the last identifier in the model path for the FMU build OpenModelica#11554 - Build FMUs in parallel with the specified number of processors OpenModelica#11808 - Build FMUs with the specified CC and CXX OpenModelica#11808
- Use the last identifier in the model path for the FMU build OpenModelica#11554 - Build FMUs in parallel with the specified number of processors OpenModelica#11808 - Build FMUs with the specified CC and CXX OpenModelica#11808
- Use the last identifier in the model path for the FMU build OpenModelica#11554 - Build FMUs in parallel with the specified number of processors OpenModelica#11808 - Build FMUs with the specified CC and CXX OpenModelica#11808
After merging my changes now |
Thanks @adrpo! I'll test ASAP with the latest nightly build. If it works fine, then you can port it to maintenance/v1.22 and we can close this. |
Just tested with Buildings.Examples.ChillerPlant.DataCenterContinuousTimeControl, I generated the FMU successfully. Please cherry-pick to maintenance/v1.22 and close this ticket. |
* Various FMU fixes - Use the last identifier in the model path for the FMU build OpenModelica#11554 - Build FMUs in parallel with the specified number of processors OpenModelica#11808 - Build FMUs with the specified CC and CXX OpenModelica#11808 * Variable name
Merged into maintenance/v1.22 |
Steps to Reproduce
Try to export any runnable model of the Buildings Library as an FMU using OMEdit, e.g.
Buildings.Examples.ChillerPlant.DataCenterContinuousTimeControl
. The following error is obtainedHow to address this issue
We have solved similar problems regarding long pathnames and filenames containing Unicode characters by enabling 8.3 filenames; another untested approach is to use UNC pathnames, #8838, which may not be supported by CMAKE handles them.
One thing we can do easily is the same that we already did for the C runtime: shorten unnecessary long pathnames!
OMEdit places all the files in a subdirectory of the working directory which is named as the full pathname of the model. That's OK in order to avoid overwriting stuff related to classes with the same name but on a different path.
But then, it generates a temporary directory inside it to generate all the FMU stuff which is again using the entire pathname, e.g.
Buildings_Examples_ChillerPlant_DataCenterContinuousTimeControl.fmutmp
. This is completelyunnecessary,
fmutmp
or even justtmp
would do. There is no risk of aliasing, since this directory is already contained in a directory with the full class pathname.Ditto for all the paths and files that are contained therein: there is no need to have source code files like
Buildings_Examples_ChillerPlant_DataCenterContinuousTimeControl.c
,DataCenterContinuousTimeControl.c
would do equally well. We already do that when compiling for the C runtime and everybody's happy with it.Even further, the .fmutmp directory contains
sources/build_cmake_dynamic/CMakeFiles
, which again contains a directory with the full pathnameBuildings_Examples_ChillerPlant_DataCenterContinuousTimeControl.dir
. Once more, no need to use the full pathname there.If we do so, the pathname
D:/Temp/OMEdit/Buildings.Examples.ChillerPlant.DataCenterContinuousTimeControl/Buildings_Examples_ChillerPlant_DataCenterContinuousTimeControl.fmutmp/sources/build_cmake_dynamic/CMakeFiles/Buildings_Examples_ChillerPlant_DataCenterContinuousTimeControl.dir/
, which is 257 characters long and therefore beyond CMAKE's limit, would becomeD:/Temp/OMEdit/Buildings.Examples.ChillerPlant.DataCenterContinuousTimeControl/tmp/sources/build_cmake_dynamic/CMakeFiles/DataCenterContinuousTimeControl.dir/
, which is only 157 characters long and would work out of the box with a lot of margin.I understand this may not be the final solution to all such problems, but I guess it's a very easy fix to implement.
@adrpo, @arun3688, @AnHeuermann, @mahge, who can take care of that?
Thanks!
Related issues
See also #8838 and #9508.
Keeping @Pavanrajhr and @deepak19015 in the loop.
The text was updated successfully, but these errors were encountered: