Commit Graph

33 Commits

Author SHA1 Message Date
Pietro Bonfa 5065099c24 Fixed race condition in error check for GPU assignment 2020-06-30 21:35:06 +02:00
Pietro Bonfa 84906d6c12 Assign the same GPU to all OpenMP threads. 2020-06-23 23:30:37 +02:00
Pietro Bonfa 23ec514f8d Warn used when something goes wrong with initialization 2020-04-26 17:06:29 +02:00
Pietro Bonfa 3549dade73 Merge commit '6dccd3df' into gpu-develop 2020-04-05 19:01:56 +02:00
giacombum 1f450feec1 new FFTXlib based on OpenMP 2020-02-13 16:03:41 +00:00
Pietro Bonfa f6ecad15e2 Restructured CUDA related messages. Added user friendly info about GPU over-subscription. 2019-02-05 12:14:52 +01:00
Pietro Bonfa f623dd0962 mp_start allocates some buffers on the GPU thus it should be called AFTER cudaSetDevice. This is a partial fix since it can happen that world_comm/=MPI_WORLD_COMM 2018-09-28 16:14:22 +02:00
Pietro Bonfa 40e6a1ac1a Fixed serial compilation 2018-07-06 15:08:54 +02:00
Pietro Bonfa f666d237e1 Merged changes from upstream develop 2018-04-18 15:39:05 +02:00
Pietro Delugas 01516b828a fixing compilation for gfortran 4.4.8 and older
in mp_world.f90 a declaration of mp_count_nodes was removed by the
preprocessor for gfortran versions 4.4.8 and previous. This is no longer
necessary and it was in fact making fail the compilation
2018-04-17 16:23:49 +02:00
Pietro Bonfa 3deff62a47 Added GPU device selection 2018-04-10 14:13:06 +02:00
Pietro Bonfa 152e589b7e mp_count_nodes is now compatible with gfortran 4.7 2018-02-13 09:08:59 +01:00
Pietro Bonfa ef3b0b98b6 Corrected serial build, minor style edits 2018-02-06 15:39:45 +01:00
Pietro Bonfa 13cb28b05b Now mp_count_nodes returns colors and keys possibly needed for mpi_comm_split 2018-02-06 12:09:08 +01:00
giannozz bb112e77a8 __OPENMP => _OPENMP (set by all OpenMP-aware compilers)
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13951 c92efa57-630b-4861-b058-cf58834340f0
2017-10-25 07:32:10 +00:00
pietrodelugas 3107b87185 logic in commit 139000 was not wrong and mp_count_node was not compiled in non gfortran compilers, fixed
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13903 c92efa57-630b-4861-b058-cf58834340f0
2017-10-12 14:59:48 +00:00
pietrodelugas 7608019f47 mp_count_nodes compilation and call preprocessed out for old versions of gfortran (v < 4.8)
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13900 c92efa57-630b-4861-b058-cf58834340f0
2017-10-12 07:18:08 +00:00
giannozz 5bea533594 Added utility routine to count number of nodes
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13842 c92efa57-630b-4861-b058-cf58834340f0
2017-09-14 15:47:23 +00:00
giannozz 326374056b Removal of too long lines (Pietro B.) and of tabulators
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13841 c92efa57-630b-4861-b058-cf58834340f0
2017-09-14 15:13:08 +00:00
giannozz a2fdf32348 More removal of unused variables, or of annoying compiler messages, by SP
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@12307 c92efa57-630b-4861-b058-cf58834340f0
2016-04-14 13:04:19 +00:00
giannozz 29f5a76cf0 For some obscure reason, Fermi deson't seem to like mpi_init_thread with
option MPI_THREAD_MULTIPLE, while MPI_THREAD_FUNNELED seems to work ok.
Since the latter case is all we need, I think it is safer to stick to it


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@11797 c92efa57-630b-4861-b058-cf58834340f0
2015-10-22 06:54:42 +00:00
spigafi 27e382ee94 Now works. Better to support MPI_THREAD_MULTIPLE than MPI_THREAD_FUNNELED, more generic and useful for the future.
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@11608 c92efa57-630b-4861-b058-cf58834340f0
2015-07-06 18:50:28 +00:00
giannozz eee4fbe6cc MPI_INIT_THREAD should be used instead of MPI_INIT for MPI+OpenMP (suggested
by Fabien Leydier; this patch had been applied some time ago then reverted 
because incompatible with very old MPI libraries)


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@11607 c92efa57-630b-4861-b058-cf58834340f0
2015-07-04 17:46:05 +00:00
giannozz af5d095861 Latest commit unfortunately doesn't seem to work on older MPI versions.
reverted to previous version while waiting for better ideas,


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@11314 c92efa57-630b-4861-b058-cf58834340f0
2015-01-13 15:57:31 +00:00
giannozz ac46639f0d MPI_INIT_THREAD should be used instead of MPI_INIT for MPI+OpenMP (suggested
by Fabien Leydier)


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@11313 c92efa57-630b-4861-b058-cf58834340f0
2015-01-13 15:15:38 +00:00
spigafi 14857baf8f Protecting MPI calls with pragmas, now it compiles in serial. -- Happy New Year to everybody!
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@10654 c92efa57-630b-4861-b058-cf58834340f0
2013-12-31 10:54:42 +00:00
giannozz f55fbe392a Cleanup of the parallel part: check if mpi is initialized moved from
mp.f90 to mp_world.f90, interface mp_comm_free used instead of direct
call to mpi_comm_free, deallocation of communicators. Should be harmless
but please check.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@10649 c92efa57-630b-4861-b058-cf58834340f0
2013-12-28 09:29:14 +00:00
giannozz 95600c8582 More cleanup of parallel modules: mp_global no longer contains references to
variables for the "world" MPI communicator. The latter are to be found in 
world_comm instead. mp_global should be used only to start and to end the
various parallelization levels. Many small but harmless changes: a few 
variables removed or moved to another module in most cases.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@10558 c92efa57-630b-4861-b058-cf58834340f0
2013-10-27 09:09:10 +00:00
giannozz 4c269ac75b All references to world_comm removed: all parallelism in QE takes place
inside a single communicator, passed at the very beginning of the calculation


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@10550 c92efa57-630b-4861-b058-cf58834340f0
2013-10-23 06:35:17 +00:00
ccavazzoni 8be0d2f76b - add explicit communicator in "mp" cals
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@10483 c92efa57-630b-4861-b058-cf58834340f0
2013-09-26 20:48:16 +00:00
ccavazzoni 68d56dfcf2 - commit of Axel patches to remove dependencies form mpi_world_comm
and to setup blacs grid accordingly



