Last change
on this file since 1031 was
953,
checked in by adurocher, 5 years ago
|
trunk : GPU implementation with OpenACC ( merge from glcp.idris.fr )
|
File size:
656 bytes
|
Rev | Line | |
---|
[901] | 1 | module abort_mod |
---|
| 2 | implicit none |
---|
| 3 | |
---|
| 4 | contains |
---|
| 5 | |
---|
| 6 | !!!Abort execution |
---|
| 7 | subroutine dynamico_abort( message ) |
---|
| 8 | use mpi_mod |
---|
| 9 | implicit none |
---|
| 10 | character(len=*), optional :: message |
---|
| 11 | integer :: ierr |
---|
| 12 | |
---|
| 13 | !$omp single |
---|
| 14 | print *, "Abort !" |
---|
| 15 | if(present(message)) print *, message |
---|
| 16 | call MPI_Abort(MPI_COMM_WORLD, -1, ierr) |
---|
| 17 | !$omp end single |
---|
| 18 | end subroutine |
---|
[953] | 19 | |
---|
| 20 | !!!Abort execution when openacc is on |
---|
| 21 | subroutine abort_acc( message ) |
---|
| 22 | use mpi_mod |
---|
| 23 | implicit none |
---|
| 24 | character(len=*), optional, intent(in) :: message |
---|
| 25 | #ifdef _OPENACC |
---|
| 26 | call dynamico_abort( "Not tested with OpenACC ! " // message ) |
---|
| 27 | #endif |
---|
| 28 | end subroutine |
---|
| 29 | end module |
---|
Note: See
TracBrowser
for help on using the repository browser.