dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #20858
Re: DOLFIN not picking up SCOTCH
On 1/20/11 10:15 AM, Johannes Ring wrote:
> On Thu, Jan 20, 2011 at 10:05 AM, Harish Narayanan
> <harish.mlists@xxxxxxxxx> wrote:
>> I'm running into the following while compiling DOLFIN.
>>
>> -- The following optional packages could not be found:
>> -- ---------------------------------------------------
>> -- (**) SCOTCH
>>
>> I think I have installed SCOTCH correctly and that lib{pt}scotch files
>> live in the DOLFIN-aware standard places. Here is what I get in
>> CMakeError.log:
>>
>> Performing C++ SOURCE FILE Test SCOTCH_TEST_RUNS failed with the
>> following output:
>> Change Dir: /dev/src/dolfin/dorsal_build_dir/CMakeFiles/CMakeTmp
>>
>> Run Build Command:/usr/bin/make "cmTryCompileExec/fast"
>> /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make
>> CMakeFiles/cmTryCompileExec.dir/build
>> /opt/local/bin/cmake -E cmake_progress_report
>> /dev/src/dolfin/dorsal_build_dir/CMakeFiles/CMakeTmp/CMakeFiles 1
>> Building CXX object CMakeFiles/cmTryCompileExec.dir/src.cxx.o
>> /opt/local/bin/c++ -DSCOTCH_TEST_RUNS -D_REENTRANT -I/dev/include
>> -o CMakeFiles/cmTryCompileExec.dir/src.cxx.o -c
>> /dev/src/dolfin/dorsal_build_dir/CMakeFiles/CMakeTmp/src.cxx
>> Linking CXX executable cmTryCompileExec
>> /opt/local/bin/cmake -E cmake_link_script
>> CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1
>> /opt/local/bin/c++ -DSCOTCH_TEST_RUNS -D_REENTRANT
>> -Wl,-search_paths_first -headerpad_max_install_names
>> CMakeFiles/cmTryCompileExec.dir/src.cxx.o -o cmTryCompileExec
>> /dev/lib/libptscotch.a /dev/lib/libptscotcherr.a
>> /usr/lib/libmpi_cxx.dylib /usr/lib/libmpi.dylib
>> /usr/lib/libopen-rte.dylib /usr/lib/libopen-pal.dylib
>>
>> Return value: 1
>> Source file was:
>>
>> #include <sys/types.h>
>> #include <stdio.h>
>> #include <mpi.h>
>> #include <ptscotch.h>
>> #include <iostream>
>>
>> int main() {
>> int provided, ret;
>> SCOTCH_Dgraph dgrafdat;
>>
>> MPI_Init_thread(0, 0, MPI_THREAD_MULTIPLE, &provided);
>>
>> if (SCOTCH_dgraphInit(&dgrafdat, MPI_COMM_WORLD) != 0) {
>> if (MPI_THREAD_MULTIPLE > provided) {
>> // MPI implementation is not thread-safe:
>> // SCOTCH should be compiled without SCOTCH_PTHREAD
>> ret = 1;
>> }
>> else {
>> // libptscotch linked to libscotch or other unknown error
>> ret = 2;
>> }
>> } else {
>> SCOTCH_dgraphExit(&dgrafdat);
>> ret = 0;
>> }
>>
>> MPI_Finalize();
>>
>> return ret;
>> }
>>
>> Performing C++ SOURCE FILE Test SCOTCH_ZLIB_TEST_RUNS failed with the
>> following output:
>> Change Dir: /dev/src/dolfin/dorsal_build_dir/CMakeFiles/CMakeTmp
>>
>> Run Build Command:/usr/bin/make "cmTryCompileExec/fast"
>> /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make
>> CMakeFiles/cmTryCompileExec.dir/build
>> /opt/local/bin/cmake -E cmake_progress_report
>> /dev/src/dolfin/dorsal_build_dir/CMakeFiles/CMakeTmp/CMakeFiles 1
>> Building CXX object CMakeFiles/cmTryCompileExec.dir/src.cxx.o
>> /opt/local/bin/c++ -DSCOTCH_ZLIB_TEST_RUNS -D_REENTRANT
>> -I/dev/include -o CMakeFiles/cmTryCompileExec.dir/src.cxx.o -c
>> /dev/src/dolfin/dorsal_build_dir/CMakeFiles/CMakeTmp/src.cxx
>> Linking CXX executable cmTryCompileExec
>> /opt/local/bin/cmake -E cmake_link_script
>> CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1
>> /opt/local/bin/c++ -DSCOTCH_ZLIB_TEST_RUNS -D_REENTRANT
>> -Wl,-search_paths_first -headerpad_max_install_names
>> CMakeFiles/cmTryCompileExec.dir/src.cxx.o -o cmTryCompileExec
>> /dev/lib/libptscotch.a /dev/lib/libptscotcherr.a
>> /usr/lib/libmpi_cxx.dylib /usr/lib/libmpi.dylib
>> /usr/lib/libopen-rte.dylib /usr/lib/libopen-pal.dylib /usr/lib/libz.dylib
>>
>> Return value: 1
>> Source file was:
>>
>> #include <sys/types.h>
>> #include <stdio.h>
>> #include <mpi.h>
>> #include <ptscotch.h>
>> #include <iostream>
>>
>> int main() {
>> int provided, ret;
>> SCOTCH_Dgraph dgrafdat;
>>
>> MPI_Init_thread(0, 0, MPI_THREAD_MULTIPLE, &provided);
>>
>> if (SCOTCH_dgraphInit(&dgrafdat, MPI_COMM_WORLD) != 0) {
>> if (MPI_THREAD_MULTIPLE > provided) {
>> // MPI implementation is not thread-safe:
>> // SCOTCH should be compiled without SCOTCH_PTHREAD
>> ret = 1;
>> }
>> else {
>> // libptscotch linked to libscotch or other unknown error
>> ret = 2;
>> }
>> } else {
>> SCOTCH_dgraphExit(&dgrafdat);
>> ret = 0;
>> }
>>
>> MPI_Finalize();
>>
>> return ret;
>> }
>>
>> Can anyone see what is going on? There really doesn't seem to be much of
>> an error message.
>
> Try to recompile SCOTCH but first remove the flag -DSCOTCH_PTHREAD
> under CFLAGS in src/Makefile.inc.
>
> It is hard to get a good error message when using the CMake
> check_cxx_source_runs command. Sometimes it is probably better to use
> the try_run command.
Removing -DSCOTCH_PTHREAD does not help. And try_run only prints
'try_run unknown error'.
Harish
Follow ups
References