Trouble compiling utilities using source-built OpenFOAM
Hi,
I've just built OF 2.2.2 from source on my University's cluster. Everything went much smoother than expected, foamInstallationTest returned no problems, I ran the cavity tutorial OK, echo'ed most of the environment variables and they seem OK too. When I try recompiling icoFoam as myIcoFoam I get the following: Code:
Making dependency list for source file myIcoFoam.C Strangely enough, the compiled utility works. I ran the cavity tutorial with it successfully. Hence I am not sure whether I should just ignore these warnings or will they cause problems for me in the future? Any advice will be much appreciated, A EDIT: I didn't say that it's the "cannot open file" that I'm worried about, not the "unused variable" warnings... |
Greetings Artur,
Uhm... it specifically says it's just a warning ;): Quote:
Quote:
Bruno |
Hi,
Thanks for the answer. In my question I was referring to the "cannot open file" highlighted in red, sorry I didn't make it very clear. Best wishes, A |
Hi Artur,
Quote:
Quick question: did you run wclean before wmake? If not, this could be the reason for those messages. I actually ended up learning to ignore those particular messages, because that only occurs on the pre-calculation of dependencies section: Code:
Making dependency list for source file AFAIK, this issue usually occurs for roughly 2 reasons:
I can try to have a better look into this, so I could use some more information on the exact steps you've taken:
Bruno |
Thanks a lot for the exhaustive answer. In reply to your questions:
1. I did simply copy the original solver into OpenFOAM/artur-2.2.2/applications, and then ran wclean, rmdepall and wmake it; this is what I always do when compiling stuff on a newly set up OpenFOAM release and I never ran into this problem before I started using this cluster. 2. the cluster I'm using uses Redhat Enterprise 5 Linux 3. the test you recommended returns (akl1g09 is my user name; no, I didn't get to choose it :P): Code:
[akl1g09@blue32 ~]$ ls -l /bin/sh Code:
.SUFFIXES: .c .cc .cxx .cpp .C .F .f .dep A P.S. I just noticed that the WMAKE_BIN is not defined in my path, when I try to echo it, it returns a null value. I suppose this might be a problem... I'll try to explore it a bit and compare with other linux machines I have with OF on them. P.P.S. on my home machine the WMAKE_BIN also cannot be echo'ed but the same test (recompiling icoFoam) doesn't complain about not being able to open the headers... (on this machine I installed OF using apt-get install - it's Ubuntu 12.04). |
Hi Artur,
Quote:
Quote:
Code:
ls -l $WM_DIR/platforms/$WM_ARCH$WM_COMPILER Code:
dirToString Best regards, Bruno |
Thanks a lot for your support and willingness to help, I really appreciate that!
I do have all the three files you mentioned located in that directory. All the best, A |
Hi Artur,
If you edit the file "wmake/rules/General/sourceToDep" and change this line: Code:
MKDEP = $(WMAKE_BIN)/wmkdep -I$(*D) $(LIB_HEADER_DIRS) Code:
MKDEP = echo "||| $(WMAKE_BIN)/wmkdep -I$(*D) $(LIB_HEADER_DIRS) |||"; $(WMAKE_BIN)/wmkdep -I$(*D) $(LIB_HEADER_DIRS) Code:
wclean Code:
||| /home/user/OpenFOAM/OpenFOAM-2.2.x/wmake/platforms/linux64Gcc/wmkdep -I. -I/home/user/OpenFOAM/OpenFOAM-2.2.x/src/finiteVolume/lnInclude -I/home/user/OpenFOAM/OpenFOAM-2.2.x/src/sampling/lnInclude -IlnInclude -I. -I/home/user/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude -I/home/user/OpenFOAM/OpenFOAM-2.2.x/src/OSspecific/POSIX/lnInclude ||| Please check what you get on your side. From what I can see, the source code of "wmake/src/wmkdep.l" doesn't reveal any specific coding problems that might occur, so my guess is that it's the provided paths through "wmake/rules/General/sourceToDep" that are broken somehow. Best regards, Bruno |
Hi Bruno,
Thanks a lot for spending your time to look into this. I followed your suggestion and modified the sourceToDep file. The output of the compiler returns: Code:
||| /home/akl1g09/OpenFOAM/OpenFOAM-2.2.2/wmake/platforms/linux64Gcc/wmkdep -I. -I/home/akl1g09/OpenFOAM/OpenFOAM-2.2.2/src/finiteVolume/lnInclude -I/home/akl1g09/OpenFOAM/OpenFOAM-2.2.2/src/sampling/lnInclude -I/home/akl1g09/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude -IlnInclude -I. -I/home/akl1g09/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude -I/home/akl1g09/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/lnInclude ||| I rand the bin/foamInstallationTest script again and went through the output once more, here's what it's got to say: Code:
Executing ./foamInstallationTest: Not sure what to check next to be honest. All the best, Artur |
Hi Artur,
I had a better look into this on Windows and then I saw and remembered what the problem is: the wmkdep utility needs to open way more than 100 files at the same time :rolleyes: And the reason why it gives those messages is because it's no longer able to open any more files. This is known by the veterans who use OpenFOAM technology and usually easily forgotten :rolleyes: Here's a thread on this topic: http://www.cfd-online.com/Forums/ope...pen-files.html So, the solution? Try running this command before wmake on the cluster: Code:
ulimit -n 1024 Best regards, Bruno |
That makes so much sense... Thanks a lot for helping me in understanding the issue.
As I try running Code:
ulimit -n 1024 Code:
ulimit -n Do you think that this may cause to me receiving some random linker errors in the future or should I just ignore it? I suppose I could try emailing the system administrators to ask them to change the settings for my profile but I don't think they would do that :p Best wishes, Artur |
Hi Artur,
Well, from my experience, this issue doesn't break the building process. All it does is to not create a full list of dependencies for each source code file, which will force you to rebuild your custom utility. This usually happens in case you are using OpenFOAM 2.2.x and do a git pull + Allwmake. In other words: if the base OpenFOAM source changes, wmake won't be fully aware if myIcoFoam needs to be rebuilt or not. Best regards, Bruno |
I see. It's good to know that. Fortunately I don't plan on modifying any of the very base OF files in the foreseeable future.
Thanks again for all your help, Artur |
Hi Artur,
I haven't managed to test this myself, but there is something I'm wondering about. There are two similarly named utilities in OpenFOAM wmake toolkit: Code:
wmkdep Therefore, in theory, if in the file "wmake/rules/General/sourceToDep" we replace wmkdep for wmkdepend, perhaps the messages do not show up and the desired functionality will occur. But as I said, I have not tested this yet myself. Best regards, Bruno |
That actually worked! Making the dependency list takes longer than it does with wmakedep (as one would expect) but no "cannot open file" messages appear. Thanks again for all your help!
Best wishes, Artur |
All times are GMT -4. The time now is 02:40. |