<div dir="ltr">Hi Michael,<div>this is interesting...</div><div><br></div><div>mp_max_memory_size is the maximum size for a MPI message, which I set to 2GB (2*2^30), i.e.<br></div><div><br>mp_max_memory_size = 2*INT(2, KIND=MPI_ADDRESS_KIND)**30 </div><div><br></div><div>The error is that I have to subtract 1 on a 32bit system (Thanks Tiziano to point me that)... However, this is exact what the HUGE function does, therefore I changed the code in the trunk with:</div><div><br></div><div><span style="font-family:monospace"><span style="color: rgb(0, 0, 0);">-   INTEGER(KIND=MPI_ADDRESS_KIND), PARAMETER, PRIVATE :: mp_max_memory_size = 2*INT(2, KIND=MPI_ADDRESS_KIND)**30
</span><br>+   INTEGER(KIND=MPI_ADDRESS_KIND), PARAMETER, PRIVATE :: mp_max_memory_size = HUGE(INT(1,KIND=int_4))<br>
<br></span></div><div><span style="font-family:monospace">Could you try it?</span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">Alfio</span></div><div><span style="font-family:monospace"><br></span></div><div><br></div><div><br></div><div><br></div><div><br>Il giorno lunedì 8 gennaio 2018 12:07:28 UTC+1, Michael Banck ha scritto:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Hi,
<br>
<br>I finally managed to upload CP2K-5.1 to Debian and it fails to build on
<br>32bit systems, always with this error:
<br>
<br>mpif90 -c -g -Wall -O2 -ffast-math -funroll-loops -ftree-vectorize
<br>-ffree-form -ffree-line-length-none -D__GFORTRAN -D__FFTSG -D__FFTW3
<br>-D__FFTW3_UNALIGNED -D__LIBINT -D__LIBXC2 -D__parallel -D__BLACS
<br>-D__SCALAPACK -D__ELPA3 -I/usr/include/elpa/modules/ -I/usr/include
<br>-D__COMPILE_ARCH="\"Linux-<wbr>i686-gfortran\"" -D__COMPILE_DATE="\"Sun Jan
<br>7 17:12:46 UTC 2018\"" -D__COMPILE_HOST="\"x86-grnet-<wbr>01\""
<br>-D__COMPILE_REVISION="\"svn:<wbr>18091\"" -D__DATA_DIR="\"/usr/share/<wbr>cp2k\""
<br>-D__SHORT_FILE__="\"mpiwrap/<wbr>message_passing.F\""
<br>-I'/<<PKGBUILDDIR>>/src/<wbr>mpiwrap/' message_passing.F90 
<br>/<<PKGBUILDDIR>>/src/mpiwrap/<wbr>message_passing.F:85:79:
<br>
<br>    INTEGER(KIND=MPI_ADDRESS_KIND)<wbr>, PARAMETER, PRIVATE ::
<br>mp_max_memory_size = 2*INT(2, KIND=MPI_ADDRESS_KIND)**30
<br>                                                                               1
<br>Error: Arithmetic overflow at (1)
<br>/<<PKGBUILDDIR>>/src/mpiwrap/<wbr>message_passing.f90:3982:40:
<br>
<br>      IF (mp_size .GT. mp_max_memory_size) THEN
<br>                                        1
<br>Error: Symbol 'mp_max_memory_size' at (1) has no IMPLICIT type
<br>[...]
<br>/<<PKGBUILDDIR>>/makefiles/<wbr>Makefile:427: recipe for target
<br>'message_passing.o' failed
<br>make[5]: *** [message_passing.o] Error 1
<br>
<br>See
<br><a href="https://buildd.debian.org/status/fetch.php?pkg=cp2k&arch=i386&ver=5.1-1&stamp=1515345178&raw=0" target="_blank" rel="nofollow" onmousedown="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fbuildd.debian.org%2Fstatus%2Ffetch.php%3Fpkg%3Dcp2k%26arch%3Di386%26ver%3D5.1-1%26stamp%3D1515345178%26raw%3D0\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFS3lDMj5572tnwsEYr7ePz7kh7fQ';return true;" onclick="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fbuildd.debian.org%2Fstatus%2Ffetch.php%3Fpkg%3Dcp2k%26arch%3Di386%26ver%3D5.1-1%26stamp%3D1515345178%26raw%3D0\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFS3lDMj5572tnwsEYr7ePz7kh7fQ';return true;">https://buildd.debian.org/<wbr>status/fetch.php?pkg=cp2k&<wbr>arch=i386&ver=5.1-1&stamp=<wbr>1515345178&raw=0</a>
<br>for a specific build log and
<br><a href="https://buildd.debian.org/status/package.php?p=cp2k" target="_blank" rel="nofollow" onmousedown="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fbuildd.debian.org%2Fstatus%2Fpackage.php%3Fp%3Dcp2k\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEW-_wWIznhFI2VmUvmYoefV25e0w';return true;" onclick="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fbuildd.debian.org%2Fstatus%2Fpackage.php%3Fp%3Dcp2k\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEW-_wWIznhFI2VmUvmYoefV25e0w';return true;">https://buildd.debian.org/<wbr>status/package.php?p=cp2k</a> for the overview.
<br>
<br>I understand that few people run CP2K on 32bit systems in production but
<br>this might be easy(?) enough to fix to make it build?
<br>
<br>
<br>Michael
<br></blockquote></div></div>