[petsc-dev] [petsc-users] mkl-cpardiso configuration
Jose David Bermeol
jbermeol at purdue.edu
Sun Oct 13 12:18:43 CDT 2013
Hi again, so I haven't complete the mkl-cpardiso interface for some compilation problems. However I did an interfaces for the regular pardiso that comes with intel-mkl. Now there are a couple of things pending to do before to do the pool request:
1. I did a mkl-pardiso.py script for the installation of the solver. It checks that BlasLapack is installed, but it doesn't check that the BlasLapack implementation is mkl implementation. I did't know how to do that so maybe you cold helpme with that.
2. Intel suggest to use the following flags for the linker phase "-Wl,--start-group -L(PATH_TO_MKL) -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -Wl,--end-group -lpthread -lm -liomp5". This is simple if I use -with-mkl-pardiso-lib. But if I want to use -with-mkl-pardiso-dir is more complicated and need to be done.
3. Finally related with the -with-mkl-pardiso-dir I don't if would be necessary to do a library validation, apart from the BlasLapack validation.
If you could help me with this question, I would be able to do a pull request soon.
Thanks
----- Original Message -----
From: "Jose David Bermeol" <jbermeol at purdue.edu>
To: "Barry Smith" <bsmith at mcs.anl.gov>
Cc: "petsc-users" <petsc-users at mcs.anl.gov>, "For users of the development version of PETSc" <petsc-dev at mcs.anl.gov>
Sent: Sunday, October 6, 2013 11:03:49 PM
Subject: Re: [petsc-dev] [petsc-users] mkl-cpardiso configuration
Yes, blaslapack.py is enough big and horrible to add more code. Well the easier configuration is not a high priority think for me(but it something that in some point I will have to do). So for now I will have a basic cpardiso.py and then I will try to ensure that the blas/lapack libraries are correct.
----- Original Message -----
From: "Barry Smith" <bsmith at mcs.anl.gov>
To: "Jose David Bermeol" <jbermeol at purdue.edu>
Cc: "petsc-users" <petsc-users at mcs.anl.gov>, "For users of the development version of PETSc" <petsc-dev at mcs.anl.gov>
Sent: Sunday, October 6, 2013 10:54:53 PM
Subject: Re: [petsc-dev] [petsc-users] mkl-cpardiso configuration
Jose,
Since you are currently working on interfacing cpardiso I would just have a cpardiso.py (or cpardiso_mkl.py) (and NO mkl.py) that manages/lists the libraries needed for cpardiso. Don't have both a cpardiso.py and cpardiso_mkl.py.
Since, as Satish reports, cpardiso.py brings in also the mkl blas/lapack I would also have the cpardiso.py script check that the blas/lapack libraries being linked are compatible with the cpardiso mkl libraries being brought in and provide a useful error message telling them how to set the blas/lapack libraries to fix the problem when needed.
We definitely do not want to muddy up the already horrible blaslapack.py code by introducing the concept of cpardiso there.
Anyways, once you've simplified things, just make a pull request at bitbucket and we can try it and help with the kinks.
Barry
On Oct 6, 2013, at 9:07 PM, Jose David Bermeol <jbermeol at purdue.edu> wrote:
> Well actually I should change the name of the file mkl.py to mkl_cpardiso.py. It doesn't pick up any blas/lapack library. So it would be save and convenient to have it as a separate package(just to keep things modular and simple). If in a near future the solver would need a blas/lapack library I would agree that the blaslapack.py should take care of the installation of the solver.
>
> ----- Original Message -----
> From: "Satish Balay" <balay at mcs.anl.gov>
> To: "Jose David Bermeol" <jbermeol at purdue.edu>
> Cc: "Barry Smith" <bsmith at mcs.anl.gov>, petsc-users at mcs.anl.gov, "For users of the development version of PETSc" <petsc-dev at mcs.anl.gov>
> Sent: Sunday, October 6, 2013 9:57:50 PM
> Subject: Re: [petsc-dev] [petsc-users] mkl-cpardiso configuration
>
> If one specifies '--with-mkl=/foo/bar --download-f-blas-lapack' or
> just '--with-mlk=/foo/bar' where configure picks up /usr/lib/libblas.a
> etc - then things will break.
>
> So somehow these two options should work together - and perhaps the
> way they can do is within blaslapack.py [and not a separate mkl.py]
>
> Satish
>
> On Sun, 6 Oct 2013, Jose David Bermeol wrote:
>
>> Exactly
>> ----- Original Message -----
>> From: "Barry Smith" <bsmith at mcs.anl.gov>
>> To: "Matthew Knepley" <knepley at gmail.com>
>> Cc: "Jose David Bermeol" <jbermeol at purdue.edu>, petsc-users at mcs.anl.gov, "For users of the development version of PETSc" <petsc-dev at mcs.anl.gov>
>> Sent: Sunday, October 6, 2013 9:49:59 PM
>> Subject: Re: [petsc-dev] [petsc-users] mkl-cpardiso configuration
>>
>>
>> Because he is using other stuff in mkl besides blas/lapack!
>>
>> On Oct 6, 2013, at 8:43 PM, Matthew Knepley <knepley at gmail.com> wrote:
>>
>>> On Sun, Oct 6, 2013 at 8:04 PM, Jose David Bermeol <jbermeol at purdue.edu> wrote:
>>> Hi, one question about how to configure a new package, intel people suggest to compile mkl-cpardiso using the following flags for the linker:
>>>
>>> -Wl,--start-group -L$(MKL_PATH)/lib/intel64/ -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -Wl,--end-group -lpthread -lm -liomp5
>>>
>>> Now I want to be able to do this just using the flag --with-mkl-dir=$(MKL_PATH) during Petsc configuration. I've been trying to modify my mkl.py file to achieve this, however your configuration system is a little bit complex, so if you code give some guidelines to achieve this or files to look how to do it would be great.
>>
>> Make a pull request with all your current stuff and we can look at how you've organized it and make suggestions. Otherwise it is too much email guess work with incomplete information.
>>
>> Barry
>>
>>>
>>> Is there a reason you do not want to use --with-blas-lapack-lib?
>>>
>>> Thanks,
>>>
>>> Matt
>>>
>>> Thanks
>>>
>>>
>>>
>>> --
>>> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
>>> -- Norbert Wiener
>>
More information about the petsc-dev
mailing list