Closed jg110 closed 6 years ago
hyStrath should be installed in $WM_PROJECT_USER_DIR. For some users, $WM_PROJECT_USER_DIR is identical to $FOAM_INST_DIR/$userName-$WM_PROJECT_VERSION so I was not aware of the problem you described. Thanks for reporting it.
Could you please edit line 9 in install-CFD.sh, from
sendingDir="$FOAM_INST_DIR/$userName-$WM_PROJECT_VERSION"
to
sendingDir="$WM_PROJECT_USER_DIR"
and let me know if this works for you? If it does, I will correct all the install scripts and push the commit asap. Thanks.
That did get me a lot farther. Replacing the line allowed hyStrath to compile, but compilation fails. It may be a separate issue, but here's the end of the compilation output:
+ wmake
Making dependency list for source file hy2Foam.C
g++ -std=c++11 -m64 -DOPENFOAM_PLUS=1706 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wols/lnInclude -I/opt/OpenFOAM/OpenFOAM-v1706/src/finiteVolume/lnInclude -I/opt/OpenFOAM/OpenFOAM-v1706/src/meshTools/lI/opt/OpenFOAM/OpenFOAM-v1706/src/ODE/lnInclude -I/opt/OpenFOAM/OpenFOAM-v1706/src/transportModels/compressible/lnInophysicalModels/strath/strathSpecie/lnInclude -I/home/user/OpenFOAM/user-v1706/src/thermophysicalModels/strath/strat -I/home/user/OpenFOAM/user-v1706/src/thermophysicalModels/strath/strathSpecie/transport/speciesDiffusion/diffusivitn/multiSpeciesTransportModels/lnInclude -I/home/user/OpenFOAM/user-v1706/src/thermophysicalModels/strath/strathSpecipecie/rarefied/rarefactionParameters/lnInclude -I/home/user/OpenFOAM/user-v1706/src/thermophysicalModels/strath/straI/home/user/OpenFOAM/user-v1706/src/TurbulenceModels/compressible/lnInclude -I/home/user/OpenFOAM/user-v1706/src/hTC/OSspecific/POSIX/lnInclude -fPIC -c hy2Foam.C -o Make/linux64GccDPInt32Opt/hy2Foam.o
In file included from hy2Foam.C:55:0:
/opt/OpenFOAM/OpenFOAM-v1706/src/OpenFOAM/lnInclude/postProcess.H:129:49: fatal error: createFields.H: No such file
#include INCLUDE_FILE(CREATE_FIELDS)
^
compilation terminated.
make: *** [Make/linux64GccDPInt32Opt/hy2Foam.o] Error 1
There are quite a few files called createFields.H within the OpenFOAM directory, as well as one within the hyStrath source directory within my home directory. They're all within various subdirectories of /opt/OpenFOAM/OpenFOAM-v1706/applications, if that matters.
This compilation error happened both when running install-all.sh
and install-CFD.sh
. install-DSMC.sh
compiles successfully, although I had to apply the same fix to that script as you suggested for install-CFD
.
Thanks very much. The installation path is fixed in commit 5da6723
.
After a rearrangement of the hy2Foam solver directory earlier this week, I didn't have a file called createFields.H anymore. The problem is that postProcess.H needs one and somehow my compiler was too permissive and didn't warn me...
May I ask what compiler you are using: gcc or Intel?
Anyway, I created a new createFields.H in that directory to initialise the thermophysical and transport quantities (createThermoFields.H, createReactingFields.H and createVibrationalFields.H). This is done in commit 82b4136
.
Could you please let me know again that works for you? Thanks.
Thanks, I just pulled and it compiled successfully. I'm using the gcc compiler.
I'm currently running the laminar flat plate example, but can't get gnuplot to work. Running on a single core in a Docker container in a VM is very slow. Is there a way to use multiple cores when using hy2Foam?
I found the -parallel option, but when I try to use it it gives an error saying I'm trying to run it in parallel on 1 processor. $(nproc)
(and the VM settings I specified) show I'm running on 4 cores. Ksysguard (a process monitor) confirms that either checkMesh or hy2Foam is only using 1 core without using -parallel (the last output I can see in Bash is from checkMesh).
Just like any other solvers, after decomposition:
mpirun -np $(nproc) hy2Foam -parallel > log.hy2Foam
I'm using the Docker image of OpenFOAM 1706 on Fedora 28. When I try to run the install script, I get an error:
mkdir: cannot create directory '/opt/OpenFOAM/user-v1706': Permission denied
. Is there a reason hyStrath has to be installed to $FOAM_INST_DIR instead of $FOAM_RUN or something similar?ls -al /opt
shows the following for the /opt/OpenFOAM directory:drwxr-xr-x. 5 1027 1001 4096 Jul 1 2017 OpenFOAM
I previously edited the permissions of this directory to allow the script to write to it, but the installation failed to find most of the source files (even though I could verify that they did exist in the correct places). I deleted the Docker container and reinstalled it for a fresh start; I have completed every step at https://www.openfoam.com/download/install-binary-linux.php using the 1706 install and start scripts from sourceforge. I suspect this problem is related, but I want to be sure I'm going about the installation process correctly before putting in a bunch of effort to get it working and messing up the Docker container's permissions in the process.