Closed EastEriq closed 5 years ago
It's a good idea to cross-post here, because I get an email notification from this message, whereas I might not look at the forum for another month.
Evidently, this library was never written to work with OF60 yet. I don't have OF60 installed, nor do I have time for that atm, but I can throw random suggestions at you for troubleshooting.
Unfortunately, I do not know what that error means, nor have I ever seen an error of that kind. Error in "free()"... Looks like a memory issue inside OpenFoam's "wmkdep"... But let us assume that's not the case, as it clearly does work with OpenFOAM itself.
You say "wmake" runs fine. So if you look in $FOAM_USER_LIBBIN, do you see my library there (.so file)? Quite amazing that this step already worked out of the blue. If yes:
You say ./Allget runs fine. Then you should now have a directory called "kva_interFoam" in the directory you were in. Is that correct? If yes:
Can you copy the Make/files and Make/options files here? If I recall correctly, there is nothing else in the kva_interFoam directory, is there?
Are you 100% sure that you only have OF60 sourced, and not accidentally mixed versions? You can check that by making sure that your LD_LIBRARY_PATH and PATH environment variables all point to your OF60 directory, and none to another. (So echo $PATH
and echo $LD_LIBRARY_PATH
.)
Thanks for the very fast reply.
1. You say "wmake" runs fine. So if you look in $FOAM_USER_LIBBIN, do you see my library there (.so file)? Quite amazing that this step already worked out of the blue.
yes,
libkva_interfaceProperties.so
If yes:2. You say ./Allget runs fine. Then you should now have a directory called "kva_interFoam" in the directory you were in. Is that correct?
in
recompile_solvers
, that is. Yes. If yes:3. Can you copy the Make/files and Make/options files here? If I recall correctly, there is nothing else in the kva_interFoam directory, is there?
after the failing ./Allwmake
an additional dir appears there, linux64GccDPInt32Opt
. Attach that too.
4. Are you 100% sure that you only have OF60 sourced, and not accidentally mixed versions? You can check that by making sure that your LD_LIBRARY_PATH and PATH environment variables all point to your OF60 directory, and none to another. (So `echo $PATH` and `echo $LD_LIBRARY_PATH`.)
Indeed, I am jumping versions and have OF4,5,6 and extend-4.1 installed, but I do a wmUnset
before resourcing the one or the other. Seems that $PATH and $LD_LIBRARY_PATH point only to 6 at a time.
The directory linux64GccDPInt32Opt
contains compiled code. A directory similar to that one is always created when you compile something using OpenFoam's wmake, regardless of whether it succeeds or not.
Make/files and Make/options look healthy at first glance... Can you open both of them, and make sure that all the referenced directories exist on your system? Perhaps there is an OF50-like path in there which we need to update. So:
ls /opt/openfoam6/applications/solvers/multiphase/interFoam/interFoam.C
ls /opt/openfoam6/applications/solvers/multiphase/interFoam
ls ../../lnInclude
Etc.
$ ls /opt/openfoam6/applications/solvers/multiphase/interFoam/
alphaSuSp.H createFields.H interFoam.C Make rhofs.H
correctPhi.H initCorrectPhi.H interMixingFoam pEqn.H UEqn.H
I don't have a ../../lnInclude
relative to kva_interfaceProperties/recompileSolvers
(I have so many of them in /opt/openfoam6/src/), where should that be?
../../lnInclude
should be relative to recompileSolvers/kva_interFoam
, not relative to recompileSolvers
, so cd recompileSolvers/kva_interFoam
before you ls
.
It should point to the lnInclude
directory of kva_interfaceProperties' source code. Does it?
Did you also check all the other directories from Make/options
? In my previous message I only copied 3 as example, but there are a dozen more.
../../lnInclude
should be relative torecompileSolvers/kva_interFoam
, not relative torecompileSolvers
, socd recompileSolvers/kva_interFoam
before youls
. It should point to thelnInclude
directory of kva_interfaceProperties' source code. Does it?
right.
recompileSolvers$ ls ../lnInclude/
curvatureModel.C interfaceProperties.C normal.C vofsmooth.C
curvatureModel.H interfaceProperties.H normal.H vofsmooth.H
Did you also check all the other directories from
Make/options
? In my previous message I only copied 3 as example, but there are a dozen more.
Uhm, right. Now, /opt/openfoam6/applications/solvers/multiphase/VoF
is there, but who defines $LIB_SRC
?
First check, I do have dirs like /opt/openfoam6/src/transportModels/twoPhaseMixture/lnInclude
and
/opt/openfoam6/src/transportModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude/
LIB_SRC is defined deep within OpenFOAM's wmake system. For you, it will point to /opt/openfoam6/src
.
So it's all there? Nothing missing?
If yes, try the following things:
/opt/openfoam6/applications/...
) and type wclean
, followed by wmake
to recompile it. What is the output?wmake
when you compile kva_interfaceProperties? Don't forget to wclean
it first.So it's all there? Nothing missing?
Looks so. At least there are folders and subfolders, I haven't checked for specific files.
If yes, try the following things:
1. Go to OpenFOAM's original interFoam directory (`/opt/openfoam6/applications/...`) and type `wclean`, followed by `wmake` to recompile it. What is the output?
# wclean
# wmake
Making dependency list for source file interFoam.C
g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I../VoF -I/opt/openfoam6/src/transportModels/twoPhaseMixture/lnInclude -I/opt/openfoam6/src/transportModels -I/opt/openfoam6/src/transportModels/incompressible/lnInclude -I/opt/openfoam6/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam6/src/TurbulenceModels/turbulenceModels/lnInclude -I/opt/openfoam6/src/TurbulenceModels/incompressible/lnInclude -I/opt/openfoam6/src/transportModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude -I/opt/openfoam6/src/finiteVolume/lnInclude -I/opt/openfoam6/src/dynamicFvMesh/lnInclude -I/opt/openfoam6/src/meshTools/lnInclude -I/opt/openfoam6/src/sampling/lnInclude -IlnInclude -I. -I/opt/openfoam6/src/OpenFOAM/lnInclude -I/opt/openfoam6/src/OSspecific/POSIX/lnInclude -fPIC -c interFoam.C -o /opt/openfoam6/platforms/linux64GccDPInt32Opt/applications/solvers/multiphase/interFoam/interFoam.o
g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I../VoF -I/opt/openfoam6/src/transportModels/twoPhaseMixture/lnInclude -I/opt/openfoam6/src/transportModels -I/opt/openfoam6/src/transportModels/incompressible/lnInclude -I/opt/openfoam6/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam6/src/TurbulenceModels/turbulenceModels/lnInclude -I/opt/openfoam6/src/TurbulenceModels/incompressible/lnInclude -I/opt/openfoam6/src/transportModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude -I/opt/openfoam6/src/finiteVolume/lnInclude -I/opt/openfoam6/src/dynamicFvMesh/lnInclude -I/opt/openfoam6/src/meshTools/lnInclude -I/opt/openfoam6/src/sampling/lnInclude -IlnInclude -I. -I/opt/openfoam6/src/OpenFOAM/lnInclude -I/opt/openfoam6/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed /opt/openfoam6/platforms/linux64GccDPInt32Opt/applications/solvers/multiphase/interFoam/interFoam.o -L/opt/openfoam6/platforms/linux64GccDPInt32Opt/lib \
-limmiscibleIncompressibleTwoPhaseMixture -lturbulenceModels -lincompressibleTurbulenceModels -lfiniteVolume -ldynamicFvMesh -lfvOptions -lmeshTools -lsampling -lOpenFOAM -ldl \
-lm -o /opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/interFoam
2. In order to make sure that kva_interfaceProperties did indeed compile without errors, but also without warnings, can you copy the output of `wmake` when you compile kva_interfaceProperties? Don't forget to `wclean` it first.
$ wclean
$ wmake
wmakeLnIncludeAll: running wmakeLnInclude on dependent libraries:
wmakeLnInclude: linking include files to .//lnInclude
Making dependency list for source file vofsmooth.C
Making dependency list for source file normal.C
Making dependency list for source file curvatureModel.C
Making dependency list for source file interfaceProperties.C
g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I./lnInclude -I/opt/openfoam6/src/transportModels/twoPhaseMixture/lnInclude -I/opt/openfoam6/src/transportModels/twoPhaseProperties/alphaContactAngle/alphaContactAngle -I/opt/openfoam6/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam6/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam6/src/OpenFOAM/lnInclude -I/opt/openfoam6/src/OSspecific/POSIX/lnInclude -fPIC -c interfaceProperties.C -o Make/linux64GccDPInt32Opt/interfaceProperties.o
g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I./lnInclude -I/opt/openfoam6/src/transportModels/twoPhaseMixture/lnInclude -I/opt/openfoam6/src/transportModels/twoPhaseProperties/alphaContactAngle/alphaContactAngle -I/opt/openfoam6/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam6/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam6/src/OpenFOAM/lnInclude -I/opt/openfoam6/src/OSspecific/POSIX/lnInclude -fPIC -c curvatureModel/curvatureModel.C -o Make/linux64GccDPInt32Opt/curvatureModel/curvatureModel.o
g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I./lnInclude -I/opt/openfoam6/src/transportModels/twoPhaseMixture/lnInclude -I/opt/openfoam6/src/transportModels/twoPhaseProperties/alphaContactAngle/alphaContactAngle -I/opt/openfoam6/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam6/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam6/src/OpenFOAM/lnInclude -I/opt/openfoam6/src/OSspecific/POSIX/lnInclude -fPIC -c curvatureModel/normal/normal.C -o Make/linux64GccDPInt32Opt/curvatureModel/normal/normal.o
g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I./lnInclude -I/opt/openfoam6/src/transportModels/twoPhaseMixture/lnInclude -I/opt/openfoam6/src/transportModels/twoPhaseProperties/alphaContactAngle/alphaContactAngle -I/opt/openfoam6/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam6/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam6/src/OpenFOAM/lnInclude -I/opt/openfoam6/src/OSspecific/POSIX/lnInclude -fPIC -c curvatureModel/vofsmooth/vofsmooth.C -o Make/linux64GccDPInt32Opt/curvatureModel/vofsmooth/vofsmooth.o
g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I./lnInclude -I/opt/openfoam6/src/transportModels/twoPhaseMixture/lnInclude -I/opt/openfoam6/src/transportModels/twoPhaseProperties/alphaContactAngle/alphaContactAngle -I/opt/openfoam6/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam6/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam6/src/OpenFOAM/lnInclude -I/opt/openfoam6/src/OSspecific/POSIX/lnInclude -fPIC -shared -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPInt32Opt/interfaceProperties.o Make/linux64GccDPInt32Opt/curvatureModel/curvatureModel.o Make/linux64GccDPInt32Opt/curvatureModel/normal/normal.o Make/linux64GccDPInt32Opt/curvatureModel/vofsmooth/vofsmooth.o -L/opt/openfoam6/platforms/linux64GccDPInt32Opt/lib \
-ltwoPhaseMixture -linterfaceProperties -lfiniteVolume -o /home/enrico/OpenFOAM/enrico-6/platforms/linux64GccDPInt32Opt/lib/libkva_interfaceProperties.so
Since everything looks good, I'm running out of checks.
Let's now resort to elimination:
In Make/options
from kva_interFoam
, successively remove the following lines, and then try to compile with wclean
and wmake
and copy the output to me:
-I../../lnInclude \
-lkva_interfaceProperties \
-L$(FOAM_USER_LIBBIN) \
After having removed all three, you should have the regular interFoam solver again. (That is, it may not give any error at all.) Let's see whether that's indeed the case!
ok. I'm going to try that out later, maybe tomorrow, now I'm running out of time. Thanks for your assistance so far!
remove the following lines, and then try to compile with wclean and wmake
Same free(): invalid next size (fast)
error and stack. Only the actual memory addresses change, as they do at every compilation. Here for completeness.
$ wclean
$ wmake
Making dependency list for source file interFoam.C
*** Error in `/opt/openfoam6/wmake/platforms/linux64Gcc/wmkdep': free(): invalid next size (fast): 0x0000000001161640 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7fbba31ad7e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7fbba31b637a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7fbba31ba53c]
/opt/openfoam6/wmake/platforms/linux64Gcc/wmkdep[0x401023]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7fbba3156830]
/opt/openfoam6/wmake/platforms/linux64Gcc/wmkdep[0x401199]
======= Memory map: ========
00400000-00405000 r-xp 00000000 08:01 3043213 /opt/openfoam6/wmake/platforms/linux64Gcc/wmkdep
00604000-00605000 r--p 00004000 08:01 3043213 /opt/openfoam6/wmake/platforms/linux64Gcc/wmkdep
00605000-00606000 rw-p 00005000 08:01 3043213 /opt/openfoam6/wmake/platforms/linux64Gcc/wmkdep
00606000-00607000 rw-p 00000000 00:00 0
01161000-011a3000 rw-p 00000000 00:00 0 [heap]
7fbb9c000000-7fbb9c021000 rw-p 00000000 00:00 0
7fbb9c021000-7fbba0000000 ---p 00000000 00:00 0
7fbba2f20000-7fbba2f36000 r-xp 00000000 08:01 6034606 /lib/x86_64-linux-gnu/libgcc_s.so.1
7fbba2f36000-7fbba3135000 ---p 00016000 08:01 6034606 /lib/x86_64-linux-gnu/libgcc_s.so.1
7fbba3135000-7fbba3136000 rw-p 00015000 08:01 6034606 /lib/x86_64-linux-gnu/libgcc_s.so.1
7fbba3136000-7fbba32f6000 r-xp 00000000 08:01 6034654 /lib/x86_64-linux-gnu/libc-2.23.so
7fbba32f6000-7fbba34f6000 ---p 001c0000 08:01 6034654 /lib/x86_64-linux-gnu/libc-2.23.so
7fbba34f6000-7fbba34fa000 r--p 001c0000 08:01 6034654 /lib/x86_64-linux-gnu/libc-2.23.so
7fbba34fa000-7fbba34fc000 rw-p 001c4000 08:01 6034654 /lib/x86_64-linux-gnu/libc-2.23.so
7fbba34fc000-7fbba3500000 rw-p 00000000 00:00 0
7fbba3500000-7fbba3526000 r-xp 00000000 08:01 6034650 /lib/x86_64-linux-gnu/ld-2.23.so
7fbba36e0000-7fbba36e3000 rw-p 00000000 00:00 0
7fbba3723000-7fbba3725000 rw-p 00000000 00:00 0
7fbba3725000-7fbba3726000 r--p 00025000 08:01 6034650 /lib/x86_64-linux-gnu/ld-2.23.so
7fbba3726000-7fbba3727000 rw-p 00026000 08:01 6034650 /lib/x86_64-linux-gnu/ld-2.23.so
7fbba3727000-7fbba3728000 rw-p 00000000 00:00 0
7ffdb87d4000-7ffdb87f6000 rw-p 00000000 00:00 0 [stack]
7ffdb87f6000-7ffdb87f9000 r--p 00000000 00:00 0 [vvar]
7ffdb87f9000-7ffdb87fb000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
make: *** Deleting file 'Make/linux64GccDPInt32Opt//opt/openfoam6/applications/solvers/multiphase/interFoam/interFoam.C.dep'
make: *** No rule to make target 'Make/linux64GccDPInt32Opt//opt/openfoam6/applications/solvers/multiphase/interFoam/interFoam.C.dep', needed by 'Make/linux64GccDPInt32Opt//opt/openfoam6/applications/solvers/multiphase/interFoam/interFoam.o'. Stop.
So that's after removing all three lines? That should have made that Makefile identical to the original interFoam...
Could you post your current Make/files
and Make/options
of both kva_interFoam and the original interFoam? Perhaps comparing them reveals the problem (as again, they should have been doing the same thing now).
Here are the original sets from OF4,5 and 6, together with options
and files
resulting from Allget (having sourced OF6) before and after the pruning. Would you like me to add also the ones in kva_interFoam/Make/*
when building under OF5, btw?
Inspecting them, I see that the files
are identical in the three OF versions and differ from kva_interFoam/Make/files
only for variable substitutions. Diffing the options
, I see that:
-I../VoF
in EXE_INC wro OF4-I$(LIB_SRC)/dynamicFvMesh/lnInclude
in EXE_INC, and -ldynamicFvMesh
in EXE_LIBS wro OF5-I/opt/openfoam6/applications/solvers/multiphase/interFoam
and absolutes ../VoF
in EXE_INC, but it looks logical that it has to be so.Since we are at it, here also what results when compiling (successfully) with OF5 sourced.
When I said "diff" above, btw, I meant wro the corresponding files in /opt/openfoamX/applications/solvers/multiphase/interFoam/Make/
kva_interFoam adds -I/opt/openfoam6/applications/solvers/multiphase/interFoam and absolutes ../VoF in EXE_INC, but it looks logical that it has to be so.
That's the idea. Instead of copying interFoam entirely, all we really need to copy is its Makefile, and then link the the original source directory. That's what "./Allget" automagically does for you.
Now, given that you removed all references to kva_interfaceProperties, kva_interFoam should be an identical compilation as the original interFoam, but a weird error pops up nonetheless. And looking at your files - it's all correct.
Now this error free(): invalid next size (fast)
implies a memory error (i.e., a programming mistake with freeing memory twice or something similar), but the only program that is being executed is OF's wmake
, and of course gcc
... Therefore, the problem isn't with my code (although it's surprising that it'd work with OF6 out of the blue), but rather in a location we cannot change.
But we can perhaps hack it.
Let's try the following things. Clearly, your pruned kva_interFoam should have been identical to interFoam. Let us now make it truly identical by copying interFoam entirely to the same directory as you were trying to compile kva_interFoam in. That allows us to see if we perhaps have some sort of writing-permissions error in disguise:
cd kva_interFoam
cp -r /opt/openfoam6/applications/solvers/multiphase/interFoam/* .
Make/options
absolute.wmake
and see what happens. [This must be successful... But check anyway] If successful, proceed. If unsuccessful (-.-'), also copy "VoF" to "../VoF" relative to kva_interFoam and try again (don't forget wclean
, and make the path to "VoF" relative again in Make/options
).wclean
Make/files
, such that we write to $FOAM_USER_APPBIN again: EXE = $(FOAM_USER_APPBIN)/kva_interFoam
wmake
wclean && wmake
.Depending on what happens, we'll try the next thing, which will probably be using OF5's wmake
with OF6 sourced... Will be fun!
Ok. At 3. the first wmake
fails for normal user, because
/usr/bin/ld: cannot open output file /opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/interFoam: Permission denied
collect2: error: ld returned 1 exit status
/opt/openfoam6/wmake/makefiles/general:140: recipe for target '/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/interFoam' failed
make: *** [/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/interFoam] Error 1
but it works changing $FOAM_APPBIN
--> $FOAM_USER_APPBIN
in Make/files
, and produces an interFoam
executable there. So far so good, I've locally rebuilt interFoam.
Now I restore files
from kfo6.zip
above. wclean; wmake
--> free(): invalid next size (fast)
.
There are only two differences in files
. So let's deal with the first: I change to the local interFoam.C
rather than to the original with its absolute path. wmake
now succeeds. But the local and original interFoam.C
are now identical, so what's the difference? Some included file of interFoam.C
or some deeper inclusion referred relatively, perhaps? Strange that the complaint then is not about a missing file.
The first thing I'd say is that perhaps it tries to write something in the original location (/opt/...) if your .C file is there... For you that'd clearly be a problem, as you do not have writing permissions there. However, the exact same thing should happen in OF5, which does work for you. Unless wmake changed from OF5 to OF6 to do something like that -- I don't know, but that'd explain it.
Either way, what we do know now, is that it works provided that interFoam.C (i.e., all the .C source files) are locally copied (or perhaps also symlinked to prevent duplication)?
In other words, if you know run ./Allget
again, manually copy interFoam.C, edit Make/files
to take the local interFoam.C and then run ./Allwmake
, then kva_interFoam compiles successfully?
If I do
$ rm -rf kva_interFoam
$ ./Allget
$ cd kva_interFoam
$ cp /opt/openfoam6/applications/solvers/multiphase/interFoam/* . # Note without -r; no subfolders
then change /opt/openfoam6/applications/solvers/multiphase/interFoam/interFoam.C
to just interFoam.C
in files
, then wclean; wmake
then compilation succeeds, confirmed. Same with ./Allwmake
directly from recompile_solvers
.
Same if I link (ln -s
) the original files from interFoam instead of copying them.
I haven't tested yet if the resulting exe runs as expected and gives results comparable to that in OF5; that might take me a bit to get round to it. Anyway, perhaps that can be considered already workaround for OF6 if not a resolution.
As of diffs between /opt/openfoam6/wmake/wmake
and /opt/openfoam5/wmake/wmake
there are many, and possibly more of them throughout the wmake subdirs, I wouldn-t really dig into to understand.
As of diffs between /opt/openfoam6/wmake/wmake and /opt/openfoam5/wmake/wmake there are many, and possibly more of them throughout the wmake subdirs, I wouldn-t really dig into to understand.
Yeah... Let's not do that. ;-)
then wclean; wmake then compilation succeeds, confirmed.
Ok, great. Then I consider this solved, despite not understanding what precisely the problem is.
Same with ./Allwmake directly from recompile_solvers.
That makes sense, because all that script does is call wmake
on all solvers. "All" being just one for you: kva_interFoam.
I haven't tested yet if the resulting exe runs as expected and gives results comparable to that in OF5; that might take me a bit to get round to it. Anyway, perhaps that can be considered already workaround for OF6 if not a resolution.
I'm guessing that it should work just fine, as it wouldn't have compiled otherwise. However, what could be the case is that you miss new OF6 things have been added to interfaceProperties, as kva_interfaceProperties is a copy of OF5's interfaceProperties with added smoothing functionality. It wouldn't be too difficult to incorporate OF6's improvements though, as my "added smoothing functionality" does not change interfaceProperties considerably: it only forwards some calls to my subclasses, which handle it in a RTS (=run-time selection) manner. So, do test it with caution (as OF6 was never tested), but there is a very good chance that'll work just fine.
Good luck!
Good. During the next days I should have time to test some computation, I'll report if I see numerical oddities.
In the meantime I repeated the installation on another system, and have found that it is sufficient to link the original interFoam/interFoam.C
alone. Summing up all my steps amount to:
git checkout of50
wmake
cd recompile_solvers
, edit list_of_solvers
/usr/bin/sh
--> /bin/bashrc
in Allget, Allwmake, getSolverMake.sh (known, from other discussion)./Allget
cd kva_interFoam; ln -s /opt/openfoam6/applications/solvers/multiphase/interFoam/interFoam.C .
/opt/openfoam6/applications/solvers/multiphase/interFoam/interFoam.C
-> interFoam/interFoam.C
in Make/files
wmake
For the record, my second installation was on ubuntu18. There, no stack is dumped after free(): invalid next size (fast)
. And, the problem is probably not one of writing permission into /opt
, because sudo . /opt/openfoam6/etc/bashrc; ./Allwmake
fails the same way.
cross-post from https://www.cfd-online.com/Forums/openfoam-verification-validation/124363-interfoam-validation-bubble-droplet-flows-microfluidics-3.html#post721524, in case you prefer it as an issue here.
I was able to build and run in OF5. For uniformity with other simulations of mine, though, I was looking to use OF6. Blindly trying on OF6, according to the instructions on the README:
. /opt/openfoam6/etc/bashrc
wmake
runs finecd recompile_solvers
$FOAM_SOLVERS/multiphase/interFoam; kva_interFoam
inlist_of_solvers
./Allget
ok./Allwmake
fails with this error: