CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [IHFOAM] Error with IHFOAM version OF2300 in Mac (https://www.cfd-online.com/Forums/openfoam-community-contributions/151869-error-ihfoam-version-of2300-mac.html)

androso April 19, 2015 03:27

Error with IHFOAM version OF2300 in Mac
 
Dear Colleagues,

I have compiled IHFOAM for OpenFOAM 2.3.0 on my MAC (yosemite) and it works. However, I have problem compiling IHFOAM for OpenFOAM 2.3.x, the "genAbs" is ok, but for "solvers" IHFOAM throw the following error:

Code:

Making dependency list for source file ihFoam.C
SOURCE=ihFoam.C ;  g++-mp-4.6 -m64 -fsignaling-nans  -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2  -DNoRepository -ftemplate-depth-100 -ggdb3 -I/Users/androso/OpenFOAM/OpenFOAM-2.3.0/src/transportModels/twoPhaseMixture/lnInclude -I/Users/androso/OpenFOAM/OpenFOAM-2.3.0/src/transportModels -I/Users/androso/OpenFOAM/OpenFOAM-2.3.0/src/transportModels/incompressible/lnInclude -I/Users/androso/OpenFOAM/OpenFOAM-2.3.0/src/transportModels/interfaceProperties/lnInclude -I/Users/androso/OpenFOAM/OpenFOAM-2.3.0/src/turbulenceModels/incompressible/turbulenceModel -I/Users/androso/OpenFOAM/OpenFOAM-2.3.0/src/finiteVolume/lnInclude -I/Users/androso/OpenFOAM/OpenFOAM-2.3.0/src/meshTools/lnInclude -I/Users/androso/OpenFOAM/OpenFOAM-2.3.0/src/fvOptions/lnInclude -I/Users/androso/OpenFOAM/OpenFOAM-2.3.0/src/sampling/lnInclude -IlnInclude -I. -I/Users/androso/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude -I/Users/androso/OpenFOAM/OpenFOAM-2.3.0/src/OSspecific/POSIX/lnInclude  -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64Gcc46DPOpt/ihFoam.o
/Users/androso/OpenFOAM/OpenFOAM-2.3.0/src/finiteVolume/lnInclude/readTimeControls.H: In function 'int main(int, char**)':
/Users/androso/OpenFOAM/OpenFOAM-2.3.0/src/finiteVolume/lnInclude/readTimeControls.H:38:8: warning: unused variable 'maxDeltaT' [-Wunused-variable]
g++-mp-4.6 -m64 -fsignaling-nans  -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2  -DNoRepository -ftemplate-depth-100 -ggdb3 -I/Users/androso/OpenFOAM/OpenFOAM-2.3.0/src/transportModels/twoPhaseMixture/lnInclude -I/Users/androso/OpenFOAM/OpenFOAM-2.3.0/src/transportModels -I/Users/androso/OpenFOAM/OpenFOAM-2.3.0/src/transportModels/incompressible/lnInclude -I/Users/androso/OpenFOAM/OpenFOAM-2.3.0/src/transportModels/interfaceProperties/lnInclude -I/Users/androso/OpenFOAM/OpenFOAM-2.3.0/src/turbulenceModels/incompressible/turbulenceModel -I/Users/androso/OpenFOAM/OpenFOAM-2.3.0/src/finiteVolume/lnInclude -I/Users/androso/OpenFOAM/OpenFOAM-2.3.0/src/meshTools/lnInclude -I/Users/androso/OpenFOAM/OpenFOAM-2.3.0/src/fvOptions/lnInclude -I/Users/androso/OpenFOAM/OpenFOAM-2.3.0/src/sampling/lnInclude -IlnInclude -I. -I/Users/androso/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude -I/Users/androso/OpenFOAM/OpenFOAM-2.3.0/src/OSspecific/POSIX/lnInclude  -fPIC -Ddarwin -lpthread -L/Users/androso/OpenFOAM/OpenFOAM-2.3.0/platforms/darwinIntel64Gcc46DPOpt/lib/openmpi-macport-gcc46 -lPstream Make/darwinIntel64Gcc46DPOpt/ihFoam.o -L/Users/androso/OpenFOAM/OpenFOAM-2.3.0/platforms/darwinIntel64Gcc46DPOpt/lib \
            -ltwoPhaseMixture -linterfaceProperties -ltwoPhaseProperties -lincompressibleTransportModels -lincompressibleTurbulenceModel -lincompressibleRASModels -lincompressibleLESModels -lfiniteVolume -lmeshTools -lfvOptions -lsampling -L/Users/androso/OpenFOAM/androso-2.3.0/platforms/darwinIntel64Gcc46DPOpt/lib -lIHwaveGeneration -lIHwaveAbsorption -lOpenFOAM -ldl  -lpthread -lm -o /Users/androso/OpenFOAM/androso-2.3.0/platforms/darwinIntel64Gcc46DPOpt/bin/ihFoam
ld: warning: directory not found for option '-L/Users/androso/OpenFOAM/OpenFOAM-2.3.0/platforms/darwinIntel64Gcc46DPOpt/lib/openmpi-macport-gcc46'
ld: warning: directory not found for option '-L/Users/androso/OpenFOAM/androso-2.3.0/platforms/darwinIntel64Gcc46DPOpt/lib'
ld: library not found for -lPstream
collect2: ld returned 1 exit status
make: *** [/Users/androso/OpenFOAM/androso-2.3.0/platforms/darwinIntel64Gcc46DPOpt/bin/ihFoam] Error 1
ihFoam compilation failed


totalart February 6, 2016 23:45

Error with mac
 
Hi Andres,

Have you not encountered any issue when you compile IHFOAM for OF2.3.0?? I have errors and do not know why. Do you have an idea for this? The following errors occur in my case.


In file included from /Users/totalart/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/Field.H:394:
/Users/totalart/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/Field.C:461:10: warning:
reference cannot be bound to dereferenced null pointer in well-defined C++
code; pointer may be assumed to always convert to true
[-Wundefined-bool-conversion]
&& &mapper.directAddressing()
~~ ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/totalart/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/FieldMapper.H:71:35: note:
'directAddressing' returns a reference
virtual const labelUList& directAddressing() const
^
...

2.3.0/src/OpenFOAM/lnInclude/Field.C:496:14: warning:
reference cannot be bound to dereferenced null pointer in well-defined C++
code; pointer may be assumed to always convert to true
[-Wundefined-bool-conversion]
&& &mapper.directAddressing()
~~ ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/totalart/OpenFOAM/OpenFOAM-2.3.0/src/finiteVolume/lnInclude/fvPatchField.C:247:22: note:
in instantiation of member function 'Foam::Field<double>::autoMap'
requested here
Field<Type>::autoMap(mapper);
^
IH_Waves_InletAlpha/IH_Waves_InletAlphaFvPatchScalarField.C:60:1: note: in
instantiation of member function 'Foam::fvPatchField<double>::autoMap'
requested here
IH_Waves_InletAlphaFvPatchScalarField
^
/Users/totalart/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/FieldMapper.H:71:35: note:
'directAddressing' returns a reference
virtual const labelUList& directAddressing() const
^
9 warnings and 7 errors generated.
make: *** [Make/darwinIntel64ClangDPOpt/IH_Waves_InletAlphaFvPatchScalarField.o] Error 1
\n\nWave generation boundary conditions compilation failed




Best regards,
Youngkook

matejfor February 6, 2017 06:53

Hi, I'm sorry for not answering your question. Instead I have alternative solution. You can run on your Mac much recent version of OpenFOAM, OpenFOAM 1612+ by OpenCFD (easy install via docker http://openfoam.com/download/install-binary-mac.php). Inside the docker, you may either compile IHcantabria models yourself, or you may use the boundary conditions directly as they have been implemented into the main code (http://www.openfoam.com/version-v161...conditions.php).

alexeym February 7, 2017 14:06

Hi all,

@totalart

Unfortunately you did not post the error itself. In your output only warnings caused by old codebase are present (modern compilers optimise-out null-checks for reference addresses).

So either you can use OpenFOAM+ as matejfor suggested, or, if you really-really need native execution, please post your full build log (and it would be easier, if you describe, how you install OpenFOAM itself).


All times are GMT -4. The time now is 18:28.