CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Bugs (
-   -   chtMultiRegionFoam -parallel fileName::stripInvalid() (

DanPad07 June 5, 2020 13:07

chtMultiRegionFoam -parallel fileName::stripInvalid()
Hi all,

I'm attempting to run a parallel chtMultiRegionFoam simulation in my onedrive but when I run this, it has the following error:

Build : v1812 OPENFOAM=1812
Arch : "LSB;label=32;scalar=64"
Exec : chtMultiRegionFoam -parallel
Date : Jun 05 2020
Time : 17:50:46
Host : DUIP74162
PID : 3477
fileName::stripInvalid() called for invalid fileName /mnt/c/Users/ppydp7/OneDrive-TheUniversityofNottingham/PhD/computationalWork/CFD/OpenFOAM/experiments/C1L1/test_parallel
For debug level (= 2) > 1 this is considered fatal

Since this is on onedrive, I have a feeling that it may be because there are spaces in the folder (OneDrive - The University of Nottingham) which I don't know how to remove. But this is strange because if I run chtMultiRegionFoam without it being in parallel then it works perfectly fine. Also everything else (e.g. blockMesh) works fine in this case.

If I copy and paste all my files and run them from a directory with no spaces (e.g. documents) then it also works so there is no problem with my simulation itself.

Does anyone know how to fix this or whats causing it? If it is the spaces in the onedrive folder name, how do I remove them or work around this issue?


crubio.abujas June 5, 2020 14:39

Soft link + case or sudo mount
It seems that to be the case... This is a poor man solution, but you can try making a soft link to a "safe" path. i.e:


ln -s "/mnt/c/Users/ppydp7/OneDrive - TheUniversityofNottingham/PhD/computationalWork/CFD/OpenFOAM/experiments" "/mnt/c/Users/ppydp7

I've tried to run the case from inside the case folder and still doesn't work. It still reads the link. BUT, running it from outside with the -case flag worked for me. In your case try:

chtMultiRegionFoam -case OFExperiments/C1L1/test_parallel
It shall work.

Nevertheless there must to be a way to change the mounting point of the OneDrive to another path, I don't know if you have admin privileges in your computer, if so try:

mkdir -p /mnt/c/Users/ppydp7/OFExperiments
sudo mount -o bind "/mnt/c/Users/ppydp7/OneDrive - TheUniversityofNottingham/PhD/computationalWork/CFD/OpenFOAM/experiments" "/mnt/c/Users/ppydp7/OFExperiments"

That would create a safe path and you can run from the folder as if anything wrong happens. If that worked you may have to add it to the /etc/fstab to mount it automatically on started and avoid running that code each time...

I hope any of these some-how-unelegant tricks works for you!

DanPad07 June 5, 2020 17:14

Hi Carlos,

Thanks for the help, I managed to mount the relevant directories and put them into /etc/fstab (I'll find out when I restart my computer whether I made it permanent or not) but the simulation is working perfectly now! I plan to be adding a lot of files to my onedrive so this is definitely the best method for me.

I'm quite new to both OpenFOAM and the Linux OS so I'm sorry if this was a basic solution.

Have a great weekend :)

All times are GMT -4. The time now is 10:29.