[petsc-dev] Extending Petsc

Barry Smith bsmith at mcs.anl.gov
Fri Sep 13 07:37:38 CDT 2013


  Each directory has a makefile which lists the subdirectories that are processed. You need to add cpardiso to the list of DIRS in the makefile of the directory that it is in. Then rerun configure and it will start processing that directory.


On Sep 12, 2013, at 10:43 PM, Jose David Bermeol <jbermeol at purdue.edu> wrote:

> Thanks, you were right, I needed to check the paths and my .py files. Now ./configure runs perfect and the variable PETSC_HAVE_PACKAGE is set to 1. The only thing is that during compilation my folder cpardiso/cpardiso.c is not listed so I'm not sure if my code was compiled.  So I'don't know if there is an easy way to check this or if I have to code a test??
> 
> Thanks
> 
> ----- Original Message -----
> From: "Barry Smith" <bsmith at mcs.anl.gov>
> To: "Jose David Bermeol" <jbermeol at purdue.edu>
> Cc: "William D Nystrom" <wdn at lanl.gov>, petsc-dev at mcs.anl.gov
> Sent: Thursday, September 12, 2013 2:54:09 PM
> Subject: Re: [petsc-dev] Extending Petsc
> 
> 
>  Here is the information in the file below. Simply put those libraries don't resolve everything needed. 
> 
>   What you need to do is start by forgetting about PETSc. Just write a  program that calls the test function
> 
> int main() {
> set_default_options()
> ;
>  return 0;
> }
> 
> Now determine what Intel/MKL/System libraries are needed to resolve all the symbols. For example it had problems with
> 
> /tmp/petsc-9a9q32/config.libraries/conftest.c:7: undefined reference to `set_default_options'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `omp_get_nested'
> 
> Are you sure set_default_options() is the function you want to check for, is that a function of parisdo?
> 
>   Barry
> 
> 
> 
>        Checking for a functional mkl
>        Checking for library in User specified MKL libraries: ['/apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_lp64.so', 'libmkl_intel_thread.so', 'libmkl_core.so']
>        Contents: ['lib', 'tests', 'include', 'bin', 'examples', 'benchmarks', 'tools', 'interfaces']
> ================================================================================
> TEST check from config.libraries(PATH_TO_PETSC/config/BuildSystem/config/libraries.py:145)
> TESTING: check from config.libraries(config/BuildSystem/config/libraries.py:145)
>  Checks that the library "libName" contains "funcs", and if it does defines HAVE_LIB"libName"
>       - libDir may be a list of directories
>       - libName may be a list of library names
>            Checking for function set_default_options in library ['/apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_lp64.so', 'libmkl_intel_thread.so', 'libmkl_core.so'] []
>              Pushing language C
> sh: /apps/rhel6/intel/impi/4.1.0.030/intel64/bin/mpicc -c -o /tmp/petsc-9a9q32/config.libraries/conftest.o -I/tmp/petsc-9a9q32/config.compilers -I/tmp/petsc-9a9q32/config.setCompilers -I/tmp/petsc-9a9q32/config.headers -I/tmp/petsc-9a9q32/PETSc.utilities.cacheDetails -I/tmp/petsc-9a9q32/PETSc.utilities.missing -I/tmp/petsc-9a9q32/PETSc.utilities.scalarTypes -I/tmp/petsc-9a9q32/config.functions -I/tmp/petsc-9a9q32/config.types -I/tmp/petsc-9a9q32/config.packages.MPI -I/tmp/petsc-9a9q32/config.libraries  -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g3 -fno-inline -O0  /tmp/petsc-9a9q32/config.libraries/conftest.c 
> Executing: /apps/rhel6/intel/impi/4.1.0.030/intel64/bin/mpicc -c -o /tmp/petsc-9a9q32/config.libraries/conftest.o -I/tmp/petsc-9a9q32/config.compilers -I/tmp/petsc-9a9q32/config.setCompilers -I/tmp/petsc-9a9q32/config.headers -I/tmp/petsc-9a9q32/PETSc.utilities.cacheDetails -I/tmp/petsc-9a9q32/PETSc.utilities.missing -I/tmp/petsc-9a9q32/PETSc.utilities.scalarTypes -I/tmp/petsc-9a9q32/config.functions -I/tmp/petsc-9a9q32/config.types -I/tmp/petsc-9a9q32/config.packages.MPI -I/tmp/petsc-9a9q32/config.libraries  -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g3 -fno-inline -O0  /tmp/petsc-9a9q32/config.libraries/conftest.c 
> sh: 
> Successful compile:
> Source:
> #include "confdefs.h"
> #include "conffix.h"
> /* Override any gcc2 internal prototype to avoid an error. */
> char set_default_options();
> 
> int main() {
> set_default_options()
> ;
>  return 0;
> }
>                      Pushing language C
>                      Popping language C
> sh: /apps/rhel6/intel/impi/4.1.0.030/intel64/bin/mpicc  -o /tmp/petsc-9a9q32/config.libraries/conftest    -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g3 -fno-inline -O0 /tmp/petsc-9a9q32/config.libraries/conftest.o  -Wl,-rpath,/apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64 -L/apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -Wl,-rpath,/apps/rhel6/intel/impi/4.1.0.030/intel64/lib -L/apps/rhel6/intel/impi/4.1.0.030/intel64/lib -Wl,-rpath,/usr/lib/gcc/x86_64-redhat-linux/4.4.7 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.7 -Wl,-rpath,/apps/rhel6/intel/composer_xe_2013.3.163/compiler/lib/intel64 -L/apps/rhel6/intel/composer_xe_2013.3.163/compiler/lib/intel64 -Wl,-rpath,/apps/rhel6/intel/composer_xe_2013.3.163/ipp/lib/intel64 -L/apps/rhel6/intel/composer_xe_2013.3.163/ipp/lib/intel64 -Wl,-rpath,/apps/rhel6/intel/composer_xe_2013.3.163/mkl/lib/intel64 -L/apps/rhel6/intel/composer_xe_2013.3.163/mkl/lib/intel64 -Wl,-rpath,/apps/rhel6/intel/composer_xe_2013.3.163/tbb/lib/intel64 -L/apps/rhel6/intel/composer_xe_2013.3.163/tbb/lib/intel64 -Wl,-rpath,/apps/rhel6/intel/impi/4.1.0.030/intel64/lib -Wl,-rpath,/usr/lib/gcc/x86_64-redhat-linux/4.4.7 -Wl,-rpath,/apps/rhel6/intel/composer_xe_2013.3.163/compiler/lib/intel64 -Wl,-rpath,/apps/rhel6/intel/composer_xe_2013.3.163/ipp/lib/intel64 -Wl,-rpath,/apps/rhel6/intel/composer_xe_2013.3.163/mkl/lib/intel64 -Wl,-rpath,/apps/rhel6/intel/composer_xe_2013.3.163/tbb/lib/intel64 -Wl,-rpath,/opt/intel/mpi-rt/4.1 -lmpigc4 -lmpi_dbg -lstdc++ -Wl,-rpath,/apps/rhel6/intel/impi/4.1.0.030/intel64/lib -L/apps/rhel6/intel/impi/4.1.0.030/intel64/lib -Wl,-rpath,/usr/lib/gcc/x86_64-redhat-linux/4.4.7 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.7 -Wl,-rpath,/usr/lib/gcc/x86_64-redhat-linux/4.4.7 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.7 -Wl,-rpath,/apps/rhel6/intel/composer_xe_2013.3.163/compiler/lib/intel64 -L/apps/rhel6/intel/composer_xe_2013.3.163/compiler/lib/intel64 -Wl,-rpath,/apps/rhel6/intel/composer_xe_2013.3.163/ipp/lib/intel64 -L/apps/rhel6/intel/composer_xe_2013.3.163/ipp/lib/intel64 -Wl,-rpath,/apps/rhel6/intel/composer_xe_2013.3.163/mkl/lib/intel64 -L/apps/rhel6/intel/composer_xe_2013.3.163/mkl/lib/intel64 -Wl,-rpath,/apps/rhel6/intel/composer_xe_2013.3.163/tbb/lib/intel64 -L/apps/rhel6/intel/composer_xe_2013.3.163/tbb/lib/intel64 -ldl -Wl,-rpath,/apps/rhel6/intel/impi/4.1.0.030/intel64/lib -Wl,-rpath,/opt/intel/mpi-rt/4.1 -lmpigf -lmpi -lmpigi -lrt -lpthread -lgcc_s -ldl 
> Executing: /apps/rhel6/intel/impi/4.1.0.030/intel64/bin/mpicc  -o /tmp/petsc-9a9q32/config.libraries/conftest    -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g3 -fno-inline -O0 /tmp/petsc-9a9q32/config.libraries/conftest.o  -Wl,-rpath,/apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64 -L/apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -Wl,-rpath,/apps/rhel6/intel/impi/4.1.0.030/intel64/lib -L/apps/rhel6/intel/impi/4.1.0.030/intel64/lib -Wl,-rpath,/usr/lib/gcc/x86_64-redhat-linux/4.4.7 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.7 -Wl,-rpath,/apps/rhel6/intel/composer_xe_2013.3.163/compiler/lib/intel64 -L/apps/rhel6/intel/composer_xe_2013.3.163/compiler/lib/intel64 -Wl,-rpath,/apps/rhel6/intel/composer_xe_2013.3.163/ipp/lib/intel64 -L/apps/rhel6/intel/composer_xe_2013.3.163/ipp/lib/intel64 -Wl,-rpath,/apps/rhel6/intel/composer_xe_2013.3.163/mkl/lib/intel64 -L/apps/rhel6/intel/composer_xe_2013.3.163/mkl/lib/intel64 -Wl,-rpath,/apps/rhel6/intel/composer_xe_2013.3.163/tbb/lib/intel64 -L/apps/rhel6/intel/composer_xe_2013.3.163/tbb/lib/intel64 -Wl,-rpath,/apps/rhel6/intel/impi/4.1.0.030/intel64/lib -Wl,-rpath,/usr/lib/gcc/x86_64-redhat-linux/4.4.7 -Wl,-rpath,/apps/rhel6/intel/composer_xe_2013.3.163/compiler/lib/intel64 -Wl,-rpath,/apps/rhel6/intel/composer_xe_2013.3.163/ipp/lib/intel64 -Wl,-rpath,/apps/rhel6/intel/composer_xe_2013.3.163/mkl/lib/intel64 -Wl,-rpath,/apps/rhel6/intel/composer_xe_2013.3.163/tbb/lib/intel64 -Wl,-rpath,/opt/intel/mpi-rt/4.1 -lmpigc4 -lmpi_dbg -lstdc++ -Wl,-rpath,/apps/rhel6/intel/impi/4.1.0.030/intel64/lib -L/apps/rhel6/intel/impi/4.1.0.030/intel64/lib -Wl,-rpath,/usr/lib/gcc/x86_64-redhat-linux/4.4.7 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.7 -Wl,-rpath,/usr/lib/gcc/x86_64-redhat-linux/4.4.7 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.7 -Wl,-rpath,/apps/rhel6/intel/composer_xe_2013.3.163/compiler/lib/intel64 -L/apps/rhel6/intel/composer_xe_2013.3.163/compiler/lib/intel64 -Wl,-rpath,/apps/rhel6/intel/composer_xe_2013.3.163/ipp/lib/intel64 -L/apps/rhel6/intel/composer_xe_2013.3.163/ipp/lib/intel64 -Wl,-rpath,/apps/rhel6/intel/composer_xe_2013.3.163/mkl/lib/intel64 -L/apps/rhel6/intel/composer_xe_2013.3.163/mkl/lib/intel64 -Wl,-rpath,/apps/rhel6/intel/composer_xe_2013.3.163/tbb/lib/intel64 -L/apps/rhel6/intel/composer_xe_2013.3.163/tbb/lib/intel64 -ldl -Wl,-rpath,/apps/rhel6/intel/impi/4.1.0.030/intel64/lib -Wl,-rpath,/opt/intel/mpi-rt/4.1 -lmpigf -lmpi -lmpigi -lrt -lpthread -lgcc_s -ldl 
> sh: 
> Possible ERROR while running linker: /tmp/petsc-9a9q32/config.libraries/conftest.o: In function `main':
> /tmp/petsc-9a9q32/config.libraries/conftest.c:7: undefined reference to `set_default_options'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `omp_get_nested'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_critical'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_for_static_init_8'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_float8_add'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_next_4'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_master'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_for_static_fini'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_flush'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_for_static_init_8u'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_for_static_init_4'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_fork_call'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_next_8'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_push_num_threads'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `omp_get_num_procs'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_ordered'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_barrier'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_cmplx8_add'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_fini_4'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_global_thread_num'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_init_4'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `omp_get_max_threads'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_critical'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_serialized_parallel'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_reduce_nowait'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_float4_max'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_master'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_single'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `ompc_set_nested'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_fini_8'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `omp_in_parallel'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_init_8'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_fixed8_add'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_cmplx4_add'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_ok_to_fork'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_single'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `omp_get_thread_num'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_ordered'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_reduce_nowait'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_serialized_parallel'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_float4_add'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `omp_get_num_threads'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_float8_max'
> collect2: ld returned 1 exit status
> output: ret = 256
> error message = {/tmp/petsc-9a9q32/config.libraries/conftest.o: In function `main':
> /tmp/petsc-9a9q32/config.libraries/conftest.c:7: undefined reference to `set_default_options'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `omp_get_nested'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_critical'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_for_static_init_8'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_float8_add'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_next_4'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_master'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_for_static_fini'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_flush'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_for_static_init_8u'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_for_static_init_4'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_fork_call'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_next_8'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_push_num_threads'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `omp_get_num_procs'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_ordered'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_barrier'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_cmplx8_add'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_fini_4'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_global_thread_num'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_init_4'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `omp_get_max_threads'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_critical'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_serialized_parallel'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_reduce_nowait'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_float4_max'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_master'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_single'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `ompc_set_nested'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_fini_8'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `omp_in_parallel'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_init_8'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_fixed8_add'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_cmplx4_add'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_ok_to_fork'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_single'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `omp_get_thread_num'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_ordered'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_reduce_nowait'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_serialized_parallel'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_float4_add'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `omp_get_num_threads'
> /apps/rhel5/intel/composer_xe_2013.3.163/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_float8_max'
> collect2: ld returned 1 exit status
> }
> 
> On Sep 12, 2013, at 12:50 PM, Jose David Bermeol <jbermeol at purdue.edu> wrote:
> 
>> Well maybe I didn't explain myself right. I'm creating a linear solver(mat class like SuperLu) that uses intel MKL pardiso function. So I don't want to use MKL through  blas/lapack, neither to be depended if a uses blas/lapack with MKL or not. Thats why I want to compile Petcs with MKL. I'm going to check blas/lapack to see how it does it. Attached is the configure.log. So any ideas or a different strategy are welcome.
>> 
>> Thanks
>> 
>> 
>> 
>> ----- Original Message -----
>> From: "William D Nystrom" <wdn at lanl.gov>
>> To: "Barry Smith" <bsmith at mcs.anl.gov>, "Jose David Bermeol" <jbermeol at purdue.edu>
>> Cc: petsc-dev at mcs.anl.gov, "William D Nystrom" <wdn at lanl.gov>
>> Sent: Thursday, September 12, 2013 12:12:39 PM
>> Subject: RE: [petsc-dev] Extending Petsc
>> 
>> Jose,
>> 
>> I don't really understand why it is necessary to make an MKL package for PETSc.  I use MKL with
>> PETSc all the time.  I configure PETSc to use MKL for blas/lapack with a configure option like the
>> following:
>> 
>> configure \
>>     --PETSC_DIR=$PETSC_DIR \
>>     --PETSC_ARCH=$PETSC_ARCH \
>>     --download-cmake=yes \
>>     --with-mpi=1 \
>>     --with-mpi-dir=$MPI_ROOT \
>>     --with-blas-lapack-dir=$MKL_ROOT \
>>     <...>
>> 
>> A consequence of this is that the MKL libraries wind up on the link line when building PETSc
>> examples.  The link line info is also in the make.log file from a successful build of PETSc.  If MKL
>> is on the link line, then it seems you should be able to resolve the other symbols that your
>> application might use from MKL with no problems - unless your application needs to use
>> different libraries from the MKL suite that what the PETSc build system selected.  But I think
>> there would be other ways to deal with that besides making an MKL package for PETSc.  I
>> think PETSc may currently in at least some situations force the use of the sequential version
>> of MKL, especially if you are using the PETSc threadcomm package.  There are probably ways
>> to get around that if you need to use the threaded version of MKL.
>> 
>> Also, whenever I have these sorts of problems that require getting help from the PETSc team,
>> I always send a gzipped copy of configure.log and make.log if the build got that far.  It is
>> difficult for them to do much without that info.
>> 
>> Best regards,
>> 
>> Dave
>> 
>> --
>> Dave Nystrom
>> LANL HPC-5
>> Phone: 505-667-7913
>> Email: wdn at lanl.gov
>> Smail: Mail Stop B272
>>      Group HPC-5
>>      Los Alamos National Laboratory
>>      Los Alamos, NM 87545
>> 
>> 
>> ________________________________________
>> From: petsc-dev-bounces at mcs.anl.gov [petsc-dev-bounces at mcs.anl.gov] on behalf of Barry Smith [bsmith at mcs.anl.gov]
>> Sent: Thursday, September 12, 2013 9:53 AM
>> To: Jose David Bermeol
>> Cc: petsc-dev at mcs.anl.gov
>> Subject: Re: [petsc-dev] Extending Petsc
>> 
>>  We absolutely need configure.log to debug this. All the information about what variants were tried and why they failed are listed in configure.log
>> 
>> 
>> On Sep 12, 2013, at 10:41 AM, Jose David Bermeol <jbermeol at purdue.edu> wrote:
>> 
>>> Hi, now I'm trying to compile Petsc with mkl, not just for BLAS/LAPACK functions, but for all functionalities of mkl. What I did until now is to add the file mkl.py to config/PETSc/packages, with the following code:
>>> 
>>> import PETSc.package
>>> 
>>> class Configure(PETSc.package.NewPackage):
>>> def __init__(self, framework):
>>>  PETSc.package.NewPackage.__init__(self, framework)
>>>  self.functions    = ['set_default_options']
>>>  self.includes     = ['mkl.h']
>>>  self.liblist      = [['libmkl_intel_lp64.so', 'libmkl_intel_thread.so', 'libmkl_core.so']]
>>>  self.double       = 1
>>>  self.complex      = 1
>>>  #self.worksonWindows   = 1
>>>  #self.downloadonWindows= 1
>>>  return
>>> 
>>> I base the implementation in papi.py and SuperLu.py. Then I'run
>>> 
>>> ./configure --with-mpi-dir=$MPI_HOME --with-mkl-lib=$MKL_ROOT/lib/intel64 --with-mkl-include=$MKL_ROOT/include
>>> 
>>> And it throws the following error:
>>> 
>>> *******************************************************************************
>>>       UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log for details):
>>> -------------------------------------------------------------------------------
>>> --with-mkl-lib=['PATH/lib/intel64'] and
>>> --with-mkl-include=['PATH/include'] did not work
>>> *******************************************************************************
>>> 
>>> the trace in configure.log is not clear, and I'm not sure if the problem is because all the libraries are shared object libraries (.so) and not static(.a). So maybe you have ideas of why this is happening.
>>> 
>>> Thanks
>>> 
>>> ----- Original Message -----
>>> From: "Barry Smith" <bsmith at mcs.anl.gov>
>>> To: "Jose David Bermeol" <jbermeol at purdue.edu>
>>> Cc: petsc-dev at mcs.anl.gov
>>> Sent: Wednesday, September 11, 2013 8:27:23 PM
>>> Subject: Re: [petsc-dev] Extending Petsc
>>> 
>>> 
>>> On Sep 11, 2013, at 5:23 PM, Jose David Bermeol <jbermeol at purdue.edu> wrote:
>>> 
>>>> So a couple of more question:
>>>> 
>>>> 1. My code in Petsc and my package depends on intel mkl, I was thinking to compile Petsc to use mkl using --with-mkl-dir flag, do I have to add something in the setupDependencies() method, and because mkl is not in config.packages how can I do that?
>>> 
>>> You copy something like superlu.py to mkl.py and edit that.
>>> 
>>>  PETSc automatically loads up all the files in the config/PETSc/packages directory so you don't have to list your new file anywhere in setup dependencies or anything
>>> 
>>>> 
>>>> 2. My package is already installed, so do I have to code the install method?
>>> 
>>>  Nope
>>> 
>>>> 
>>>> Thanks
>>>> 
>>>> ----- Original Message -----
>>>> From: "Barry Smith" <bsmith at mcs.anl.gov>
>>>> To: "Jose David Bermeol" <jbermeol at purdue.edu>
>>>> Cc: petsc-dev at mcs.anl.gov
>>>> Sent: Wednesday, September 11, 2013 5:25:36 PM
>>>> Subject: Re: [petsc-dev] Extending Petsc
>>>> 
>>>> 
>>>> You need to put a file in config/PETSc/packages   with the name package.py (name of your package) you can, for example, copy superlu.py and edit it to match your package. This is the file that will make sure that PETSC_HAVE_PACKAGE is defined.
>>>> 
>>>> Barry
>>>> 
>>>> 
>>>> 
>>>> On Sep 11, 2013, at 4:21 PM, Jose David Bermeol <jbermeol at purdue.edu> wrote:
>>>> 
>>>>> Hi, right now I'm working in add a new solver for seq aij matrices. What I have until this point are the following files inside the folder aij/seq/:
>>>>> 
>>>>> - package/       folder with my code
>>>>> - package.c      a initial implementation of the solver.
>>>>> - makefile       is basically a copy of the make file in superlu, but using the name of my package instead of "superlu".
>>>>> 
>>>>> Also I add to petscmat.h my solver type. Then I run ./configure with the flag --with-package-dir=PATH_TO_PACKAGE. The thing is that when I'm compiling the variable PETSC_HAVE_PACKAGE doesn't show up, I guess that means the variable is 0 or something else happens, and my code is not going to be compile. So if you could give some ideas of why Petsc doesn't compile my code.
>>>>> 
>>>>> 
>>>>> Thanks
>> <configure.log>




More information about the petsc-dev mailing list