-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libflame LAPACK interface: multiple calls within a OMP do loop #34
Comments
Although I have to admit we're using the AMDs libflame-fork, I see the same error when calling
And here is |
another error from the same function:
|
Hi, I am Vasanth, part of libFLAME developer team in AMD. |
@srvasanth thanks for the quick follow-up! I've been using Spack to build libflame, this is the spec:
which according to the Spack package translates to:
The patch you're seeing there is from this PR: #52 (see also spack/spack#24358). The full Spack spec to install CP2K with the AMD toolchain was: $ spack install cp2k@master%[email protected]~libint+libvori+spglib smm=libxsmm ^amdfftw+openmp ^amdscalapack ^amdblis threads=openmp ^amdlibflame threads=openmp tested on the HPE XE System (Dual-AMD CPU 7742) You can drop the I am currently waiting for the results of another run with a debug-enabled amdlibflame which should give a proper traceback. |
@dev-zero the option --enable-supermatrix in the configure command enables multi-threading inside libFLAME and more importantly it disables thread safety features of libFLAME. This should be the one causing the issue. Thanks |
@srvasanth ok, this would be bad since we have packages in our dependency chain which seemingly require that to be enabled (but maybe it is a misunderstanding what |
This is the log with the CP2K regtests with a debug-enabled amdlibflame: error_summary.txt which contains the symbols inside amdlibflame for better traceback. |
Hi @dev-zero , can you please try without the 'threads=openmp' setting for your sample code? As you mentioned, it may be the confusion in using that flag that is causing the issue. Thanks |
@srvasanth sorry for the late reply. I can confirm: with |
Hi @dev-zero, sorry for the late reply. The current threading feature in amdlibflame is an experimental feature and can be used only through native libflame interfaces. Hence it won't be useful for accelerating applications using LAPACK Fortran interfaces. The current recommended setting for amdlibflame is to disable threading. Correspondingly, the spack command will be: |
@srvasanth thanks a lot for the clarification. Will keep the threading in amdlibflame disabled for now. Interestingly it seems that despite the functionality supposedly available only via the libflame native interface, building amdlibflame with threads and then running via the LAPACK interface breaks my calculations (I haven't tried with the latest version of amdlibflame, though). |
Dear libflame developer,
I aim to compute a series of LU factorisation and solves of dense matricies (basically using dgetrf and dgetrs calls from LAPACK). A minimal example with a small matrix follows
This piece of code runs fine with LAPACK or the MKL. I also manage to run it fine with LIBFLAME but only when OMP_NUM_THREADS=1. As soon as OMP_NUM_THREADS > 1, the code crashes and yields
I tried it on several platforms with sandybridge, haswell or zen2 processors and using the GNU or the Intel compilers but I couldn't make it work. Any idea what is causing this problem?
Best regards.
The text was updated successfully, but these errors were encountered: