<div dir="ltr">Dear all,<div><br></div><div><span style="font-family:arial,sans-serif;font-size:13px">When compiling QE 5.1 on BGP, using the xl compilers, we encountered multiple issues, and were able to resolve them with appropriate source code changes.</span><br>

</div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">I listed below the bugs we think we found and how we solved them. </span></div>

<div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">We used the following command to configure:</div><div style="font-family:arial,sans-serif;font-size:13px">

<br></div><div style="font-family:arial,sans-serif;font-size:13px"> MPICC=mpixlc_r F77=mpixlf77_r F90=mpixlf90_r MPIF90=mpixlf90_r ./configure --prefix=/opt/apps/espresso/5.1 ARCH=ppc64-bg --enable-openmp FFT_LIBS=-L/opt/apps/fftw/3.3.2-double/lib/</div>

<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">configure completed without errors, or warning.</div><div style="font-family:arial,sans-serif;font-size:13px">

<br></div><div style="font-family:arial,sans-serif;font-size:13px">Issues were only encountered at the make step. </div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">

The first issue wais that the default location for the compilers was incorrect.  For an unknown reason, make exited with an error, because  mpixlf90_r was not found. Specifically,</div><div style="font-family:arial,sans-serif;font-size:13px">

<br></div><div style="font-family:arial,sans-serif;font-size:13px">/bgsys/drivers/ppcfloor/comm/xl.ndebug/bin/mpixlf90_r was not found.<br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">

We then manually changed the make.sys file from</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">LD             = /bgsys/drivers/ppcfloor/comm/xl.ndebug/bin/mpixlf90_r</div>

<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">to</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">

LD             = /bgsys/drivers/ppcfloor/comm/xl/bin/mpixlf90_r</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"> </div><div style="font-family:arial,sans-serif;font-size:13px">

We then noticed that other files also used this "ndebug" path for the compilers.  So, we updated:</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">

<div>install/configure</div><div>install/make_lapack.inc</div><div>install/<a href="http://configure.ac/" target="_blank">configure.ac</a></div><div>lapack-3.2/make.inc</div></div><div style="font-family:arial,sans-serif;font-size:13px">

<br></div><div style="font-family:arial,sans-serif;font-size:13px">making the same path change in each of them.</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">

This eliminated the compiler not found error.</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">

Next, we encountered issues with some OMP lines in the files:</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Modules/tsvdw.f90 <br></div><div style="font-family:arial,sans-serif;font-size:13px">

and</div><div style="font-family:arial,sans-serif;font-size:13px">Modules/mm_dispersion.f90<br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">

The errors all relate to the REDUCTION clause of omp lines. </div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><div>"tsvdw.f90", line 1339.45: 1514-504 (S) A variable in the REDUCTION clause or any component or element thereof must not have the POINTER attribute; nor be a pointee, an allocatable object, an assumed-size array, or a THREADLOCAL common block variable.</div>

<div>"tsvdw.f90", line 1360.5: 1514-426 (S) The directive specified for the DO loop does not match the END PARALLEL DO directive, or no directive matches the END PARALLEL DO directive.</div><div>"tsvdw.f90", line 1437.19: 1514-504 (S) A variable in the REDUCTION clause or any component or element thereof must not have the POINTER attribute; nor be a pointee, an allocatable object, an assumed-size array, or a THREADLOCAL common block variable.</div>

<div>"tsvdw.f90", line 1437.40: 1514-504 (S) A variable in the REDUCTION clause or any component or element thereof must not have the POINTER attribute; nor be a pointee, an allocatable object, an assumed-size array, or a THREADLOCAL common block variable.</div>

<div>"tsvdw.f90", line 1556.5: 1514-426 (S) The directive specified for the DO loop does not match the END PARALLEL DO directive, or no directive matches the END PARALLEL DO directive.</div><div>"tsvdw.f90", line 1562.19: 1514-504 (S) A variable in the REDUCTION clause or any component or element thereof must not have the POINTER attribute; nor be a pointee, an allocatable object, an assumed-size array, or a THREADLOCAL common block variable.</div>

<div>"tsvdw.f90", line 1562.40: 1514-504 (S) A variable in the REDUCTION clause or any component or element thereof must not have the POINTER attribute; nor be a pointee, an allocatable object, an assumed-size array, or a THREADLOCAL common block variable.</div>

<div>"tsvdw.f90", line 1700.5: 1514-426 (S) The directive specified for the DO loop does not match the END PARALLEL DO directive, or no directive matches the END PARALLEL DO directive.</div><div>"tsvdw.f90", line 1879.46: 1514-504 (S) A variable in the REDUCTION clause or any component or element thereof must not have the POINTER attribute; nor be a pointee, an allocatable object, an assumed-size array, or a THREADLOCAL common block variable.</div>

<div>"tsvdw.f90", line 1880.19: 1514-504 (S) A variable in the REDUCTION clause or any component or element thereof must not have the POINTER attribute; nor be a pointee, an allocatable object, an assumed-size array, or a THREADLOCAL common block variable.</div>

<div>"tsvdw.f90", line 1880.46: 1514-504 (S) A variable in the REDUCTION clause or any component or element thereof must not have the POINTER attribute; nor be a pointee, an allocatable object, an assumed-size array, or a THREADLOCAL common block variable.</div>

<div>"tsvdw.f90", line 2095.13: 1515-095 (E) If a variable is specified in a REDUCTION clause with a reduction operator or function, any use of that variable must be in a reduction statement.</div></div><div style="font-family:arial,sans-serif;font-size:13px">

<br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><div>"mm_dispersion.f90", line 377.78: 1514-383 (S) An identifier in the REDUCTION clause was defined elsewhere as a PROGRAM, subprogram, INTRINSIC function, ENTRY name or RESULT name.</div>

<div>"mm_dispersion.f90", line 391.5: 1514-426 (S) The directive specified for the DO loop does not match the END PARALLEL DO directive, or no directive matches the END PARALLEL DO directive.</div><div>"mm_dispersion.f90", line 504.104: 1514-383 (S) An identifier in the REDUCTION clause was defined elsewhere as a PROGRAM, subprogram, INTRINSIC function, ENTRY name or RESULT name.</div>

<div>"mm_dispersion.f90", line 527.5: 1514-426 (S) The directive specified for the DO loop does not match the END PARALLEL DO directive, or no directive matches the END PARALLEL DO directive.</div></div><div style="font-family:arial,sans-serif;font-size:13px">

<br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">To eliminate these errors, we disabled omp at those lines by deleting the omp commands.  However, we would prefer to use the full capacity of omp, and we are unsure if we may accidentally interfere other aspects of the code by removing this.<br>

</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Regards,</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">

Filipe and Paul Whitford</div><div><br></div>-- <br><div dir="ltr">_________________________________________<br>Filipe Camargo Dalmatti Alves Lima<br>PhD Student<br>University of São Paulo, Physics Institute, Materials Physics Department, Nanomol Group, Brazil.<br>

Phones:    (11) 3091-6881  (USP)<br>                (11) 97408-2755 (Vivo)<br></div>
</div></div>