SU2-7 build on CentOS-6.x
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. |
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. |
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. |
Hey Pedro
Yes, If you can tell me what changes to make in the code, this will be very helpfully. |
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' |
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 |
1 Attachment(s)
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). |
All times are GMT -4. The time now is 16:11. |