|
[Sponsors] |
February 24, 2020, 05:50 |
SU2-7 build on CentOS-6.x
|
#1 |
New Member
Oren Peles
Join Date: Apr 2019
Posts: 4
Rep Power: 7 |
Is it possible to build SU2-7 on CentOS-6.x?
I keep getting ::aligned_alloc has not been declared from allocation_toolbox.hpp . build on CentOS-7 was successful SU2-6 build on CentOS-6.x was successful installing and using devtoolset-8 did not solve the problem. |
|
February 27, 2020, 02:59 |
|
#2 |
New Member
Muhammad Hilmi Al Fatih
Join Date: Apr 2019
Posts: 10
Rep Power: 7 |
Hey Oren.
I encounter the same problem as you (successfully built the su2-6 but not with su2-7 on centos 6). I assume that it is probably due to old compiler? Actually I am trying to build another compiler locally and add it to $PATH variable, but the meson build system still uses the old compiler. Do you have any idea on how to specify which compiler for meson build? I am sorry I am also a newbie in linux stuffs. If you have any update please let me know. |
|
February 27, 2020, 04:32 |
|
#3 |
Senior Member
Pedro Gomes
Join Date: Dec 2017
Posts: 466
Rep Power: 14 |
Yes this sounds like compiler problems, what compiler and version do you use? (attach the output from meson.py if you have no idea) The code compiles with gcc 4.8.5 by the way.
To force a compiler you can do: export CC=/path/to/c_compiler export CXX=/path/to/c++_compiler For mpi builds you may also need MPICC and MPICXX. More info here: https://mesonbuild.com/howtox.html If all this fails I can tell you what to change in the code. |
|
March 1, 2020, 08:30 |
|
#4 |
New Member
Oren Peles
Join Date: Apr 2019
Posts: 4
Rep Power: 7 |
Hey Pedro
Yes, If you can tell me what changes to make in the code, this will be very helpfully. |
|
March 2, 2020, 03:44 |
|
#5 |
New Member
Muhammad Hilmi Al Fatih
Join Date: Apr 2019
Posts: 10
Rep Power: 7 |
Hey Pedro and Oren,
Previously, I used gcc 4.4.7 and it build the ninja build directory successfully. The problem was during ninja execution that it cannot declare the aligned_alloc. I then installed the gcc 4.8.5 but then it cannot even compile the ninja. Here is the error. I wonder if you could help or give some suggestion on where to modify the code? Thank you. ./meson.py build -Denable-autodiff=true --prefix=/home/hilmi/software/su2/SU2-7. 0.1 -Denable-directdiff=true -Denable-pywrapper=true -Dwith-mpi=enabled -Denable-tecio=true -Denable-cgns=true ninja executable not found. Building ... bootstrapping ninja... c++: error: unrecognized command line option ‘-fstack-protector-strong’ c++: error: unrecognized command line option ‘-fno-plt’ when running: /home/hilmi/opt/gcc-4.8.5/bin/c++ -MMD -MT build/browse.o -MF build/browse.o.d -g -Wall -Wextra -Wno-deprecated -Wno-missing-field-initializers -Wno-unused-parameter -fno-rtti -fno-exceptions -fvisibility=hidden -pipe '-DNINJA_PYTHON="python3"' -O2 -DNDEBUG -DUSE_PPOLL -DNINJA_HAVE_BROWSE -I. -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/hilmi/anaconda3/include -c ./src/browse.cc -o build/browse.o Traceback (most recent call last): File "configure.py", line 470, in <module> objs += cxx('browse', order_only=built('browse_py.h')) File "configure.py", line 287, in cxx return n.build(built(name + objext), 'cxx', src(name + '.cc'), **kwargs) File "configure.py", line 169, in build self._run_command(self._expand(cmd, local_vars)) File "configure.py", line 194, in _run_command subprocess.check_call(cmdline, shell=True) File "/home/hilmi/anaconda3/lib/python3.7/subprocess.py", line 363, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '/home/hilmi/opt/gcc-4.8.5/bin/c++ -MMD -MT build/browse.o -MF build/browse.o.d -g -Wall -Wextra -Wno-deprecated -Wno-missing-field-initializers -Wno-unused-parameter -fno-rtti -fno-exceptions -fvisibility=hidden -pipe '-DNINJA_PYTHON="python3"' -O2 -DNDEBUG -DUSE_PPOLL -DNINJA_HAVE_BROWSE -I. -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/hilmi/anaconda3/include -c ./src/browse.cc -o build/browse.o' returned non-zero exit status 1. Traceback (most recent call last): File "./meson.py", line 60, in build_ninja subprocess.run([sys.path[0] + os.path.sep + 'ninja', '--version'], stdout=subprocess.PIPE) File "/home/hilmi/anaconda3/lib/python3.7/subprocess.py", line 488, in run with Popen(*popenargs, **kwargs) as process: File "/home/hilmi/anaconda3/lib/python3.7/subprocess.py", line 800, in __init__ restore_signals, start_new_session) File "/home/hilmi/anaconda3/lib/python3.7/subprocess.py", line 1551, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: '/home/hilmi/software/su2/SU2/ninja': '/home/hilmi/software/su2/SU2/ninja' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "./meson.py", line 74, in <module> build_ninja() File "./meson.py", line 64, in build_ninja shutil.copy(ninjapath+ os.path.sep + 'ninja', '.') File "/home/hilmi/anaconda3/lib/python3.7/shutil.py", line 248, in copy copyfile(src, dst, follow_symlinks=follow_symlinks) File "/home/hilmi/anaconda3/lib/python3.7/shutil.py", line 120, in copyfile with open(src, 'rb') as fsrc: FileNotFoundError: [Errno 2] No such file or directory: '/home/hilmi/software/su2/SU2/externals/ninja/ninja' |
|
March 2, 2020, 04:34 |
|
#6 |
Super Moderator
Tim Albring
Join Date: Sep 2015
Posts: 195
Rep Power: 11 |
Hi Muhammad,
you can try to use the ninja/meson installation provided by the cent os repository instead of the one shipped with SU2. Therefore, install meson and ninja using yum (i think thats the package manager in cent os): yum install meson yum install ninja Then, instead of calling the local `meson.py` script, use the following command to configure the build: meson build -Denable-autodiff=true --prefix=/home/hilmi/software/su2/SU2-7
__________________
Developer Director @ SU2 Foundation Get involved:
|
|
March 2, 2020, 07:08 |
|
#7 |
Senior Member
Pedro Gomes
Join Date: Dec 2017
Posts: 466
Rep Power: 14 |
Oren, replace "allocation_toolbox.hpp" with the attached file.
Then let me know what else fails (I'm sure there will be another issue or two). |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SU2 Parallel Build Install Issue | jclegg | SU2 | 4 | October 20, 2020 05:28 |
Parallel Build for SU2 on Ubuntu | McAero | SU2 | 11 | October 28, 2018 18:53 |
Building from Source on Windows using Cygwin64 | ericthefatguy | SU2 | 2 | May 12, 2015 19:23 |
SU2 3.0 build failure | waku2005 | SU2 Installation | 4 | January 24, 2014 13:40 |
Can I compile SU2 in CentOS? | sxhqjfl | SU2 Installation | 2 | April 11, 2013 20:23 |