|
[Sponsors] |
August 17, 2007, 10:02 |
I'm trying to install OpenFOAM
|
#1 |
Member
Fabian Peng Karrholm
Join Date: Mar 2009
Posts: 61
Rep Power: 17 |
I'm trying to install OpenFOAM 1.4.1, and I'm having issues recompiling some libraries I've made some minor additions to (it's not the changes that's causing it though, recompiling any library gives me several error messages, see sample below). It seems that the .dep files are generated without including everything that's needed, and thus the compiler thinks that many things are undefined. I get somewhat further (get rid of some error messages) by copying the old dep files from my old version of OpenFOAM, but this feels like a very temporary and odd solution that requires ALOT of manual work to get it right.
I noticed that there has been some major revisions to wmake, but that should only concern parallel compilations, right? I tried with the old version of wmake but that didn't help. I also tried reverting to gcc 4.1.2, but that didn't change anything either. I've checked that I use gcc 4.2.1 and opensuse 10.2, and I haven't found anything in the release notes mentioning anything about this. I should say that this is on a login-machine with 4 processors on a cluster, and it's extremely lagged. Where should I look for what could be causing this? It worked ok with OF 1.3 Sample of errors: In file included from parcel/parcel.C:27: parcel/parcel.H:51: error: expected template-name before '<' token parcel/parcel.H:51: error: expected `{' before '<' token parcel/parcel.H:51: error: expected unqualified-id before '<' token parcel/parcel.H:369: error: expected initializer before '<' token parcel/parcel.H:376: error: expected initializer before '<' token In file included from parcel/parcel.H:385, from parcel/parcel.C:27: parcel/parcelI.H:34: error: expected initializer before '<' token parcel/parcelI.H:39: error: 'scalar' does not name a type |
|
August 20, 2007, 14:37 |
wmkdep (dependency generator)
|
#2 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
wmkdep (dependency generator) is run always on the local machine but compilation is distributed (if you have WM_SCHEDULER defined) so perhaps it is an NFS/filing system issue.
Check if it works ok on one processor (unset WM_NCOMPROCS). |
|
August 21, 2007, 10:43 |
Thanks for your reply. I reali
|
#3 |
Member
Fabian Peng Karrholm
Join Date: Mar 2009
Posts: 61
Rep Power: 17 |
Thanks for your reply. I realized I made a mistake before, the cluster does not run Suse 10.2, I'm not sure which linux version it is but the kernel is 2.6.9-42.ELsmp. Is there any point in compiling my own version of gcc?
I have not set WM_NCOMPROCS or WM_SCHEDULER, I tried including "." in my $PATH, but that didn't change anything. It seems as if the compiler doesn't include files properly. Example: It complains on this line in atomicWeights.H: public HashTable<scalar> the error it reports is that HashTable is not an acceptable template name (expected template-name before '<' token), and I'm guessing this has to do with it having ignored to include HashTable.H, which is done a couple of lines above. /Fabian |
|
August 21, 2007, 18:36 |
You running the correct c++ ve
|
#4 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
You running the correct c++ version? Or otherwise it might be a good idea to compie your own.
First thing I would check is whether wmkdep runs correctly (since your .dep files are incorrect if I remember correctly). Recompile/relink it and see if that helps. Next see how it is invoked from the $WM_DIR/Makefile and 'valgrind' it. |
|
August 22, 2007, 11:56 |
I am running the gcc that came
|
#5 |
Member
Fabian Peng Karrholm
Join Date: Mar 2009
Posts: 61
Rep Power: 17 |
I am running the gcc that came with OF 1.4.1, sorry for the ambiguity regarding who's version.
I found out after playing around with wmkdep a bit (I did recompile it) that it doesn't link anything but the files listed in the .C file, so for instance for atomicWeights.C (and .H), the .dep file contains scalar.H, Hashtable.H and atomicWeights.H. The .dep file created by the 1.3.2 compiler contains the entire OpenFOAM/lnInclude directory. I ran valgrind on the make command that creates the .dep file, which gave the memory adresses in hex-format of some errors. Running wmkdep on its own (it produces the same .dep as the make command did) returns no errors, and doesn't really produce anything I can work with except that informs me there are no memory leaks. I have to admit, I'm not sure what I'm looking for really. If it gave more detailed output on how it creates the dep files perhaps it would be of use, but perhaps I need to recompile something using debug flags? /Fabian |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
MultiComponenMixturecellMixture not working properly | dominik_christ | OpenFOAM Running, Solving & CFD | 1 | August 6, 2008 05:25 |
How to properly specify number of positions for pa | Piti | CFX | 2 | January 12, 2008 12:11 |
How can I set the converge criteria properly? | Alina | FLUENT | 3 | September 7, 2007 17:55 |
Has anybody made an openfoam live CD | connclark | OpenFOAM Running, Solving & CFD | 2 | June 19, 2007 12:40 |
Self-made codes vs. commercial | John Van Workum | Main CFD Forum | 27 | April 1, 2001 22:23 |