git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@10480 c92efa57-630b-4861-b058-cf58834340f0
2013-09-26 15:47:31 +00:00
giannozz b76c962d0f Changes to MPI initialization suggested by Axel in order to make gluing with
QMMM easier


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@10475 c92efa57-630b-4861-b058-cf58834340f0
2013-09-23 12:57:14 +00:00
giannozz aca32a501a Module mp_global split into more modules, one per parallelization level.
Module mp_global is still there for compatibility and still contains the
routine mp_startup that performs the intialization, but shouldn't be any
longer used in new developments and should be slowly replaced by specific
modules. New module containing command-line options added. Command-line
options are read at the beginning of the run and broadcast to all processors
(there is no guarantee that command-line options cam be accessed by all mpi
 processes). Nothing should be broken by these changes but please verify if
all parallelization levels work (I have limited access to parallel machines
right now)

The reason for these changes, and for those that will come soon, is to make
image parallelization easier (in particular in NEB but also for other cases). 
Right now it is a pain, in part because the initialization is inadequate,
in part because it is never clear who reads/writes what from/to where.
It will take a few weeks before everything converges to a stable state.
Meanwhile, please be patient and fix/report problems.



git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@9876 c92efa57-630b-4861-b058-cf58834340f0
2013-01-28 09:21:12 +00:00