Re: [Pw_forum] The coordinate of X-point in GaAs band structure calculation

2016-10-30 Thread Stefano de Gironcoli
The one you are using: ibrav=1.
Do not expect to see a band structure similar to the usual one tho

stefano 
(sent from my phone)

> On 31 Oct 2016, at 03:03, evan  wrote:
> 
> Dear Stefano and Andrew
> 
> Thank you for your kind replies. Let me ask a more general question which I 
> think about.
> 
>  I want to calculate the band structure of GaAs (FCC structure) in a simple 
> cubic lattice cell with eight atoms (ibrav =1). If I specify the k points in 
> units of 2pi/a (K_POINTS tpiba_b), the high symmetry points in Brillioun zone 
> of which cell I should specify in the input file, FCC (ibrav =2) or those of 
> SC (ibrav=1) lattice structure?
> 
> If I specify the k points in in crystal coordinates (K_POINTS crystal_b), 
> then of which cell I should specify the k points in the input files, FCC or 
> SC lattice structure.
> 
> Thank you in advance.
> 
> Regards
> 
> Evan
> 
> USC, China
> 
> 
> At 2016-10-30 02:17:33, "stefano de gironcoli"  wrote:
> Dear Evan,
>GaAS structure is zincblend (2 atoms per cell). its X point is indeed 
> 2pi/a(1,0,0).
>if you choose to compute GaAs in a SC cell (8 atoms pr cell) then that 
> point is indeed equivalent to Gamma. The zone boundary of the SC cell is 
> pi/a(1,0,0) but this of course does not correspond to the X point of the 
> zincblend structure.
>   HTH
>  stefano
> 
>> On 29/10/2016 16:00, evan wrote:
>> Hello, everyone
>> 
>> I calculated the band structure of GaAs in a simple cubic lattice cell 
>> (ibrav=1), I searched from the internet the coordinates of X-point in the 
>> first Brillouin zone are 2pi/a(0,0,1) or 2pi/a(1,0,0), but both results show 
>> that band gap occurs at G and X points simultaneously, it seems to me that 
>> the X is equivalent to G, can you tell me the correct X point coordinates 
>> which give me the reasonable result. The input files and results are 
>> attached, you can show what is wrong in the input file.
>> 
>> Your suggestions are appreciated.
>> 
>> Yours sincerely
>> 
>> Evan
>> 
>> USC, China 
>> 
>> 
>> 
>>  
>> 
>> 
>> 
>>  
>> 
>> 
>> 
>> ___
>> Pw_forum mailing list
>> Pw_forum@pwscf.org
>> http://pwscf.org/mailman/listinfo/pw_forum
> 
> 
> 
>  
> 
> ___
> Pw_forum mailing list
> Pw_forum@pwscf.org
> http://pwscf.org/mailman/listinfo/pw_forum
___
Pw_forum mailing list
Pw_forum@pwscf.org
http://pwscf.org/mailman/listinfo/pw_forum

[Pw_forum] Unexpected Termination of ph.x job

2016-10-30 Thread Yin Li
Dear QE community,

I received an error
"12 total processes killed (some possibly by mpirun during cleanup) " from
high performance computer (HPC) after I was running a ph.x job. This error
information appears after the following texts.
"
 Representation   235  1 modes -B_u  To be done

 Representation   236  1 modes -B_u  To be done

 Representation   237  1 modes -B_u  To be done

 Representation   238  1 modes -B_u  To be done

 Representation   239  1 modes -B_u  To be done

 Representation   240  1 modes -B_u  To be done
"

Could anybody help me to figure out what cause this error? Is it due to the
memory limitation by my HPC?

Thank you very much!

Best Regards,
Yin


-- 
--
Dr. Yin Li
Department of Biophysics,Medical School, University of Pecs,
No.12 Szigeti Street, Pecs, H-7624, HUNGARY
Phone: +36-72-535271/36271
___
Pw_forum mailing list
Pw_forum@pwscf.org
http://pwscf.org/mailman/listinfo/pw_forum

Re: [Pw_forum] The coordinate of X-point in GaAs band structure calculation

2016-10-30 Thread evan
Dear Stefano and Andrew

Thank you for your kind replies. Let me ask a more general question which I 
think about.

 I want to calculate the band structure of GaAs (FCC structure) in a simple 
cubic lattice cell with eight atoms (ibrav =1). If I specify the k points in 
units of 2pi/a (K_POINTS tpiba_b), the high symmetry points in Brillioun zone 
of which cell I should specify in the input file, FCC (ibrav =2) or those of SC 
(ibrav=1) lattice structure?

If I specify the k points in in crystal coordinates(K_POINTS crystal_b), then 
of which cell I should specify the k points in the input files, FCC or SC 
lattice structure.

Thank you in advance.

Regards

Evan

USC, China


At 2016-10-30 02:17:33, "stefano de gironcoli"  wrote:

Dear Evan,
   GaAS structure is zincblend (2 atoms per cell). its X point is indeed 
2pi/a(1,0,0).
   if you choose to compute GaAs in a SC cell (8 atoms pr cell) then that point 
