View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002632 | OpenFOAM | Patch | public | 2017-07-23 06:09 | 2017-07-24 08:24 |
Reporter | taherc | Assigned To | henry | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | dev | ||||
Fixed in Version | dev | ||||
Summary | 0002632: foamJob is not working correctly when collated file handler is set | ||||
Description | By using "-fileHandler collated" flag with decomposePar, a folder named processors is made whereas foamJob looks for processor0 folder to validate a parallel case. Therefore it throws an error that case is not ready for parallel. I attached a simple patch for foamJob file. | ||||
Tags | No tags attached. | ||||
|
foamJob.patch (518 bytes)
diff --git a/bin/foamJob b/bin/foamJob index 5bfed74c9..e34ba820e 100755 --- a/bin/foamJob +++ b/bin/foamJob @@ -175,9 +175,9 @@ then # # Check if the case decomposed # - if [ -r "processor0" ] + if [[ -r "processor0" || -r "processors" ]] then - NPROCS="$(/bin/ls -1d processor* | wc -l)" + NPROCS="$(foamDictionary -entry numberOfSubdomains -value system/decomposeParDict)" else echo "Case is not currently decomposed" if [ -r system/decomposeParDict ] |
|
Quick note: The more general "/bin/sh" way of doing this is to replace in the patch this line: if [[ -r "processor0" || -r "processors" ]] with this one: if [ -r "processor0" -o -r "processors" ] This is because "/bin/sh" isn't always Bash. For example, on Ubuntu it's Dash, which AFAIK, doesn't support Bash's double square brackets. |
|
Resolved by commit 2fb9ffc651d0825d723fc848f5c381368d5d57ef |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-07-23 06:09 | taherc | New Issue | |
2017-07-23 06:09 | taherc | File Added: foamJob.patch | |
2017-07-24 00:24 | wyldckat | Note Added: 0008445 | |
2017-07-24 08:24 | henry | Assigned To | => henry |
2017-07-24 08:24 | henry | Status | new => resolved |
2017-07-24 08:24 | henry | Resolution | open => fixed |
2017-07-24 08:24 | henry | Fixed in Version | => dev |
2017-07-24 08:24 | henry | Note Added: 0008448 |