View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001846 | OpenFOAM | [All Projects] Bug | public | 2015-09-04 20:45 | 2015-10-04 22:12 |
Reporter | user1230 | Assigned To | henry | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | GNU/Linux | OS | Ubuntu | OS Version | 15.04 |
Product Version | dev | ||||
Fixed in Version | dev | ||||
Summary | 0001846: OpenFOAM fails to build on ppc64le | ||||
Description | Although it was enabled for PPC64LE, OpenFOAM does not build flawlessly on ppc64le. I am aware that these errors are due to lack of linking when building, but I cannot find the way to add those libs in the build system. I followed the procedures of http://www.openfoam.org/download/git.php PS: I am not sure how important this is, but I also had to install libptscotch-dev | ||||
Steps To Reproduce | On a ppc64le machine, after all set: cd $WM_PROJECT_DIR ./Allwmake | ||||
Additional Information | I am attaching the second time I ran the script, because it shows mainly the errors and I ran it without parallel jobs. | ||||
Tags | No tags attached. | ||||
2015-09-04 20:45
|
OpenFOAM.log (168,093 bytes) |
|
Many thanks for providing the log file with the summary output, it certainly makes it a lot easier to diagnose the issues. Can you please also provide the output you get for the following commands: ld --version ls -l $(which ld) I ask this because the issue you're getting is potentially due to your system being configured to use "ld.gold" by default. If this is the case, then the problem is that this linker is not supported for building OpenFOAM, because only "ld.bfd" supports the auto-link as needed feature that OpenFOAM relies on. If your system is using "ld.bfd" by default, then the fix should be as follows: 1- Edit the file "wmake/rules/linuxPPC64leGcc/c++" 2- Change the last two lines: LINKLIBSO = $(CC) $(c++FLAGS) -shared LINKEXE = $(CC) $(c++FLAGS) -Xlinker --add-needed to this: LINKLIBSO = $(CC) $(c++FLAGS) -shared -Xlinker --add-needed -Xlinker --no-as-needed LINKEXE = $(CC) $(c++FLAGS) -Xlinker --add-needed -Xlinker --no-as-needed 3- Save and close the file. 4- Delete the built library binaries with this command, so that they are linked again: rm -r $FOAM_LIBBIN Now try running "Allwmake" once again. Please let us know if this fixes the problem or not. |
2015-09-08 20:09
|
OpenFOAM.tar.gz (20,480 bytes) |
|
Hello! Thanks for the quick response. Please, diregard the file OpenFOAM.tar.gz I attached. I messed it all up. Checked per your advice: # ld --version GNU ld (GNU Binutils for Ubuntu) 2.25 Copyright (C) 2014 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) a later version. This program has absolutely no warranty. # ls -l $(which ld) lrwxrwxrwx 1 root root 6 Apr 10 15:42 /usr/bin/ld -> ld.bfd So, I followed the steps you provided. The full log is attached as OpenFOAM_1.tar.gz The outcome was better, although there were still some errors like: /usr/bin/ld: cannot find -lreactingTwoPhaseSystem collect2: error: ld returned 1 exit status /root/OpenFOAM/OpenFOAM-dev/wmake/Makefile:162: recipe for target '/root/OpenFOAM/OpenFOAM-dev/platforms/linuxPPC64leGccDPInt32Opt/lib/libreactingEulerianInterfacialModels.so' failed make[2]: *** [/root/OpenFOAM/OpenFOAM-dev/platforms/linuxPPC64leGccDPInt32Opt/lib/libreactingEulerianInterfacialModels.so] Error 1 make[2]: Leaving directory '/root/OpenFOAM/OpenFOAM-dev/applications/solvers/multiphase/reactingEulerFoam/interfacialModels' Sorry for the long log. |
2015-09-08 20:16
|
OpenFOAM_1.tar.gz (112,242 bytes) |
|
I've isolated this second problem and it also happens in the x86_64 architecture. There is a somewhat circular dependency, which is why the libraries complain about a missing library that is only built afterwards. For now, to work around the issue, run twice the main "Allwmake" script with the "-k" option: ./Allwmake -k > log.make 2>&1 ./Allwmake -k > log.make 2>&1 This will build regardless of errors and hopefully the second pass will solve the missing dependencies. Nonetheless, I haven't had the time to diagnose why this is happening... but it's probable this is something that is ongoing and will be fixed sometime in the near future: https://twitter.com/CFDdirect/status/641563511861153792 |
|
That indeed solved it. The second time I ran Allwmake, the build completed. Is there a unit test I can run? I wanted to check if it is effectively working in ppc64le arch. Thanks! |
|
c++ (790 bytes)
SUFFIXES += .C c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof # Suppress some warnings for flex++ and CGAL c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds CC = g++ -m64 -mcpu=power8 include $(RULES)/c++$(WM_COMPILE_OPTION) ptFLAGS = -DNoRepository -ftemplate-depth-100 c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@ cxxtoo = $(Ctoo) cctoo = $(Ctoo) cpptoo = $(Ctoo) LINK_LIBS = $(c++DBUG) LINKLIBSO = $(CC) $(c++FLAGS) -shared -Xlinker --add-needed -Xlinker --no-as-needed LINKEXE = $(CC) $(c++FLAGS) -Xlinker --add-needed -Xlinker --no-as-needed |
|
@ferseiti: The cyclic dependency issue has been fixed yesterday, in commit cc5f67a0ff62. If you do a git pull and run "Allwmake" again, without the need of the "-k" option. As for a unit test, the simplest is given in installation instructions: http://www.openfoam.org/download/git.php - namely: mkdir -p $FOAM_RUN cp -r $FOAM_TUTORIALS $FOAM_RUN cd $FOAM_RUN/tutorials/incompressible/icoFoam/cavity blockMesh icoFoam paraFoam For testing running in parallel, you've got several tutorials, including on the User Guide, but the tutorial "incompressible/simpleFoam/motorBike" should do the trick: cd $FOAM_RUN/tutorials/incompressible/simpleFoam/motorBike ./Allrun @Henry: Attached is the file "c++" which is a replacement for the one in the folder "wmake/rules/linuxPPC64leGcc", as addressed in the previous comments, i.e. linker options for automatic linking to undeclared dependant libraries. |
|
Thanks for the updates. Resolved by commit 2ead55ceb903b16e18523c4ec1172a045b215ea2 |
|
@Henry: Uhm... I'm not sure how it happened (an auto-complete accident?), but the file was committed with the wrong name "wmake/rules/linuxPPC64leGcc/linuxPPC64leGcc", when it should be "wmake/rules/linuxPPC64leGcc/c++". |
|
Resolved by commit 82855f6acab3dbd2f53e3826cc9b283f159c193d |
|
Guys, sorry for reopening, but this was the only way I can inform you about this. Bruno Santos, or whoever was responsible for resolving this can claim their bounty at https://www.bountysource.com/issues/26593943-openfoam-fails-to-build-on-ppc64le Thanks and regards. |
|
@ferseiti: Many thanks for the bounty! I certainly wasn't expecting this, which is why it took so long to get back to this. I've signed up on Bounty Source and I'm currently trying to figure out how it works in order to claim the bounty. I'll close this issue again as "fixed", so that the bounty can be claimed. @Bounty Source admins/system: The commits pointed out by Henry in the previous comments are these two: - https://github.com/OpenFOAM/OpenFOAM-dev/commit/2ead55ceb903b16e18523c4ec1172a045b215ea2 - https://github.com/OpenFOAM/OpenFOAM-dev/commit/82855f6acab3dbd2f53e3826cc9b283f159c193d |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-09-04 20:45 |
|
New Issue | |
2015-09-04 20:45 |
|
File Added: OpenFOAM.log | |
2015-09-04 23:28 | wyldckat | Note Added: 0005333 | |
2015-09-08 20:09 |
|
File Added: OpenFOAM.tar.gz | |
2015-09-08 20:15 |
|
Note Added: 0005344 | |
2015-09-08 20:16 |
|
File Added: OpenFOAM_1.tar.gz | |
2015-09-10 00:19 | wyldckat | Note Added: 0005350 | |
2015-09-11 13:56 |
|
Note Added: 0005351 | |
2015-09-12 13:08 | wyldckat | File Added: c++ | |
2015-09-12 13:15 | wyldckat | Note Added: 0005352 | |
2015-09-12 13:15 | wyldckat | Assigned To | => henry |
2015-09-12 13:15 | wyldckat | Status | new => assigned |
2015-09-12 23:34 | henry | Note Added: 0005355 | |
2015-09-12 23:34 | henry | Status | assigned => resolved |
2015-09-12 23:34 | henry | Resolution | open => fixed |
2015-09-13 20:35 | wyldckat | Note Added: 0005356 | |
2015-09-13 20:35 | wyldckat | Status | resolved => feedback |
2015-09-13 20:35 | wyldckat | Resolution | fixed => reopened |
2015-09-13 21:22 | henry | Note Added: 0005357 | |
2015-09-13 21:22 | henry | Status | feedback => resolved |
2015-09-13 21:22 | henry | Resolution | reopened => fixed |
2015-09-16 19:52 |
|
Note Added: 0005359 | |
2015-09-16 19:52 |
|
Status | resolved => feedback |
2015-09-16 19:52 |
|
Resolution | fixed => reopened |
2015-10-04 22:12 | wyldckat | Note Added: 0005383 | |
2015-10-04 22:12 | wyldckat | Status | feedback => resolved |
2015-10-04 22:12 | wyldckat | Fixed in Version | => dev |
2015-10-04 22:12 | wyldckat | Resolution | reopened => fixed |