install NGsolve without root access

More
7 years 4 months ago #49 by Guosheng Fu
Yeah, MKL was turned off.
According to the info from the cluster, scalapack is available through MKL.
I have many versions of MKL, but non of which seems to work properly for me.

The first issue is that it can not find blacs library (all the others are found according to ccmake):
MKL_BLACS_LIBRARY-NOTFOUND

But there are plenty of blacs library in the mkl/lib folder:
libmkl_blacs_ilp64.a libmkl_blacs_intelmpi_ilp64.so libmkl_blacs_intelmpi_lp64.so libmkl_blacs_openmpi_ilp64.a libmkl_blacs_sgimpt_ilp64.a libmkl_blas95_ilp64.a
libmkl_blacs_intelmpi_ilp64.a libmkl_blacs_intelmpi_lp64.a libmkl_blacs_lp64.a libmkl_blacs_openmpi_lp64.a libmkl_blacs_sgimpt_lp64.a libmkl_blas95_lp64.a

I manually pointed to a blacs library, say libmkl_blacs_lp64.a, then the code compiles and installs, but is a broken version.

I run a test, say
ngspy poisson.py
It gives me two error messages
In the beginning:
ERROR: ld.so: object 'MKL_BLACS_LIBRARY-NOTFOUND' from LD_PRELOAD cannot be preloaded: ignored.

and another error message in the end:
python3: symbol lookup error: /soft/intel/x86_64/2015/composer_xe_2015_msi/composer_xe_2015.3.187/mkl/lib/intel64/libmkl_gnu_thread.so: undefined symbol: omp_get_num_procs
More
7 years 4 months ago #50 by matthiash
You can ignore the first error message from LD_PRELOAD, since you linked MKL_BLACS statically.
A quick guess for the second one:
Try to set MKL_THREADING_LAYER=GNU

Cheers,
Matthias
More
7 years 4 months ago #51 by Guosheng Fu
The variable MKL_THREADING_LAYER was set to GNU
I turned on or off MKL_MULTI_THREADED, the error still appears.
I run make test_ngsolve, only 3 out of 23 passed. they are assemble.py, taskmanager.py, cpuusage

Here is the complete list in CmakeCache.txt related to MKL:

//Path to a library.
MKL_BLACS_LIBRARY:FILEPATH=/soft/intel/x86_64/2015/composer_xe_2015_msi/composer_xe_2015.3.187/mkl/lib/intel64/libmkl_blacs_lp64.a

//Path to a library.
MKL_CORE_LIBRARY:FILEPATH=/soft/intel/x86_64/2015/composer_xe_2015_msi/composer_xe_2015.3.187/mkl/lib/intel64/libmkl_core.so

//Path to a library.
MKL_FFT_LIBRARY:FILEPATH=/soft/intel/x86_64/2015/composer_xe_2015_msi/composer_xe_2015.3.187/mkl/lib/intel64/libmkl_cdft_core.so

//Path to a file.
MKL_INCLUDE_DIR:PATH=/soft/intel/x86_64/2015/composer_xe_2015_msi/composer_xe_2015.3.187/mkl/include

//Path to a library.
MKL_INTERFACE_LIBRARY:FILEPATH=/soft/intel/x86_64/2015/composer_xe_2015_msi/composer_xe_2015.3.187/mkl/lib/intel64/libmkl_intel_lp64.so

//Use threaded MKL libs
MKL_MULTI_THREADED:BOOL=ON

//No help, variable specified on the command line.
MKL_ROOT:UNINITIALIZED=/soft/intel/x86_64/2015/composer_xe_2015_msi/composer_xe_2015.3.187/mkl

//Path to a library.
MKL_SCALAPACK_LIBRARY:FILEPATH=/soft/intel/x86_64/2015/composer_xe_2015_msi/composer_xe_2015.3.187/mkl/lib/intel64/libmkl_scalapack_lp64.so

//Link single dynamic MKL lib
MKL_SDL:BOOL=OFF

//Link static MKL
MKL_STATIC:BOOL=OFF

// Threading layer
MKL_THREADING_LAYER:UNINITIALIZED=GNU

//Path to a library.
MKL_THREADING_LIBRARY:FILEPATH=/soft/intel/x86_64/2015/composer_xe_2015_msi/composer_xe_2015.3.187/mkl/lib/intel64/libmkl_gnu_thread.so
More
7 years 4 months ago #52 by matthiash
Sorry for being unclear, I meant to set the environment variable MKL_THREADING_LAYER to GNU, i.e. in your terminal:
export MKL_THREADING_LAYER=GNU
More
7 years 4 months ago #53 by Guosheng Fu
I did that also... no change in the error.
More
7 years 4 months ago #54 by matthiash
Hmm, this is something we have to fix...

In the meantime you could try two other things:
cmake -DMKL_MULTI_THREADED=OFF ... at configuration
(acutally, if you use 1 MPI rank per CPU core, that makes sense)

or:
have a look at the ngspy script generated. There are some libraries assigned to LD_PRELOAD before calling python. You could add the path go libgomp.so there (for me it's /usr/lib/libgomp.so)

Regards,
Matthias
Time to create page: 0.111 seconds