is indeed equivalent to Gamma. The zone boundary of the SC cell is pi/a(1,0,0) 
but this of course does not correspond to the X point of the zincblend 
structure.
  HTH
 stefano

On 29/10/2016 16:00, evan wrote:


Hello, everyone

I calculated the band structure of GaAs in a simple cubic lattice cell 
(ibrav=1), I searched from the internet the coordinates of X-point in the first 
Brillouin zone are 2pi/a(0,0,1) or 2pi/a(1,0,0), but both results show that 
band gap occurs at G and X points simultaneously, it seems to me that the X is 
equivalent to G, can you tell me the correct X point coordinates which give me 
the reasonable result. The input files and results are attached, you can show 
what is wrong in the input file.

Your suggestions are appreciated.

Yours sincerely

Evan

USC, China 





 





 




___
Pw_forum mailing list
Pw_forum@pwscf.orghttp://pwscf.org/mailman/listinfo/pw_forum


___
Pw_forum mailing list
Pw_forum@pwscf.org
http://pwscf.org/mailman/listinfo/pw_forum

Re: [Pw_forum] Gathering 3-d arrays across pools using QE's mp_sum

2016-10-30 Thread Ye Luo
Is kunit=1 ?
Is your nkf and nkf_tot the same as nks nks_tot provided by QE environment?
Could you print the nbase for each processor and see if they are the
numbers expected?

Ye

===
Ye Luo, Ph.D.
Leadership Computing Facility
Argonne National Laboratory

2016-10-30 18:59 GMT-05:00 Vahid Askarpour :

> I allocate an array that needs to be calculated among pools using:
>
> ALLOCATE(A(3,nbnd,nkf)), where nkf is the number of k points per pool and
> initialized as:
> A(:,:,:)=0
>
> Once array A is calculated, I allocate array A_tot as:
>
> ALLOCATE(A_tot(3,nbnd,nkf_tot)), where nkf_tot is the total number of k
> points. and initialized as:
> A_tot(:,:,:)=0
>
> Then I call the poolgather1 as below:
>
> #if defined(__MPI)
> CALL poolgather1(3,nbnd,nkf_tot,nkf,A,A_tot)
> #else
> A_tot=A
> #endif
>
> I have tried both allocating A_tot outside and inside the #if defined
> section.
>
> Poolgather1 is similar to other EPW poolgather and QE poolcollect routines
> and is given below:
>
> subroutine poolgather1 (nsize1,nsize2,nkstot,nks, f_in, f_out)
>   !
>   USE kinds, ONLY : DP
>   USE mp_global, ONLY : my_pool_id, inter_pool_comm, npool,kunit
>   USE mp,ONLY : mp_barrier, mp_bcast,mp_sum
>   USE mp_world,  ONLY : mpime
>   implicit none
>   !
>   INTEGER, INTENT (in) :: nsize1
>   !! first dimension of vectors f_in and f_out
>   INTEGER, INTENT (in) :: nsize2
>   !! second dimension of vectors f_in and f_out
>   INTEGER, INTENT (in) :: nks
>   !! number of k-points per pool
>   INTEGER, INTENT (in) :: nkstot
>   !! total number of k-points
>   REAL (KIND=DP), INTENT (in) :: f_in(nsize1,nsize2,nks)
>   ! input ( only for k-points of mypool )
>   REAL (KIND=DP), INTENT (out)  :: f_out(nsize1,nsize2,nkstot)
>   ! output  ( contains values for all k-point )
>   !
> #if defined(__MPI)
>   INTEGER :: rest, nbase
>   ! the rest of the integer division nkstot / npool
>   ! the position in the original list
>   rest = nkstot / kunit - ( nkstot / kunit / npool ) * npool
>   !
>   nbase = nks * my_pool_id
>   !
>   IF ( ( my_pool_id + 1 ) > rest ) nbase = nbase + rest * kunit
>   !
>   f_out = 0.d0
>   f_out(1:nsize1,1:nsize2,(nbase+1):(nbase+nks)) =
> f_in(1:nsize1,1:nsize2,1:nks)
>   !
>   ! ... reduce across the pools
>   !
>   CALL mp_sum(f_out,inter_pool_comm)
>   !
> #else
>   f_out(:,:,:) = f_in(:,:,:)
>   !
> #endif
>   !
>   end subroutine poolgather1
>
> For my test case, nsize1=3, nsize2=4, nkstot=47.
>
> Thanks,
>
> Vahid
>
>
>
>
> On Oct 30, 2016, at 8:19 PM, Ye Luo  wrote:
>
> mp_sum_rt is interfaced with mp_sum for 3d array. When you mp_sum a 3d
> array, it will be automatically called.
> USE mp,   ONLY : mp_sum_rt is not necessary.
> If you want to check if mp_sum_rt is implicitly called via interface, you
> can print something before and after your mp_sum call and also print
> something in mp_sum_rt. You should find the expected printing behaviour.
>
> if you compare the mp_sum_rt with the 2d and 4d implementation mp_sum_rm
> and mp_sum_r4d, you should find they flat the dimensionality and call the
> same 1-d routine reduce_base_real.
>
> As I asked earlier, how did you allocate your 3-D arrays input and output?
> Are you allocating sufficient size for the output, did you deallocate it by
> mistake? How large is output array size, if it exceeds 2^32, you might hit
> the 32bit integer bug of the variable msglen.
>
> Ye
>
> ===
> Ye Luo, Ph.D.
> Leadership Computing Facility
> Argonne National Laboratory
>
> 2016-10-30 14:25 GMT-05:00 Vahid Askarpour :
>
>> Hi Ye,
>>
>> The changes I am making are part of the EPW/QE code and so the
>> parallelization depends on the QE MPI routines. I have no problem using
>> mp_sum for a 2-D array such as
>> energy(iband,ik). I can use mp_sum to add the contributions from various
>> nodes and print the total in agreement with the output from the serial run.
>> As far as the allocation goes, I use the same 2-D approach to my 3-D array.
>>
>> The problem arises when I use the 3-D array with mp_sum. I noticed that
>> in the Modules/mp.f90 file, there is a subroutine as follows:
>>
>>   SUBROUTINE mp_sum_rt( msg, gid )
>> IMPLICIT NONE
>> REAL (DP), INTENT (INOUT) :: msg(:,:,:)
>> INTEGER, INTENT(IN) :: gid
>> #if defined(__MPI)
>> INTEGER :: msglen
>> msglen = size(msg)
>> CALL reduce_base_real( msglen, msg, gid, -1 )
>> #endif
>>   END SUBROUTINE mp_sum_rt
>>
>>
>> Here  msg has three dimensions. There are other subroutines for 1, 2, and
>> 4 dimensions. Somehow, if I can get  EPW to use the above subroutine, it
>> might work. Adding a statement like:
>>
>> USE mp,   ONLY : mp_sum_rt
>>
>> at the beginning of the file does not work as the compilation fails
>> because EPW does not see the subroutine. Interestingly, it does see mp_sum
>> which is in the same mp.f90 file.
>>
>> So is there a way that I can get EPW t

