Checking dictionary in parallel
Howdy Folks:
In my solver I will be reading from a custom system dictionary. I wanted the solver to check if the dict follows the proper dictionary format. Here is a code snippet: Code:
// preamble not shown Code:
[0] Thanks in advance, Gerry. |
You can check, if the current process is running in the master process like this:
Code:
if (Pstream::master()) |
Hallo JH,
Thanks, but I don't think this would work because I am getting the same error message for every node. Limiting the search to the master node will not work. Incidentally, I tried anyways (what can I lose?), but it unfortunately only confirmed my suspicion. Gerry. Quote:
|
Having the same issue with OpenFOAM-6. Did you find any solution?
Thank you in advance. Edit: Found a solution Print the dictionary path information using : Code:
Info << <dict-name>.objectPath() << endl; Code:
<caseDir>/processor0/constant I guess in the source code, it's possible to create a dictionary pointer to assign appropriate path based on serial or parallel execution. Hope somebody will find the solution helpful. Regards, R |
Sorry to bump this thread, but are there any news on the topic? I don't really consider the symlink method a good solution, especially since I hve the same problem in a multi-region case.
The problem is e.g. in this line where I try to read a dictionary Code:
IOdictionary Code:
caseDir/processor0/system/fluid/balanceParDict Code:
caseDir/system/fluid/balanceParDict Code:
caseDir/../system/fluid/balanceParDict Thanks a lot for any help, cheers! For now I change it to time().constant() and created symlinks inside each processir*/constant/regionName folder which is easier than creating a new symlink inside each new time directory |
All times are GMT -4. The time now is 11:05. |