ParSec compilation on Linux

Hello, has anyone been able to successfully compile ParSec on linux? I tried to use the make_parsec.sh script as well as the parsec link provided but I have not been able to compile it.

Also, is PLASMA required for the installation of ParSec? The documentation is not very clear on that

a bit more information is probably needed, like show your make_parsec.sh, distro and the output.
If you followed the README you will end up at Matthieu Faverge fork of parsec and there is no PLASMA, you don’t need it.

Hello,

Here is the make_parsec.sh

#!/bin/bash

if ! [[ -d build ]]; then
    mkdir build
fi
cd build

INSTALLPATH="/usr/local/parsec_i8"

umask 022

sed -i '/-1 == cpu/i return cpu;' ../parsec/bindthread.c

cmake \
    -DCMAKE_CXX_COMPILER=g++ \
    -DCMAKE_C_COMPILER=gcc \
    -DCMAKE_Fortran_COMPILER=gfortran \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=${INSTALLPATH} \
    -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-10.2 \
    -DCUDA_USE_STATIC_CUDA_RUNTIME=ON \
    -DCMAKE_CUDA_HOST_COMPILER=gcc \
    -DPARSEC_GPU_WITH_CUDA=ON \
    -DPARSEC_OMEGA_DIR=OFF\
    -DHWLOC_DIR=/usr/local/lib \
    -DBUILD_DPLASMA=OFF \
    -DPARSEC_WITH_DEVEL_HEADERS=OFF\
    -DBUILD_SHARED_LIBS=ON\
    -DPARSEC_DIST_WITH_MPI=OFF\
    -DPYTHON_EXECUTABLE=/usr/bin/python3.6\
    ..

Here is the output when I was doing make -j8 in build

Scanning dependencies of target build_with_parsec
[  0%] [FLEX][keyval_flex] Building scanner with flex 2.6.4
[  1%] [FLEX][show_help_flex] Building scanner with flex 2.6.4
Scanning dependencies of target parsecf
Scanning dependencies of target parsec_data_dist
[  1%] Generating contrib/build_with_parsec/common_timing.h
[  2%] Generating contrib/build_with_parsec/common.c
[  2%] Generating contrib/build_with_parsec/common.h
[  3%] Generating contrib/build_with_parsec/dtd_test_allreduce.c
[  4%] Building Fortran object parsec/fortran/CMakeFiles/parsecf.dir/parsecf.F90.o
[  4%] Building C object parsec/data_dist/CMakeFiles/parsec_data_dist.dir/hash_datadist.c.o
[  4%] Generating contrib/build_with_parsec/flops.h
Scanning dependencies of target parsec-base-obj
[  5%] Generating contrib/build_with_parsec/write_check.jdf
[  5%] Generating contrib/build_with_parsec/testing_dpotrf_dtd_untied.c
[  5%] Building C object parsec/fortran/CMakeFiles/parsecf.dir/parsecf.c.o
[  5%] Built target build_with_parsec
In file included from /home/tchin/git/parsec_ccx/parsec/arena.h:19:0,
                 from /home/tchin/git/parsec_ccx/parsec/data_internal.h:19,
                 from /home/tchin/git/parsec_ccx/parsec/data_dist/hash_datadist.h:16,
                 from /home/tchin/git/parsec_ccx/parsec/data_dist/hash_datadist.c:7:
/home/tchin/git/parsec_ccx/parsec/datatype.h:13:10: fatal error: mpi.h: No such file or directory
 #include <mpi.h>
          ^~~~~~~