Re: [Pw_forum] Gathering 3-d arrays across pools using QE's mp_sum

2016-10-30 Thread Vahid Askarpour
I allocate an array that needs to be calculated among pools using:

ALLOCATE(A(3,nbnd,nkf)), where nkf is the number of k points per pool and 
initialized as:
A(:,:,:)=0

Once array A is calculated, I allocate array A_tot as:

ALLOCATE(A_tot(3,nbnd,nkf_tot)), where nkf_tot is the total number of k points. 
and initialized as:
A_tot(:,:,:)=0

Then I call the poolgather1 as below:

#if defined(__MPI)
CALL poolgather1(3,nbnd,nkf_tot,nkf,A,A_tot)
#else
A_tot=A
#endif

I have tried both allocating A_tot outside and inside the #if defined section.

Poolgather1 is similar to other EPW poolgather and QE poolcollect routines and 
is given below:

subroutine poolgather1 (nsize1,nsize2,nkstot,nks, f_in, f_out)
  !
  USE kinds, ONLY : DP
  USE mp_global, ONLY : my_pool_id, inter_pool_comm, npool,kunit
  USE mp,ONLY : mp_barrier, mp_bcast,mp_sum
  USE mp_world,  ONLY : mpime
  implicit none
  !
  INTEGER, INTENT (in) :: nsize1
  !! first dimension of vectors f_in and f_out
  INTEGER, INTENT (in) :: nsize2
  !! second dimension of vectors f_in and f_out
  INTEGER, INTENT (in) :: nks
  !! number of k-points per pool
  INTEGER, INTENT (in) :: nkstot
  !! total number of k-points
  REAL (KIND=DP), INTENT (in) :: f_in(nsize1,nsize2,nks)
  ! input ( only for k-points of mypool )
  REAL (KIND=DP), INTENT (out)  :: f_out(nsize1,nsize2,nkstot)
  ! output  ( contains values for all k-point )
  !
#if defined(__MPI)
  INTEGER :: rest, nbase
  ! the rest of the integer division nkstot / npool
  ! the position in the original list
  rest = nkstot / kunit - ( nkstot / kunit / npool ) * npool
  !
  nbase = nks * my_pool_id
  !
  IF ( ( my_pool_id + 1 ) > rest ) nbase = nbase + rest * kunit
  !
  f_out = 0.d0
  f_out(1:nsize1,1:nsize2,(nbase+1):(nbase+nks)) = f_in(1:nsize1,1:nsize2,1:nks)
  !
  ! ... reduce across the pools
  !
  CALL mp_sum(f_out,inter_pool_comm)
  !
#else
  f_out(:,:,:) = f_in(:,:,:)
  !
#endif
  !
  end subroutine poolgather1

For my test case, nsize1=3, nsize2=4, nkstot=47.

Thanks,

Vahid




On Oct 30, 2016, at 8:19 PM, Ye Luo 
mailto:xw111lu...@gmail.com>> wrote:

