Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
fleur
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
51
Issues
51
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
fleur
fleur
Commits
0e656b09
Commit
0e656b09
authored
Mar 01, 2017
by
Daniel Wortmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfixes and modifications for PGI compiler/MAGMA
parent
07a56289
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
9 deletions
+21
-9
cmake/compilerflags.cmake
cmake/compilerflags.cmake
+1
-0
cmake/tests/test_MAGMA.cmake
cmake/tests/test_MAGMA.cmake
+1
-1
diagonalization/eigen_diag.F90
diagonalization/eigen_diag.F90
+6
-1
diagonalization/magma.F90
diagonalization/magma.F90
+9
-3
init/strgn.f90
init/strgn.f90
+3
-3
main/fleur_init.F90
main/fleur_init.F90
+1
-1
No files found.
cmake/compilerflags.cmake
View file @
0e656b09
...
...
@@ -13,6 +13,7 @@ elseif(${CMAKE_Fortran_COMPILER_ID} MATCHES "PGI")
set
(
CMAKE_Fortran_FLAGS
"
${
CMAKE_Fortran_FLAGS
}
-mp -Mr8 -Mr8intrinsics -Mcuda:kepler+ -ta:tesla:cuda7.5 -DUSE_STREAMS -DNUM_STREAMS=
${
N_STREAMS
}
-Minfo=accel -acc"
)
set
(
CMAKE_Fortran_FLAGS_RELEASE
"
${
CMAKE_Fortran_FLAGS_RELEASE
}
-fast -O3"
)
set
(
CMAKE_Fortran_FLAGS_DEBUG
"
${
CMAKE_Fortran_FLAGS_DEBUG
}
-C -traceback -O0 -g -Mchkstk -Mchkptr"
)
set
(
FLEUR_LIBRARIES
${
FLEUR_LIBRARIES
}
"-lstdc++;-L$ENV{MKLROOT}/lib/intel64;-lmkl_scalapack_lp64;-lmkl_intel_lp64;-lmkl_pgi_thread;-lmkl_core;-lmkl_blacs_intelmpi_lp64"
)
elseif
(
${
CMAKE_Fortran_COMPILER_ID
}
MATCHES
"XL"
)
message
(
"IBM/BG Fortran detected"
)
set
(
CMAKE_Fortran_FLAGS
"
${
CMAKE_Fortran_FLAGS
}
-qsmp=omp -qnosave -qarch=qp -qtune=qp -qrealsize=8 -qfixed -qsuppress=1520-022 -qessl"
)
...
...
cmake/tests/test_MAGMA.cmake
View file @
0e656b09
...
...
@@ -6,5 +6,5 @@ LINK_LIBRARIES ${FLEUR_LIBRARIES}
message
(
"MAGMA Library found:
${
FLEUR_USE_MAGMA
}
"
)
if
(
FLEUR_USE_MAGMA
)
set
(
FLEUR_
MPI_DEFINITIONS
${
FLEUR_MPI
_DEFINITIONS
}
"CPP_MAGMA"
)
set
(
FLEUR_
DEFINITIONS
${
FLEUR
_DEFINITIONS
}
"CPP_MAGMA"
)
endif
()
diagonalization/eigen_diag.F90
View file @
0e656b09
...
...
@@ -194,7 +194,12 @@ CONTAINS
#endif
#ifdef CPP_MAGMA
CASE
(
diag_magma
)
CALL
magma_diag
(
lapw
%
nmat
,
eig
,
ne_found
,
hamOvlp
%
a_r
,
hamOvlp
%
b_r
,
zMat
%
z_r
,
hamOvlp
%
a_c
,
hamOvlp
%
b_c
,
zMat
%
z_c
)
if
(
l_real
)
THEN
call
juDFT_error
(
"REAL diagonalization not implemented in magma.F90"
)
else
print
*
,
"Start magma_diag"
CALL
magma_diag
(
lapw
%
nmat
,
eig
,
ne_found
,
a_c
=
hamOvlp
%
a_c
,
b_c
=
hamOvlp
%
b_c
,
z_c
=
zMat
%
z_c
)
endif
#endif
CASE
(
diag_lapack2
)
if
(
noco
%
l_ss
)
call
juDFT_error
(
"zsymsecloc not tested with noco%l_ss"
)
...
...
diagonalization/magma.F90
View file @
0e656b09
...
...
@@ -13,6 +13,7 @@ MODULE m_magma
!**********************************************************
CONTAINS
SUBROUTINE
magma_diag
(
nsize
,
eig
,
ne
,
a_r
,
b_r
,
z_r
,
a_c
,
b_c
,
z_c
)
use
m_packed_to_full
#ifdef CPP_MAGMA
use
magma
#endif
...
...
@@ -62,17 +63,19 @@ CONTAINS
if
(
l_real
)
THEN
call
packed_to_full
(
nsize
,
a_r
,
largea_r
)
call
packed_to_full
(
nsize
,
b_r
,
largeb_r
)
deallocate
(
a_r
,
b_r
)
!
deallocate(a_r,b_r)
ELSE
call
packed_to_full
(
nsize
,
a_c
,
largea_c
)
call
packed_to_full
(
nsize
,
b_c
,
largeb_c
)
deallocate
(
a_c
,
b_c
)
!
deallocate(a_c,b_c)
Endif
if
(
l_real
)
call
juDFT_error
(
"REAL diagonalization not implemented in magma.F90"
)
!Query the workspace size
allocate
(
work
(
1
),
rwork
(
1
),
iwork
(
1
))
print
*
,
"Magma workspace query"
call
flush
()
call
magmaf_zhegvdx_2stage_m
(
NGPU_CONST
,
1
,
MagmaVec
,
MagmaRangeI
,
MagmaLower
,
nsize
,
largea_c
,
nsize
,
largeb_c
,
nsize
,&
0.0
,
0.0
,
1
,
ne
,
mout
,
eigTemp
,
work
,
-1
,
rwork
,
-1
,
iwork
,
-1
,
err
)
lwork
=
work
(
1
)
...
...
@@ -83,6 +86,8 @@ CONTAINS
allocate
(
work
(
lwork
),
rwork
(
lrwork
),
iwork
(
liwork
))
if
(
err
/
=
0
)
call
juDFT_error
(
"Failed to allocate workspaces"
,
calledby
=
"magma.F90"
)
!Now the diagonalization
print
*
,
"Magma diagonalization"
print
*
,
nsize
,
shape
(
largea_c
),
shape
(
eigTemp
),
ne
call
magmaf_zhegvdx_2stage_m
(
NGPU_CONST
,
1
,
MagmaVec
,
MagmaRangeI
,
MagmaLower
,
nsize
,
largea_c
,
nsize
,
largeb_c
,
nsize
,&
0.0
,
0.0
,
1
,
ne
,
mout
,
eigTemp
,
work
,
lwork
,
rwork
,
lrwork
,
iwork
,
liwork
,
err
)
print
*
,
"MAGMA info:"
,
err
...
...
@@ -91,8 +96,9 @@ CONTAINS
DO
i
=
1
,
ne
eig
(
i
)
=
eigTemp
(
i
)
z_c
(:
nsize
,
i
)
=
largea_c
(:
nsize
,
i
)
END
DO
call
judft_error
(
"Eigenvectors are not calculated in MAGMA"
)
!
call judft_error("Eigenvectors are not calculated in MAGMA")
#endif
END
SUBROUTINE
magma_diag
END
MODULE
m_magma
...
...
init/strgn.f90
View file @
0e656b09
...
...
@@ -516,8 +516,8 @@ CONTAINS
print
*
,
stars
%
mx1
,
mxx1
,
stars
%
mx2
,
mxx2
CALL
judft_error
(
"BUG in strgn"
)
endif
stars
%
mx1
=
mxx1
stars
%
mx2
=
mxx2
!
stars%mx1=mxx1
!
stars%mx2=mxx2
!
!---> write /str0/ and /str1/ to unit 51
!
...
...
@@ -894,7 +894,7 @@ CONTAINS
ENDDO
ENDDO
ENDIF
if
(
stars
%
mx1
.ne.
mxx1
.or.
stars
%
mx2
.ne.
mxx2
.or.
stars
%
mx3
.ne.
mxx3
)
call
&
if
(
stars
%
mx1
<
mxx1
.or.
stars
%
mx2
<
mxx2
.or.
stars
%
mx3
<
mxx3
)
call
&
judft_error
(
"BUG 1 in strgen"
)
stars
%
ng2
=
2
;
stars
%
kv2
=
0
;
stars
%
ig2
=
0
;
igz
=
0
;
stars
%
kimax2
=
0
;
stars
%
igfft2
=
0
stars
%
sk2
=
0.0
;
stars
%
pgfft2
=
0.0
;
stars
%
nstr2
=
0
...
...
main/fleur_init.F90
View file @
0e656b09
...
...
@@ -97,7 +97,7 @@
!-t3e
IF
(
mpi
%
irank
.EQ.
0
)
THEN
CALL
startXMLOutput
()
#if
ndef __TOS_BGQ__
#if
!(defined(__TOS_BGQ__)||defined(__PGI))
!Do not open out-file on BlueGene
OPEN
(
6
,
file
=
'out'
,
form
=
'formatted'
,
status
=
'unknown'
)
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment