Closed bjdarrer closed 7 years ago
This has been partly solved by disabling TPL 'Boost' with:
-DTPL_ENABLE_Boost=OFF
and disabling TPL 'Matio' with:
-DTPL_ENABLE_Matio=OFF
in the configuration file do_configure_7.sh
:
cmake \
-DCMAKE_C_COMPILER=/usr/bin/gcc \
-DCMAKE_CXX_COMPILER=/usr/bin/g++ \
-DCMAKE_Fortran_COMPILER=/usr/bin/gfortran \
-DTrilinos_ENABLE_ALL_PACKAGES=ON \
-DTPL_ENABLE_Boost=OFF \
-DTPL_ENABLE_Matio=OFF \
-DCMAKE_INSTALL_PATH=/home/brendan/bin/trilinos \
/home/brendan/Documents/trilinos/Trilinos
make -j<n> install
However, there remains an issue of the build not recognising the CMAKE_INSTALL_PATH
in the configure file do_configure_7.sh
, see below.
Finished configuring Trilinos!
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_INSTALL_PATH
-- Build files have been written to: /home/brendan/Documents/trilinos/Trilinos/build
do_configure_7.sh: line 11: n: No such file or directory
It cannot find boost. You can either disable boost with -DTPL_ENABLE_Boost=OFF
(which would also disable some packages), or specify the proper location.
Regarding the path, you should use CMAKE_INSTALL_PREFIX
instead.
@aprokop I changed CMAKE_INSTALL_PATH
to CMAKE_INSTALL_PREFIX
, so that do_configure_8.sh
is:
cmake \
-DCMAKE_C_COMPILER=/usr/bin/gcc \
-DCMAKE_CXX_COMPILER=/usr/bin/g++ \
-DCMAKE_Fortran_COMPILER=/usr/bin/gfortran \
-DTrilinos_ENABLE_ALL_PACKAGES=ON \
-DTPL_ENABLE_Boost=OFF \
-DTPL_ENABLE_Matio=OFF \
-DCMAKE_INSTALL_PREFIX=/home/brendan/bin/trilinos \
/home/brendan/Documents/trilinos/Trilinos
make -j<n> install
On building it gives:
Finished configuring Trilinos!
-- Configuring done
-- Generating done
-- Build files have been written to: /home/brendan/Documents/trilinos/Trilinos/build
do_configure_8.sh: line 11: n: No such file or directory
So it still does not write Trilinos to the install directory @ /home/brendan/bin/trilinos
!
I think you literally have <n>
in make -j<n> install
instead of a number. You need to replace <n>
with a number from 1 to the number of cores on your machine, or just omit the -j<n>
flag. This flag controls how many threads will be used to compile Trilinos. As long as your machine has one core for each thread, more threads will make compiling faster.
@ibaned Thanks for the comment. I used -j<n> = -j4
from:
http://unix.stackexchange.com/questions/218074/how-to-know-number-of-cores-of-a-system-in-linux
$ grep -m 1 'cpu cores' /proc/cpuinfo
cpu cores : 4
$ lscpu | egrep 'Thread|Core|Socket|^CPU\('
CPU(s): 4
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
Model name: Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz
Trilinos has now installed on my computer. It took at least 8 hours, I left it on installing over night!
There are a few ways to speed up Trilinos compilation, as mentioned at the bottom of INSTALL:
Only enable some packages. It is unlikely you will need all of Trilinos for your application. The set of packages you need depends on what you want to do, so I can't recommend a list without knowing that.
Enable explicit instantiation of templates
-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON
Build shared, not static, libraries
-DBUILD_SHARED_LIBS=ON
I'll go ahead and close this as it relates to compile errors. Feel free to open another issue for further inquiries.
I have cmake errors during the build of Trilinos, using script
do_configure_4.sh
:Can anyone help me solve the build errors, form the output file below?