mp_sum_rt is interfaced with mp_sum for 3d array. When you mp_sum a 3d array, 
it will be automatically called.
USE mp,   ONLY : mp_sum_rt is not necessary.
If you want to check if mp_sum_rt is implicitly called via interface, you can 
print something before and after your mp_sum call and also print something in 
mp_sum_rt. You should find the expected printing behaviour.

if you compare the mp_sum_rt with the 2d and 4d implementation mp_sum_rm and 
mp_sum_r4d, you should find they flat the dimensionality and call the same 1-d 
routine reduce_base_real.

As I asked earlier, how did you allocate your 3-D arrays input and output? Are 
you allocating sufficient size for the output, did you deallocate it by 
mistake? How large is output array size, if it exceeds 2^32, you might hit the 
32bit integer bug of the variable msglen.

Ye

===
Ye Luo, Ph.D.
Leadership Computing Facility
Argonne National Laboratory

2016-10-30 14:25 GMT-05:00 Vahid Askarpour 
mailto:vh261...@dal.ca>>:
Hi Ye,

The changes I am making are part of the EPW/QE code and so the parallelization 
depends on the QE MPI routines. I have no problem using mp_sum for a 2-D array 
such as
energy(iband,ik). I can use mp_sum to add the contributions from various nodes 
and print the total in agreement with the output from the serial run. As far as 
the allocation goes, I use the same 2-D approach to my 3-D array.

The problem arises when I use the 3-D array with mp_sum. I noticed that in the 
Modules/mp.f90 file, there is a subroutine as follows:

  SUBROUTINE mp_sum_rt( msg, gid )
IMPLICIT NONE
REAL (DP), INTENT (INOUT) :: msg(:,:,:)
INTEGER, INTENT(IN) :: gid
#if defined(__MPI)
INTEGER :: msglen
msglen = size(msg)
CALL reduce_base_real( msglen, msg, gid, -1 )
#endif
  END SUBROUTINE mp_sum_rt


Here  msg has three dimensions. There are other subroutines for 1, 2, and 4 
dimensions. Somehow, if I can get  EPW to use the above subroutine, it might 
work. Adding a statement like:

USE mp,   ONLY : mp_sum_rt

at the beginning of the file does not work as the compilation fails because EPW 
does not see the subroutine. Interestingly, it does see mp_sum which is in the 
same mp.f90 file.

So is there a way that I can get EPW to see mp_sum_rt? This might solve my 
problem.

Since I know that mp_sum works with 2-D arrays, one option is to rewrite my 
files in 2-D, one array for each x,y,z direction. I am trying to avoid this.

Thanks,

Vahid


On Oct 30, 2016, at 3:59 PM, Ye Luo 
mailto:xw111lu...@gmail.com>> wrote:

Hi Vahid,
segfault in mp_sum doesn't necessarily mean a problem there. Probably you wrote 
something to output array but not in a valid place before mp_sum.
Try to check your allocation of output and the copy make sure they are correct.

Ye


Re: [Pw_forum] Gathering 3-d arrays across pools using QE's mp_sum

2016-10-30 Thread Ye Luo
mp_sum_rt is interfaced with mp_sum for 3d array. When you mp_sum a 3d
array, it will be automatically called.
USE mp,   ONLY : mp_sum_rt is not necessary.
If you want to check if mp_sum_rt is implicitly called via interface, you
can print something before and after your mp_sum call and also print
something in mp_sum_rt. You should find the expected printing behaviour.

if you compare the mp_sum_rt with the 2d and 4d implementation mp_sum_rm
and mp_sum_r4d, you should find they flat the dimensionality and call the
same 1-d routine reduce_base_real.

As I asked earlier, how did you allocate your 3-D arrays input and output?
Are you allocating sufficient size for the output, did you deallocate it by
mistake? How large is output array size, if it exceeds 2^32, you might hit
the 32bit integer bug of the variable msglen.

Ye

===
Ye Luo, Ph.D.
Leadership Computing Facility
Argonne National Laboratory

2016-10-30 14:25 GMT-05:00 Vahid Askarpour :

