|
[Sponsors] |
error when compile a new solver on version 4.1 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 10, 2017, 13:23 |
error when compile a new solver on version 4.1
|
#1 |
Senior Member
Bill Wang
Join Date: Aug 2014
Posts: 109
Rep Power: 12 |
Dear,
I have have met a problem in version 4.1.0 on a cluster to compile a new solver. Code:
g++ -std=c++0x -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 -O3 -DNoRepository -ftemplate-depth-100 -I/cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/finiteVolume/lnInclude -I/cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/meshTools/lnInclude -IlnInclude -I. -I/cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/OpenFOAM/lnInclude -I/cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/OSspecific/POSIX/lnInclude -fPIC -c myIcoFoam.C -o Make/linux64GccDPInt32Opt/myIcoFoam.o In file included from /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/OpenFOAM/lnInclude/sphericalTensor.H:39, from /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/OpenFOAM/lnInclude/fieldTypes.H:36, from /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/OpenFOAM/lnInclude/flipOp.H:40, from /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/OpenFOAM/lnInclude/mapDistributeBaseTemplates.C:29, from /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/OpenFOAM/lnInclude/mapDistributeBase.H:488, from /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/OpenFOAM/lnInclude/Field.C:30, from /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/OpenFOAM/lnInclude/Field.H:405, from /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/OpenFOAM/lnInclude/scalarField.H:38, from /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/OpenFOAM/lnInclude/dimensionSet.H:46, from /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/OpenFOAM/lnInclude/dimensionedType.H:40, from /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/OpenFOAM/lnInclude/dimensionedScalar.H:38, from /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/OpenFOAM/lnInclude/TimeState.H:38, from /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/OpenFOAM/lnInclude/Time.H:47, from /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/finiteVolume/lnInclude/fvCFD.H:6, from myIcoFoam.C:32: /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/OpenFOAM/lnInclude/Identity.H:80: error: only declarations of constructors can be 'explicit' /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/OpenFOAM/lnInclude/Identity.H:86: error: only declarations of constructors can be 'explicit' In file included from /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/finiteVolume/lnInclude/fvCFD.H:7, from myIcoFoam.C:32: /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/finiteVolume/lnInclude/fvMesh.H:381: error: using 'typename' outside of template In file included from /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/finiteVolume/lnInclude/surfaceInterpolate.H:41, from /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/finiteVolume/lnInclude/fvc.H:39, from /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/finiteVolume/lnInclude/fvCFD.H:8, from myIcoFoam.C:32: /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/finiteVolume/lnInclude/surfaceInterpolationScheme.H:262: error: using 'typename' outside of template In file included from /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/finiteVolume/lnInclude/surfaceInterpolationScheme.C:29, from /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/finiteVolume/lnInclude/surfaceInterpolationScheme.H:304, from /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/finiteVolume/lnInclude/surfaceInterpolate.H:41, from /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/finiteVolume/lnInclude/fvc.H:39, from /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/finiteVolume/lnInclude/fvCFD.H:8, from myIcoFoam.C:32: /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/OpenFOAM/lnInclude/geometricOneField.H:88: error: using 'typename' outside of template In file included from /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/OpenFOAM/lnInclude/geometricOneField.H:137, from /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/finiteVolume/lnInclude/surfaceInterpolationScheme.C:29, from /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/finiteVolume/lnInclude/surfaceInterpolationScheme.H:304, from /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/finiteVolume/lnInclude/surfaceInterpolate.H:41, from /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/finiteVolume/lnInclude/fvc.H:39, from /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/finiteVolume/lnInclude/fvCFD.H:8, from myIcoFoam.C:32: /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/OpenFOAM/lnInclude/geometricOneFieldI.H:68: error: using 'typename' outside of template /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/OpenFOAM/lnInclude/geometricOneFieldI.H: In member function 'Foam::oneField Foam::geometricOneField::primitiveField() const': /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/src/OpenFOAM/lnInclude/geometricOneFieldI.H:71: error: using 'typename' outside of template make: *** [Make/linux64GccDPInt32Opt/myIcoFoam.o] Error 1 Code:
1. module load openmpi/gcc/64/1.4.4 source /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/etc/bashrc 2. mkdir -p /home/ywang005/run 2. cp -r $FOAM_SOLVERS/incompressible/icoFoam /home/ywang005/run 3. cd /home/ywang005/run/icoFoam 4. mv icoFoam myIcoFoam 5. cd myIcoFoam 6. mv icoFoam.C myIcoFoam.C rm icoFoam.dep 7. sed -i s/icoFoam/myIcoFoam/g myIcoFoam.C 8. sed -i s/icoFoam/myIcoFoam/g Make/files 9.Make/files EXE= $(FOAM_APPBIN)/myIcoFoam EXE= $(FOAM_USER_APPBIN)/myIcoFoam 10.rm -rf linuxGccDPOpt 11. wclean wmake 12. After modification in the new solver, wmake again. Any suggestion would be appreciated. Thank you in advance. Best Regards, Bill |
|
February 11, 2017, 07:30 |
|
#2 |
Senior Member
|
Hi,
Could you post output of Code:
g++ --version Code:
source /cm/shared/contrib/apps/openfoam/4.1/OpenFOAM-4.1/etc/bashrc |
|
February 11, 2017, 09:40 |
gcc version
|
#3 | |
Senior Member
Bill Wang
Join Date: Aug 2014
Posts: 109
Rep Power: 12 |
Quote:
Code:
$ gcc --version gcc (GCC) 4.4.6 Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ g++ --version g++ (GCC) 4.4.6 Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Any info needed, please let me know. Best Regards, Bill |
||
February 11, 2017, 13:40 |
|
#4 | |
Senior Member
|
Take a look at
http://openfoam.org/download/source/...r-compilation/ The first requirement: Quote:
|
||
February 11, 2017, 14:07 |
|
#5 | |
Senior Member
Bill Wang
Join Date: Aug 2014
Posts: 109
Rep Power: 12 |
Quote:
I will post here if I solved my problem. I am really appreciated for your kind help. |
||
February 13, 2017, 12:32 |
|
#6 | |
Senior Member
Bill Wang
Join Date: Aug 2014
Posts: 109
Rep Power: 12 |
Quote:
I have load the module gcc/4.8.2 and there is no error any more for the compilation. But when I use the new solver, there is this error Code:
'functions' entry is not a dictionary file: /home/ywang005/run/UC/Re29000/system/controlDict from line 18 to line 106. From function bool Foam::functionObjectList::read() in file db/functionObjects/functionObjectList/functionObjectList.C at line 582. FOAM exiting I have tested the new solver with another version 3.0.1 with the same procedure, there is no such error; Could you please help me out on this? Thank you in advance. |
||
February 13, 2017, 16:06 |
|
#7 |
Senior Member
|
Do I get you right:
- if you execute stock icoFoam, your case works. - if you take stock icoFoam, rename it into myIcoFoam, recompile, you case stops working. Looks quite strange. Yet, the error explains itself: functions should be dictionary. Since you did not post your case, there is nothing to add. |
|
February 20, 2017, 04:20 |
|
#8 |
Senior Member
Bill Wang
Join Date: Aug 2014
Posts: 109
Rep Power: 12 |
Sorry about the delay. But I was on a trip.
Yes, Mr. Matveichev. This is totally what I mean. I have tried to upload my case files, but it is larger than the limit. Attached is the controlDict file which include the "function" problem. Thank you in advance. Last edited by 6863523; February 20, 2017 at 05:02. Reason: wrong files |
|
February 20, 2017, 05:10 |
after deleting the functions part in controlDict file
|
#9 |
Senior Member
Bill Wang
Join Date: Aug 2014
Posts: 109
Rep Power: 12 |
I have tested that the problem occurs when I use the functions in controlDict.
There is a difference of the functions part for version 3.0.1 and 4.x. In addition, after deleting the functions part in controlDict file, I am able to run my case with the command myIcoFoam. However, when I run the bash script with the command Code:
$ chmod +x UCRe29000.sh $ sh ./UCRe29000.sh Attached is the bash script. Any suggestion is appreciated. Thank you in advance. |
|
February 20, 2017, 08:37 |
|
#10 |
Senior Member
|
Hi,
1. I do not have 3.0.x installed, so I can not check if there were any changes in function description syntax. Yet OpenFOAM explain the error to you: Code:
'functions' entry is not a dictionary 2. Did not understands your problem with shell file. Any way it is easier and more effective to ask cluster admins to help with your cluster. |
|
February 20, 2017, 09:17 |
|
#11 | |
Senior Member
Bill Wang
Join Date: Aug 2014
Posts: 109
Rep Power: 12 |
Quote:
I somehow find that for version 3.0.1, the "functions" in controlDict is followed by "()", however, for version 4.x, it is followed by "{}". 2. I have contacted the cluster admins in our lab, it seems that they have no experience with such problems, since they never used OpenFOAM. Do you happen to know some experts in this forum and recommend to me? Thank you in advance. Best Regards, Bill |
||
February 20, 2017, 09:33 |
|
#12 |
Senior Member
|
1. I do not know, where did you find YOUR controlDict, yet in 3.0.x functions is also dictionary, example: https://github.com/OpenFOAM/OpenFOAM...ontrolDict#L49
2. First you can try to explain in more details: what you are trying to achieve and what is the error. Current Code:
it does not run, I have put the script under the working directory. |
|
February 20, 2017, 10:04 |
|
#13 |
Senior Member
Bill Wang
Join Date: Aug 2014
Posts: 109
Rep Power: 12 |
1. The controlDict file was used for version 2.2.0, but even if I used it on version 3.0.1, there is no error information and the results are good.
However, it does not work for version 4.x. 2. I am trying to execute the bash script to start the simulation. The commands to execute the shell script are listed at #9. However, after the commands, the case is reluctant to run. Code:
[ywang005@avakas-frontend2 Re29000]$ chmod +x UCRe29000.sh [ywang005@avakas-frontend2 Re29000]$ sh ./UCRe29000.sh Any info needed, please let me know. Thank you in advance. |
|
February 20, 2017, 10:34 |
|
#14 | |
Senior Member
|
1. In 3.0.x there was piece of fallback code for functions in a list. In 4.x this piece was removed.
2. You are still playing the game "hey, guess, what I have done wrong!". Quote:
|
||
February 20, 2017, 10:51 |
|
#15 | |
Senior Member
Bill Wang
Join Date: Aug 2014
Posts: 109
Rep Power: 12 |
Quote:
There is no error information. Like what I said in my previous post, the case should be decomposed and there should be processor directories, since the parallel running command is included in the script. But after executing the commands, no new files are generated. This is how I judge it is reluctant to run. Or maybe there are ways to determine the case is running or not. |
||
February 20, 2017, 10:56 |
|
#16 |
Senior Member
|
And why do you think, that your case is executed immediately and is not placed into the queue?
|
|
February 20, 2017, 11:02 |
|
#17 |
Senior Member
Bill Wang
Join Date: Aug 2014
Posts: 109
Rep Power: 12 |
||
February 20, 2017, 11:15 |
|
#18 |
Senior Member
Bill Wang
Join Date: Aug 2014
Posts: 109
Rep Power: 12 |
Code:
[ywang005@avakas-frontend1 ~]$ qstat -t -u $USER master.cm.cluster: Req'd Req'd Elap Job ID Username Queue Jobname SessID NDS TSK Memory Time S Time -------------------- -------- -------- ---------------- ------ ----- --- ------ ----- - ----- 5802151.master.c ywang005 visu simple-turbovnc. 93259 1 1 -- 23:59 R 04:53 [ywang005@avakas-frontend1 ~]$ Code:
qstat -t -u $USER But the job of the bash script is not included. |
|
February 20, 2017, 11:25 |
|
#19 | |
Senior Member
Bill Wang
Join Date: Aug 2014
Posts: 109
Rep Power: 12 |
Quote:
HTML Code:
OpenFOAM-3.0.1 supports the very old list format for backward compatibility but the recommended and documented format is the newer and more flexible dictionary format. In OpenFOAM-4.? the old list format is no longer supported due to the maintenance overhead of indefinite backward compatibility. |
||
February 21, 2017, 06:10 |
|
#20 |
Senior Member
Bill Wang
Join Date: Aug 2014
Posts: 109
Rep Power: 12 |
The function error part has been solved, as seen
how to calculate the volume averaged values in version 4.1 The only left problem is how to execute the bash script. Thank you in advance. Best, Bill |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Unable to compile solver | hwsv07 | OpenFOAM Programming & Development | 10 | February 21, 2018 10:41 |
Hybrid discretisation - blend factor | gcoopermax | CFX | 5 | September 23, 2016 09:05 |
paraview installation woes | vex | OpenFOAM Installation | 15 | January 30, 2011 08:11 |
bubbleFoam validation case | balkrishna | OpenFOAM Running, Solving & CFD | 24 | August 30, 2010 05:37 |
How to compile an unsteady solver based on solver of MRFSimpleFoam? | renyun0511 | OpenFOAM Running, Solving & CFD | 0 | April 27, 2010 12:16 |