buoyantBoussinesqPimpleEHDFoam specifies OpenFOAM v-4.1. As I was not prepared to figure out how to build such an ancient version from source, on the latest Ubuntu, I decided to try the
Docker image
openfoam/openfoam4-paraview50. However when attempting to
wmake the source for
buoyantBoussinesqPimpleEHDFoam, I was stumped by this error:
Code:
/usr/bin/ld: cannot open output file /opt/openfoam4/platforms/linux64GccDPInt32Opt/bin/buoyantBoussinesqPimpleEHDFoam: Permission denied
collect2: error: ld returned 1 exit status
/opt/openfoam4/wmake/makefiles/general:132: recipe for target '/opt/openfoam4/platforms/linux64GccDPInt32Opt/bin/buoyantBoussinesqPimpleEHDFoam' failed
make: *** [/opt/openfoam4/platforms/linux64GccDPInt32Opt/bin/buoyantBoussinesqPimpleEHDFoam] Error 1
Apparently
openfoam4-linux (which invokes
docker) initializes environment variables to point at /opt, which is owned by
root, rather than
/home/openfoam which is owned by the user, but
AFAIK there is no way to execute either
sudo or
su from the shell provided by that
docker image.
Here are the relevant environment variables:
Code:
OpenFOAM-4.1(63) printenv|grep -i foam
FOAM_SOLVERS=/opt/openfoam4/applications/solvers
FOAM_EXT_LIBBIN=/opt/ThirdParty-4.1/platforms/linux64GccDPInt32/lib
FOAM_APPBIN=/opt/openfoam4/platforms/linux64GccDPInt32Opt/bin
FOAM_TUTORIALS=/opt/openfoam4/tutorials
FOAM_JOB_DIR=/opt/jobControl
FOAM_SITE_APPBIN=/opt/site/4.1/platforms/linux64GccDPInt32Opt/bin
FOAM_APP=/opt/openfoam4/applications
user=openfoam
FOAM_SITE_LIBBIN=/opt/site/4.1/platforms/linux64GccDPInt32Opt/lib
LD_LIBRARY_PATH=/opt/ThirdParty-4.1/platforms/linux64Gcc/gperftools-svn/lib:/opt/paraviewopenfoam50/lib/paraview-5.0:/opt/openfoam4/platforms/linux64GccDPInt32Opt/lib/openmpi-system:/opt/ThirdParty-4.1/platforms/linux64GccDPInt32/lib/openmpi-system:/usr/lib/openmpi/lib:/home/openfoam/platforms/linux64GccDPInt32Opt/lib:/opt/site/4.1/platforms/linux64GccDPInt32Opt/lib:/opt/openfoam4/platforms/linux64GccDPInt32Opt/lib:/opt/ThirdParty-4.1/platforms/linux64GccDPInt32/lib:/opt/openfoam4/platforms/linux64GccDPInt32Opt/lib/dummy
FOAM_SRC=/opt/openfoam4/src
FOAM_SIGFPE=
ParaView_DIR=/opt/paraviewopenfoam50
FOAM_UTILITIES=/opt/openfoam4/applications/utilities
WM_PROJECT_DIR=/opt/openfoam4
WM_PROJECT=OpenFOAM
PATH=/opt/ThirdParty-4.1/platforms/linux64Gcc/gperftools-svn/bin:/opt/paraviewopenfoam50/bin:/home/openfoam/platforms/linux64GccDPInt32Opt/bin:/opt/site/4.1/platforms/linux64GccDPInt32Opt/bin:/opt/openfoam4/platforms/linux64GccDPInt32Opt/bin:/opt/openfoam4/bin:/opt/openfoam4/wmake:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
FOAM_USER_LIBBIN=/home/openfoam/platforms/linux64GccDPInt32Opt/lib
PWD=/home/openfoam/buoyantBoussinesqPimpleEHDFoam/buoyantBoussinesqPimpleEHDFoam
FOAM_ETC=/opt/openfoam4/etc
PV_PLUGIN_PATH=/opt/openfoam4/platforms/linux64GccDPInt32Opt/lib/paraview-5.0
FOAM_INST_DIR=/opt
ParaView_INCLUDE_DIR=/opt/paraviewopenfoam50/include/paraview-5.0
FOAM_MPI=openmpi-system
FOAM_LIBBIN=/opt/openfoam4/platforms/linux64GccDPInt32Opt/lib
WM_DIR=/opt/openfoam4/wmake
HOME=/home/openfoam
XDG_CONFIG_HOME=/home/openfoam/.config
FOAM_SETTINGS=
FOAMY_HEX_MESH=yes
WM_PROJECT_USER_DIR=/home/openfoam
FOAM_RUN=/home/openfoam/run
FOAM_USER_APPBIN=/home/openfoam/platforms/linux64GccDPInt32Opt/bin
OLDPWD=/home/openfoam/buoyantBoussinesqPimpleEHDFoam
OpenFOAM-4.1(64) pwd
/home/openfoam/buoyantBoussinesqPimpleEHDFoam/buoyantBoussinesqPimpleEHDFoam