> Hi Ye,
>
> The changes I am making are part of the EPW/QE code and so the
> parallelization depends on the QE MPI routines. I have no problem using
> mp_sum for a 2-D array such as
> energy(iband,ik). I can use mp_sum to add the contributions from various
> nodes and print the total in agreement with the output from the serial run.
> As far as the allocation goes, I use the same 2-D approach to my 3-D array.
>
> The problem arises when I use the 3-D array with mp_sum. I noticed that in
> the Modules/mp.f90 file, there is a subroutine as follows:
>
>   SUBROUTINE mp_sum_rt( msg, gid )
> IMPLICIT NONE
> REAL (DP), INTENT (INOUT) :: msg(:,:,:)
> INTEGER, INTENT(IN) :: gid
> #if defined(__MPI)
> INTEGER :: msglen
> msglen = size(msg)
> CALL reduce_base_real( msglen, msg, gid, -1 )
> #endif
>   END SUBROUTINE mp_sum_rt
>
>
> Here  msg has three dimensions. There are other subroutines for 1, 2, and
> 4 dimensions. Somehow, if I can get  EPW to use the above subroutine, it
> might work. Adding a statement like:
>
> USE mp,   ONLY : mp_sum_rt
>
> at the beginning of the file does not work as the compilation fails
> because EPW does not see the subroutine. Interestingly, it does see mp_sum
> which is in the same mp.f90 file.
>
> So is there a way that I can get EPW to see mp_sum_rt? This might solve my
> problem.
>
> Since I know that mp_sum works with 2-D arrays, one option is to rewrite
> my files in 2-D, one array for each x,y,z direction. I am trying to avoid
> this.
>
> Thanks,
>
> Vahid
>
>
> On Oct 30, 2016, at 3:59 PM, Ye Luo  wrote:
>
> Hi Vahid,
> segfault in mp_sum doesn't necessarily mean a problem there. Probably you
> wrote something to output array but not in a valid place before mp_sum.
> Try to check your allocation of output and the copy make sure they are
> correct.
>
> Ye
>
>
> ===
> Ye Luo, Ph.D.
> Leadership Computing Facility
> Argonne National Laboratory
>
> 2016-10-28 14:33 GMT-05:00 Vahid Askarpour :
>
>> Hi Ye,
>>
>> Thank you for your suggestion. I tried it and when I ran the code, it
>> seg-faulted. I put flags in the code to see where the segmentation faults
>> occurs. It happens as the code calls mp_sum. It seems that mp_sum may not
>> be able to handle this reduction.
>>
>> Cheers,
>> Vahid
>>
>> On Oct 28, 2016, at 2:51 PM, Ye Luo  wrote:
>>
>> In Fortran, whatever-D array is 1-D array. mp_sum should be fine.
>> I saw something strange in your code that you were not copying the right
>> things as you expected.
>> How about the following?
>> output(1:3,1:nbnds,(k_pool*pool_id+1:k_pool*pool_id+k_pool))
>> =input(1:3,1:nbnds,1:k_pool)
>>
>> Ye
>>
>> ===
>> Ye Luo, Ph.D.
>> Leadership Computing Facility
>> Argonne National Laboratory
>>
>> 2016-10-28 12:29 GMT-05:00 Vahid Askarpour :
>>
>>> Dear QE Users,
>>>
>>> I am working on some modifications to the QE-6.0 code using symmetry.
>>> When I try to combine a 3-D array scattered across nodes, I use the
>>> following:
>>>
>>> output(3,nbnds,(k_pool*pool_id+1:k_pool*pool_id+k_pool))=inp
>>> ut(3,nbnds,1:k_pool)
>>>
>>> Here, nbnds is the number of bands, k_pool is the number of k
>>> points/pool, and pool_id is the id of the pool. Here I am assuming the the
>>> number of k points is divisible by the number of pools.
>>>
>>> Then I call mp_sum(output,inter_pool_comm) to put all the segments of
>>> input across the nodes  into one output file.
>>>
>>> When I run the modified QE code in parallel, the output file is
>>> different from the serial run.
>>>
>>> Does the QE's mp_sum allow the above operation for a three-D array?
>>>
>>> Any hints or suggestions would be greatly appreciated.
>>>
>>> Vahid
>>>
>>> Vahid Askarpour
>>> Department of Physics and Atmospheric Science
>>> Dalhousie University,
>>> Halifax, NS, Canada
>>> ___
>>> Pw_forum mailing list
>>> Pw_forum@pwscf.org
>>> http://pwscf.org/mailman/listinfo/pw_forum
>>>
>>
>> 

Re: [Pw_forum] Gathering 3-d arrays across pools using QE's mp_sum

2016-10-30 Thread Vahid Askarpour
Hi Ye,

The changes I am making are part of the EPW/QE code and so the parallelization 
depends on the QE MPI routines. I have no problem using mp_sum for a 2-D array 
such as
energy(iband,ik). I can use mp_sum to add the contributions from various nodes 
and print the total in agreement with the output from the serial run. As far as 
the allocation goes, I use the same 2-D approach to my 3-D array.

The problem arises when I use the 3-D array with mp_sum. I noticed that in the 
Modules/mp.f90 file, there is a subroutine as follows:

  SUBROUTINE mp_sum_rt( msg, gid )
IMPLICIT NONE
REAL (DP), INTENT (INOUT) :: msg(:,:,:)
INTEGER, INTENT(IN) :: gid
#if defined(__MPI)
INTEGER :: msglen
msglen = size(msg)
CALL reduce_base_real( msglen, msg, gid, -1 )
#endif
  END SUBROUTINE mp_sum_rt


Here  msg has three dimensions. There are other subroutines for 1, 2, and 4 
dimensions. Somehow, if I can get  EPW to use the above subroutine, it might 
work. Adding a statement like:

USE mp,   ONLY : mp_sum_rt

at the beginning of the file does not work as the compilation fails because EPW 
does not see the subroutine. Interestingly, it does see mp_sum which is in the 
same mp.f90 file.