compilation terminated.
parsec/data_dist/CMakeFiles/parsec_data_dist.dir/build.make:81: recipe for target 'parsec/data_dist/CMakeFiles/parsec_data_dist.dir/hash_datadist.c.o' failed
make[2]: *** [parsec/data_dist/CMakeFiles/parsec_data_dist.dir/hash_datadist.c.o] Error 1
[  5%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/class/parsec_dequeue.c.o
CMakeFiles/Makefile2:1819: recipe for target 'parsec/data_dist/CMakeFiles/parsec_data_dist.dir/all' failed
make[1]: *** [parsec/data_dist/CMakeFiles/parsec_data_dist.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[  6%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/class/parsec_fifo.c.o
[  6%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/class/parsec_lifo.c.o
[  6%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/class/parsec_list.c.o
[  6%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/class/parsec_object.c.o
[  7%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/class/parsec_value_array.c.o
[  7%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/class/parsec_hash_table.c.o
[  7%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/class/parsec_rwlock.c.o
[  8%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/argv.c.o
[  8%] Built target parsecf
[  8%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/cmd_line.c.o
[  8%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/colors.c.o
[  9%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/parsec_environ.c.o
[  9%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/installdirs.c.o
[  9%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/keyval_parse.c.o
[ 10%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/mca_param.c.o
[ 10%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/mca_param_cmd_line.c.o
[ 10%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/mca_parse_paramfile.c.o
[ 10%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/os_path.c.o
[ 11%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/output.c.o
[ 11%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/show_help.c.o
[ 11%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/zone_malloc.c.o
[ 12%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/atomic_external.c.o
[ 12%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/utils/debug.c.o
[ 12%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/show_help_lex.l.c.o
[ 13%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/keyval_lex.l.c.o
[ 13%] Built target parsec-base-obj
Makefile:181: recipe for target 'all' failed

In file included from /home/tchin/git/parsec_ccx/parsec/include/parsec/sys/atomic.h(32),
                 from /home/tchin/git/parsec_ccx/parsec/class/parsec_hash_table.h(11),
                 from /home/tchin/git/parsec_ccx/parsec/include/parsec/data_distribution.h(12),
                 from /home/tchin/git/parsec_ccx/parsec/data_dist/hash_datadist.h(15),
                 from /home/tchin/git/parsec_ccx/parsec/data_dist/hash_datadist.c(7):
/home/tchin/git/parsec_ccx/parsec/include/parsec/sys/atomic-c11.h(60): error: _Atomic "__int128_t={__int128}" type is not supported
      return atomic_compare_exchange_strong( (_Atomic __int128_t*)location, &old_value, new_value );
             ^

In file included from /home/tchin/git/parsec_ccx/parsec/include/parsec/sys/atomic.h(32),
                 from /home/tchin/git/parsec_ccx/parsec/class/parsec_hash_table.h(11),
                 from /home/tchin/git/parsec_ccx/parsec/include/parsec/data_distribution.h(12),
                 from /home/tchin/git/parsec_ccx/parsec/data_dist/hash_datadist.h(15),
                 from /home/tchin/git/parsec_ccx/parsec/data_dist/hash_datadist.c(7):
/home/tchin/git/parsec_ccx/parsec/include/parsec/sys/atomic-c11.h(60): error: argument of type "__int128_t={__int128} *" is incompatible with parameter of type "<error-type> *"
      return atomic_compare_exchange_strong( (_Atomic __int128_t*)location, &old_value, new_value );

It seems like it is looking for MPI even though I turned the MPI option off. I also tried building it with intel compilers but got the following error

Scanning dependencies of target build_with_parsec
Scanning dependencies of target parsec_data_dist
[  0%] [FLEX][keyval_flex] Building scanner with flex 2.6.4
[  0%] [FLEX][show_help_flex] Building scanner with flex 2.6.4
Scanning dependencies of target parsecf
[  0%] Generating contrib/build_with_parsec/common_timing.h
[  1%] Generating contrib/build_with_parsec/common.c
[  1%] Generating contrib/build_with_parsec/common.h
[  1%] Generating contrib/build_with_parsec/dtd_test_allreduce.c
[  1%] Building Fortran object parsec/fortran/CMakeFiles/parsecf.dir/parsecf.F90.o
[  1%] Building C object parsec/data_dist/CMakeFiles/parsec_data_dist.dir/hash_datadist.c.o
Scanning dependencies of target parsec-base-obj
[  2%] Generating contrib/build_with_parsec/flops.h
[  2%] Generating contrib/build_with_parsec/write_check.jdf
[  2%] Building C object parsec/fortran/CMakeFiles/parsecf.dir/parsecf.c.o
[  2%] Generating contrib/build_with_parsec/testing_dpotrf_dtd_untied.c
[  2%] Built target build_with_parsec
[  3%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/class/parsec_list.c.o
[  3%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/class/parsec_fifo.c.o
[  3%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/class/parsec_object.c.o
[  4%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/class/parsec_dequeue.c.o
[  4%] Building C object parsec/CMakeFiles/parsec-base-obj.dir/class/parsec_lifo.c.o
In file included from /home/tchin/git/parsec_ccx/parsec/include/parsec/sys/atomic.h(32),
                 from /home/tchin/git/parsec_ccx/parsec/class/parsec_hash_table.h(11),
                 from /home/tchin/git/parsec_ccx/parsec/include/parsec/data_distribution.h(12),
                 from /home/tchin/git/parsec_ccx/parsec/data_dist/hash_datadist.h(15),
                 from /home/tchin/git/parsec_ccx/parsec/data_dist/hash_datadist.c(7):
/home/tchin/git/parsec_ccx/parsec/include/parsec/sys/atomic-c11.h(41): warning #2330: argument of type "_Atomic(int32_t={__int32_t={signed int}}) *" is incompatible with parameter of type "volatile void *" (dropping qualifiers)
      return atomic_compare_exchange_strong( (_Atomic int32_t*)location, &old_value, new_value );
             ^

In file included from /home/tchin/git/parsec_ccx/parsec/include/parsec/sys/atomic.h(32),
                 from /home/tchin/git/parsec_ccx/parsec/class/parsec_hash_table.h(11),
                 from /home/tchin/git/parsec_ccx/parsec/include/parsec/data_distribution.h(12),
                 from /home/tchin/git/parsec_ccx/parsec/data_dist/hash_datadist.h(15),
                 from /home/tchin/git/parsec_ccx/parsec/data_dist/hash_datadist.c(7):
/home/tchin/git/parsec_ccx/parsec/include/parsec/sys/atomic-c11.h(50): warning #2330: argument of type "_Atomic(int64_t={__int64_t={signed long}}) *" is incompatible with parameter of type "volatile void *" (dropping qualifiers)
      return atomic_compare_exchange_strong( (_Atomic int64_t*)location, &old_value, new_value );
             ^

In file included from /home/tchin/git/parsec_ccx/parsec/include/parsec/sys/atomic.h(32),
                 from /home/tchin/git/parsec_ccx/parsec/class/parsec_hash_table.h(11),
                 from /home/tchin/git/parsec_ccx/parsec/include/parsec/data_distribution.h(12),
                 from /home/tchin/git/parsec_ccx/parsec/data_dist/hash_datadist.h(15),
                 from /home/tchin/git/parsec_ccx/parsec/data_dist/hash_datadist.c(7):
/home/tchin/git/parsec_ccx/parsec/include/parsec/sys/atomic-c11.h(60): error: _Atomic "__int128_t={__int128}" type is not supported
      return atomic_compare_exchange_strong( (_Atomic __int128_t*)location, &old_value, new_value );
             ^

In file included from /home/tchin/git/parsec_ccx/parsec/include/parsec/sys/atomic.h(32),
                 from /home/tchin/git/parsec_ccx/parsec/class/parsec_hash_table.h(11),
                 from /home/tchin/git/parsec_ccx/parsec/include/parsec/data_distribution.h(12),
                 from /home/tchin/git/parsec_ccx/parsec/data_dist/hash_datadist.h(15),
                 from /home/tchin/git/parsec_ccx/parsec/data_dist/hash_datadist.c(7):
/home/tchin/git/parsec_ccx/parsec/include/parsec/sys/atomic-c11.h(60): error: argument of type "__int128_t={__int128} *" is incompatible with parameter of type "<error-type> *"
      return atomic_compare_exchange_strong( (_Atomic __int128_t*)location, &old_value, new_value );

Any help is much appreciated

try this:

#!/bin/bash

if ! [[ -d build ]]; then
    mkdir build
fi
cd build

INSTALLPATH="/usr/local/parsec_i8"

umask 022

sed -i '/-1 == cpu/i return cpu;' ../parsec/bindthread.c

cmake \
    -DCMAKE_CXX_COMPILER=g++ \
    -DCMAKE_C_COMPILER=gcc \
    -DCMAKE_Fortran_COMPILER=gfortran \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=${INSTALLPATH} \
    -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-10.2 \
    -DCUDA_USE_STATIC_CUDA_RUNTIME=ON \
    -DCMAKE_CUDA_HOST_COMPILER=gcc \
    -DPARSEC_GPU_WITH_CUDA=ON \
    -DHWLOC_DIR=/usr/local/lib \
    -DPARSEC_WITH_DEVEL_HEADERS=OFF\
    -DBUILD_SHARED_LIBS=ON\
    -DPYTHON_EXECUTABLE=/usr/bin/python3.6\
    ..

If you have to define PLASMA and OMEGA you have the wrong sources, they are not existent in the sources you should use. Where did you get the sources from? You should use: https://bitbucket.org/mfaverge/parsec/src/pastix-6.0.2/
PARSEC_DIST_WITH_MPI is default to OFF in the CMakeLists.txt anyway.

Thanks! That’s helpful as I was using the link “https://bitbucket.org/mfaverge/parsec/src/master” specified in the CalculiX 2.17 README. I switched to 6.0.2 tag and I was able to compile