-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1) add a unit test for Fortran API redistribution; 2) fix compile bug…
…s (tnx Willem)
- Loading branch information
Showing
5 changed files
with
119 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
! (C) Copyright 2013 ECMWF. | ||
! This software is licensed under the terms of the Apache Licence Version 2.0 | ||
! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. | ||
! In applying this licence, ECMWF does not waive the privileges and immunities | ||
! granted to it by virtue of its status as an intergovernmental organisation nor | ||
! does it submit to any jurisdiction. | ||
|
||
! This File contains Unit Tests for testing the | ||
! C++ / Fortran Interfaces to the State Datastructure | ||
! | ||
! @author Willem Deconinck | ||
! @author Slavko Brdar | ||
|
||
#include "fckit/fctest.h" | ||
|
||
! ----------------------------------------------------------------------------- | ||
|
||
module fcta_Redistribution_fxt | ||
use atlas_module | ||
use, intrinsic :: iso_c_binding | ||
implicit none | ||
character(len=1024) :: msg | ||
contains | ||
|
||
end module | ||
|
||
! ----------------------------------------------------------------------------- | ||
|
||
TESTSUITE_WITH_FIXTURE(fcta_Redistribution,fcta_Redistribution_fxt) | ||
|
||
! ----------------------------------------------------------------------------- | ||
|
||
TESTSUITE_INIT | ||
call atlas_library%initialise() | ||
END_TESTSUITE_INIT | ||
|
||
! ----------------------------------------------------------------------------- | ||
|
||
TESTSUITE_FINALIZE | ||
call atlas_library%finalise() | ||
END_TESTSUITE_FINALIZE | ||
|
||
TEST( test_resitribution ) | ||
use atlas_module | ||
use atlas_redistribution_module | ||
|
||
implicit none | ||
type(atlas_StructuredGrid) :: grid | ||
type(atlas_functionspace_StructuredColumns) :: fspace1, fspace2 | ||
type(atlas_Redistribution) :: redist | ||
type(c_ptr) :: cptr | ||
grid = atlas_StructuredGrid("O16") | ||
fspace1 = atlas_functionspace_StructuredColumns(grid, atlas_Partitioner("equal_regions")) | ||
fspace2 = atlas_functionspace_StructuredColumns(grid, atlas_Partitioner("regular_bands")) | ||
|
||
redist = atlas_Redistribution(fspace1, fspace2) | ||
|
||
call redist%final() | ||
call fspace2%final() | ||
call fspace1%final() | ||
call grid%final() | ||
END_TEST | ||
|
||
! ----------------------------------------------------------------------------- | ||
|
||
END_TESTSUITE | ||
|