So is there a way that I can get EPW to see mp_sum_rt? This might solve my 
problem.

Since I know that mp_sum works with 2-D arrays, one option is to rewrite my 
files in 2-D, one array for each x,y,z direction. I am trying to avoid this.

Thanks,

Vahid


On Oct 30, 2016, at 3:59 PM, Ye Luo 
mailto:xw111lu...@gmail.com>> wrote:

Hi Vahid,
segfault in mp_sum doesn't necessarily mean a problem there. Probably you wrote 
something to output array but not in a valid place before mp_sum.
Try to check your allocation of output and the copy make sure they are correct.

Ye


===
Ye Luo, Ph.D.
Leadership Computing Facility
Argonne National Laboratory

2016-10-28 14:33 GMT-05:00 Vahid Askarpour 
mailto:vh261...@dal.ca>>:
Hi Ye,

Thank you for your suggestion. I tried it and when I ran the code, it 
seg-faulted. I put flags in the code to see where the segmentation faults 
occurs. It happens as the code calls mp_sum. It seems that mp_sum may not
be able to handle this reduction.

Cheers,
Vahid

On Oct 28, 2016, at 2:51 PM, Ye Luo 
mailto:xw111lu...@gmail.com>> wrote:

In Fortran, whatever-D array is 1-D array. mp_sum should be fine.
I saw something strange in your code that you were not copying the right things 
as you expected.
How about the following?
output(1:3,1:nbnds,(k_pool*pool_id+1:k_pool*pool_id+k_pool))=input(1:3,1:nbnds,1:k_pool)

Ye

===
Ye Luo, Ph.D.
Leadership Computing Facility
Argonne National Laboratory

2016-10-28 12:29 GMT-05:00 Vahid Askarpour 
mailto:vh261...@dal.ca>>:
Dear QE Users,

I am working on some modifications to the QE-6.0 code using symmetry. When I 
try to combine a 3-D array scattered across nodes, I use the following:

output(3,nbnds,(k_pool*pool_id+1:k_pool*pool_id+k_pool))=input(3,nbnds,1:k_pool)

Here, nbnds is the number of bands, k_pool is the number of k points/pool, and 
pool_id is the id of the pool. Here I am assuming the the number of k points is 
divisible by the number of pools.

Then I call mp_sum(output,inter_pool_comm) to put all the segments of input 
across the nodes  into one output file.

When I run the modified QE code in parallel, the output file is different from 
the serial run.

Does the QE's mp_sum allow the above operation for a three-D array?

Any hints or suggestions would be greatly appreciated.

Vahid

Vahid Askarpour
Department of Physics and Atmospheric Science
Dalhousie University,
Halifax, NS, Canada
___
Pw_forum mailing list
Pw_forum@pwscf.org
http://pwscf.org/mailman/listinfo/pw_forum

___
Pw_forum mailing list
Pw_forum@pwscf.org
http://pwscf.org/mailman/listinfo/pw_forum


___
Pw_forum mailing list
Pw_forum@pwscf.org
http://pwscf.org/mailman/listinfo/pw_forum

___
Pw_forum mailing list
Pw_forum@pwscf.org
http://pwscf.org/mailman/listinfo/pw_forum

___
Pw_forum mailing list
Pw_forum@pwscf.org
http://pwscf.org/mailman/listinfo/pw_forum

Re: [Pw_forum] Gathering 3-d arrays across pools using QE's mp_sum

2016-10-30 Thread Ye Luo
Hi Vahid,
segfault in mp_sum doesn't necessarily mean a problem there. Probably you
wrote something to output array but not in a valid place before mp_sum.
Try to check your allocation of output and the copy make sure they are
correct.

Ye


===
Ye Luo, Ph.D.
Leadership Computing Facility
Argonne National Laboratory

2016-10-28 14:33 GMT-05:00 Vahid Askarpour :

