CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > SU2

SU2-7 build on CentOS-6.x

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 24, 2020, 04:50
Default SU2-7 build on CentOS-6.x
  #1
New Member
 
Oren Peles
Join Date: Apr 2019
Posts: 4
Rep Power: 6
oren is on a distinguished road
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.
oren is offline   Reply With Quote

Old   February 27, 2020, 01:59
Default
  #2
New Member
 
Muhammad Hilmi Al Fatih
Join Date: Apr 2019
Posts: 10
Rep Power: 7
hilmialf is on a distinguished road
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.
hilmialf is offline   Reply With Quote

Old   February 27, 2020, 03:32
Default
  #3
pcg
Senior Member
 
Pedro Gomes
Join Date: Dec 2017
Posts: 465
Rep Power: 13
pcg is on a distinguished road
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.
pcg is offline   Reply With Quote

Old   March 1, 2020, 07:30
Default
  #4
New Member
 
Oren Peles
Join Date: Apr 2019
Posts: 4
Rep Power: 6
oren is on a distinguished road
Hey Pedro
Yes, If you can tell me what changes to make in the code, this will be very helpfully.
oren is offline   Reply With Quote

Old   March 2, 2020, 02:44
Default
  #5
New Member
 
Muhammad Hilmi Al Fatih
Join Date: Apr 2019
Posts: 10
Rep Power: 7
hilmialf is on a distinguished road
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'
hilmialf is offline   Reply With Quote

Old   March 2, 2020, 03:34
Default
  #6
Super Moderator
 
Tim Albring
Join Date: Sep 2015
Posts: 195
Rep Power: 10
talbring is on a distinguished road
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:
talbring is offline   Reply With Quote

Old   March 2, 2020, 06:08
Default
  #7
pcg
Senior Member
 
Pedro Gomes
Join Date: Dec 2017
Posts: 465
Rep Power: 13
pcg is on a distinguished road
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).
Attached Files
File Type: txt allocation_toolbox_PATCH.txt (1.7 KB, 23 views)
pcg is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SU2 Parallel Build Install Issue jclegg SU2 4 October 20, 2020 04:28
Parallel Build for SU2 on Ubuntu McAero SU2 11 October 28, 2018 17:53
Building from Source on Windows using Cygwin64 ericthefatguy SU2 2 May 12, 2015 18:23
SU2 3.0 build failure waku2005 SU2 Installation 4 January 24, 2014 12:40
Can I compile SU2 in CentOS? sxhqjfl SU2 Installation 2 April 11, 2013 19:23


All times are GMT -4. The time now is 04:25.