Skip to content

Commit

Permalink
Fix some external packages (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
chengcli authored Dec 7, 2024
1 parent 03102a9 commit 8fc2add
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
15 changes: 9 additions & 6 deletions cmake/compilers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)

if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
set(CMAKE_CXX_FLAGS_RELEASE
"-O3 -funroll-loops -funroll-all-loops -fstrict-aliasing")
"-O3 -funroll-loops -funroll-all-loops -fstrict-aliasing -pthread")
set(CMAKE_C_FLAGS_RELEASE
"-O3 -funroll-loops -funroll-all-loops -fstrict-aliasing")
"-O3 -funroll-loops -funroll-all-loops -fstrict-aliasing -pthread")

set(CMAKE_CXX_FLAGS_DEBUG "-g3")
set(CMAKE_C_FLAGS_DEBUG "-g3")

set(CMAKE_CXX_FLAGS_RELEASE
"${CMAKE_CXX_FLAGS_RELEASE} -D_GLIBCXX_USE_CXX11_ABI=0")
set(CMAKE_CXX_FLAGS_DEBUG
"${CMAKE_CXX_FLAGS_DEBUG} -D_GLIBCXX_USE_CXX11_ABI=0")

# set(CMAKE_Fortran_FLAGS_RELEASE "-O3" )
set(KNOWN_COMPILER TRUE)
endif()
Expand All @@ -37,10 +42,8 @@ endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
add_link_options("-fuse-ld=lld")
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
set(CMAKE_CXX_FLAGS_RELEASE
"-O3 -lstdc++")
set(CMAKE_C_FLAGS_RELEASE
"-O3 -lstdc++")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -lstdc++")
set(CMAKE_C_FLAGS_RELEASE "-O3 -lstdc++")

set(CMAKE_CXX_FLAGS_DEBUG "-g3")
set(CMAKE_C_FLAGS_DEBUG "-g3")
Expand Down
10 changes: 6 additions & 4 deletions external/install_cantera.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,24 @@

CXX=g++
CC=gcc
cxx_flags=-std=c++17
prefix=${HOME}/opt/
boost_inc_dir=`pwd`/cantera/ext/cliboost/
python_package=y
f90_interface=n
system_eigen=n
system_blas_lapack=n
boost_inc_dir=`pwd`/cantera/ext/cliboost/
hdf_support=n

cd cantera
git submodule init ext/cliboost
git submodule update ext/cliboost

scons build CXX=${CXX} CC=${CC} cxx_flags=${cxx_flags} prefix=${prefix} \
scons build CXX=${CXX} CC=${CC} cxx_flags="-std=c++17 -D_GLIBCXX_USE_CXX11_ABI=0" \
python_package=${python_package} f90_interface=${f90_interface} \
system_eigen=${system_eigen} \
system_blas_lapack=${system_blas_lapack} \
boost_inc_dir=${boost_inc_dir} -j8
hdf_support=${hdf_support} \
prefix="${prefix}" \
boost_inc_dir="${boost_inc_dir}" -j8
scons install
cd ..
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ scons
sphinx_rtd_theme
torch
tqdm
wheel

0 comments on commit 8fc2add

Please sign in to comment.