> Hi Ye,
>
> Thank you for your suggestion. I tried it and when I ran the code, it
> seg-faulted. I put flags in the code to see where the segmentation faults
> occurs. It happens as the code calls mp_sum. It seems that mp_sum may not
> be able to handle this reduction.
>
> Cheers,
> Vahid
>
> On Oct 28, 2016, at 2:51 PM, Ye Luo  wrote:
>
> In Fortran, whatever-D array is 1-D array. mp_sum should be fine.
> I saw something strange in your code that you were not copying the right
> things as you expected.
> How about the following?
> output(1:3,1:nbnds,(k_pool*pool_id+1:k_pool*pool_id+k_
> pool))=input(1:3,1:nbnds,1:k_pool)
>
> Ye
>
> ===
> Ye Luo, Ph.D.
> Leadership Computing Facility
> Argonne National Laboratory
>
> 2016-10-28 12:29 GMT-05:00 Vahid Askarpour :
>
>> Dear QE Users,
>>
>> I am working on some modifications to the QE-6.0 code using symmetry.
>> When I try to combine a 3-D array scattered across nodes, I use the
>> following:
>>
>> output(3,nbnds,(k_pool*pool_id+1:k_pool*pool_id+k_pool))=inp
>> ut(3,nbnds,1:k_pool)
>>
>> Here, nbnds is the number of bands, k_pool is the number of k
>> points/pool, and pool_id is the id of the pool. Here I am assuming the the
>> number of k points is divisible by the number of pools.
>>
>> Then I call mp_sum(output,inter_pool_comm) to put all the segments of
>> input across the nodes  into one output file.
>>
>> When I run the modified QE code in parallel, the output file is different
>> from the serial run.
>>
>> Does the QE's mp_sum allow the above operation for a three-D array?
>>
>> Any hints or suggestions would be greatly appreciated.
>>
>> Vahid
>>
>> Vahid Askarpour
>> Department of Physics and Atmospheric Science
>> Dalhousie University,
>> Halifax, NS, Canada
>> ___
>> Pw_forum mailing list
>> Pw_forum@pwscf.org
>> http://pwscf.org/mailman/listinfo/pw_forum
>>
>
> ___
> Pw_forum mailing list
> Pw_forum@pwscf.org
> http://pwscf.org/mailman/listinfo/pw_forum
>
>
>
> ___
> Pw_forum mailing list
> Pw_forum@pwscf.org
> http://pwscf.org/mailman/listinfo/pw_forum
>
___
Pw_forum mailing list
Pw_forum@pwscf.org
http://pwscf.org/mailman/listinfo/pw_forum

Re: [Pw_forum] Cell Relaxation

2016-10-30 Thread Matthieu Fortin-Deschênes
Dear Ali,

First, if you want to relax the cell, you need to use calculation='vc-relax'
Then you need to specify the namelist &cell, and also your namelist  
&ions is empty. As for what to put in those, you can look at the input  
file description:
http://www.quantum-espresso.org/wp-content/uploads/Doc/INPUT_PW.html#idm5993056
There are also examples on how to do this.

For your second question, the functional used is taken from the  
pseudopotential file and is specified in the file name of the  
pseudopotential. In your case you have pbe (gga). You can just change  
the pseudopotential to have another functional. I don't know anything  
about phonon calculations so I can't tell you what is more accurate.

What you get in the output file is cell parameters in alat units. That  
is in units of celldm(1). I don't think you can change it, but it only  
takes a few seconds to convert by yourself.

Also you should use a Gamma centered k-points mesh for hexagonal  
lattices and (6x6x1) seems too low to me. Did you check convergence  
wrt number of kpoints?

Matthieu Fortin-Deschênes
Polytechnique Montréal



ali.kamran...@yahoo.com a écrit :

> Dear users,
> First, I want to apologize for my very basic question. I am new to DFT.
> I know first step to do any kind of DFT calculations is to relax the  
> cell parameters. But unfortunately, I don't know how to do that. I  
> tried to run the attached input file but it does not seem to be  
> correct.
> My second question is what will differ if I want to relax my  
> structure using LDA or GGA? Is it just using  
> different pseudopotential files? Which approximation is more  
> accurate for phonon calculations?
> And my last question is, is it possible to obtain the relaxed cell  
> parameters based on angstrom?
> Thank you so much in advance.
> Kind Regards,
> Ali



___
Pw_forum mailing list
Pw_forum@pwscf.org
http://pwscf.org/mailman/listinfo/pw_forum

Re: [Pw_forum] How to solve the "wrong ngm" error in allocate_fft() that shows up only in parallel mode?

2016-10-30 Thread GAO Zhe
Hi, Suchit,

Have you solved the allocate_fft() error for your Windows version QE?
Actually, I met the similar problem as you. But, it still seems slightly 
different.

The series version of QE 5.4.0 had been compiled under MinGW 32-bit with 
gfortran and cc. It runs well.

The allocate_fft() error, for me, only occurred if I tried to compile parallel 
version QE, no matter for which version (I have tried from 5.0.2 to 6.0.0) the 
same problem took place.
The only warning information was the last rows of mpif.h
Warning info: for QE 6.0.0: while compiling FFTXlib/stick_base.f90 and 
FFTXlib/fft_types.f90: at end of mpif.h, SAVE statement at (1) follows blanket 
SAVE statement. for QE 5.4.0: while compiling LAXlib/zhpev_drv.f90, the same. 
According to 8 years ago discussion, it seems to be the true reason: 
https://trac.mpich.org/projects/mpich/ticket/208

Two versions of gfortran (5.4.0 under cygwin 32-bit and 4.6.2 under mingw 
32-bit) had been tested, the same problem remained.
32-bit MPICH2-1.4.1p1 was used for all parallel compiling.

Would you like to share your idea with me for solving the allocate_fft error?

Thank you very much,

Best Regards,




--
GAO Zhe, Dr.,
Research Engineer,
Gypsum Activity R&D - Asia,
Saint-Gobain Research Shanghai Co., Ltd.,

No. 55, Wenjing-road, Minhang-district, Shanghai, China,
Tel: +86-21-5475-7251


At 2016-05-23 00:25:36, "Suchit"  wrote:

Dear All,
I am trying to install and use the parallel version of Quantum Espresso 5.4.0. 
During the 
"./configure" step, the parallel machine is detected successfully, and "make 
all" also does not 
return any errors. However, when I run a simple Silicon example, I end up with 
an allocate_fft error, 
and it appears that the ngm value in the program is incorrect. I also ran 
configure and make on QE-5.4.0 
successfully by disabling parallel mode, and found that the same Silicon 
example works well without any allocate_fft and 
ngm errors. 


Below I provide contents from three files. The "Si.scf.in" is the input file to 
pw.x. The "Si.scf-SerialMode.out" 
is the output of pw.x built by disabling the parallel mode, and SCF converges 
without errors -- below I have only shown the 
first few lines for brevity. The "Si.scf-ParallelMode.out" is the output of 
pw.x built by enabling parallel mode (default option).
The "wrong ngm" error in allocate_fft() can be seen, also all the values in the 
"G vectors stick info" are zeroed out.


I am using 64-bit Cygwin for this work. During configure step for both serial 
and parallel modes I use the internal BLAS, LAPACK, and FFT libraries. Thanks 
for any help you might have to offer.


With Best Regards,
--Suchit


 Si.scf.in starts here 
 &CONTROL
   title = 'Silicon' ,
 calculation = 'scf' ,
restart_mode = 'from_scratch' ,
  outdir = './out' ,
 pseudo_dir = 
'/cygdrive/c/Users/sbhattarai/Documents/QuantumEspresso/espresso-5.4.0/pseudo'
  prefix = 'Si' ,
  iprint = 1 ,
 /
 &SYSTEM
   ibrav = 2,
   celldm(1) = 10,
 nat = 2,
ntyp = 1,
nbnd = 10
 ecutwfc = 30 ,
 ecutrho = 120 ,
 /
 &ELECTRONS
 mixing_mode = 'plain' ,
 mixing_beta = 0.7 ,
 diagonalization = 'cg' ,
 /
ATOMIC_SPECIES
   Si   28.08600  Si.pbe-hgh.UPF 
ATOMIC_POSITIONS alat 
   Si  0.00.00.0
   Si  0.250000.250000.25000
K_POINTS gamma


# End of Si.scf.in #







### Start of first few lines of Si.scf-SerialMode.out 
#
 Program PWSCF v.5.4.0 starts on 22May2016 at  8:42:27 


 This program is part of the open-source Quantum ESPRESSO suite
 for quantum simulation of materials; please cite
 "P. Giannozzi et al., J. Phys.:Condens. Matter 21 395502 (2009);
  URL http://www.quantum-espresso.org";, 
 in publications or presentations arising from this work. More details at
 http://www.quantum-espresso.org/quote


 Serial version
 Waiting for input...
 Reading input from standard input


 Current dimensions of program PWSCF are:
 Max number of different atomic species (ntypx) = 10
 Max number of k-points (npk) =  4
 Max angular momentum in pseudopotentials (lmaxx) =  3


 gamma-point specific algorithms are used


 G-vector sticks info
 
 sticks:   dense  smooth PW G-vecs:dense   smooth  PW
 Sum 421 421109 5577 5577 701
 Tot 211 211 55


 Title: 
 Silicon


 bravais-lattice index =2
 lattice parameter 

[Pw_forum] ev.x issue on recent QE release

2016-10-30 Thread Dr. K. C. Bhamu
Dear QE Community members,

I am facing an issue in ev.x command, see below;

laptop/new:~/Espresso_test/PbO$ *ev.x*
 Lattice parameter or Volume are in (au, Ang) > *au*
 Enter type of bravais lattice (fcc, bcc, sc, noncubic) > *noncubic*
 *ev: unexpected lattice non   *
* >>> how to overcome this problem?*
laptop/new:~/Espresso_test/PbO$

I found a link to solve it but it contains very short description.  please
help me.

http://www.qe-forge.org/gf/project/q-e/tracker/?action=Track
erItemEdit&tracker_item_id=162

One of my colleague have different option. In his version he has "hex"
option instead of nocubic.

Waiting for our kind response

Kind regards

K. C. Bhamu
Department of Physics
Goa University, Goa-403 206
India
___
Pw_forum mailing list
Pw_forum@pwscf.org
http://pwscf.org/mailman/listinfo/pw_forum

[Pw_forum] Cell Relaxation

2016-10-30 Thread ali.kamrani91
Dear users,
First, I want to apologize for my very basic question. I am new to DFT.
I know first step to do any kind of DFT calculations is to relax the cell 
parameters. But unfortunately, I don't know how to do that. I tried to run the 
attached input file but it does not seem to be correct.
My second question is what will differ if I want to relax my structure using 
LDA or GGA? Is it just using different pseudopotential files? Which 
approximation is more accurate for phonon calculations?
And my last question is, is it possible to obtain the relaxed cell parameters 
based on angstrom?
Thank you so much in advance.
Kind Regards,
Ali___
Pw_forum mailing list
Pw_forum@pwscf.org
http://pwscf.org/mailman/listinfo/pw_forum