diff options
author | schnetter <schnetter@51d2df92-0e4f-0410-a727-bd43d766d6b6> | 2007-07-10 15:55:34 +0000 |
---|---|---|
committer | schnetter <schnetter@51d2df92-0e4f-0410-a727-bd43d766d6b6> | 2007-07-10 15:55:34 +0000 |
commit | 53b2ec1501a117c1f3bbbf59d4769e9f7bd3205e (patch) | |
tree | 49e07ea7b3544aa28d9400c0ef2c0cd63574ddb6 | |
parent | 3de444722c79a9bcdc39ea9ec733d3a21b974f87 (diff) |
Check whether Fortran parameters work correctly
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/Fortran/trunk@37 51d2df92-0e4f-0410-a727-bd43d766d6b6
-rw-r--r-- | param.ccl | 5 | ||||
-rw-r--r-- | schedule.ccl | 5 | ||||
-rw-r--r-- | src/make.code.defn | 3 | ||||
-rw-r--r-- | src/paramcheck.F90 | 15 |
4 files changed, 27 insertions, 1 deletions
@@ -1 +1,6 @@ # Parameter definitions for thorn Fortran + +CCTK_INT one "This parameter has the value one" +{ + 1:1 :: "1" +} 1 diff --git a/schedule.ccl b/schedule.ccl index fb282a2..7adc0c9 100644 --- a/schedule.ccl +++ b/schedule.ccl @@ -1 +1,6 @@ # Schedule definitions for thorn Fortran + +SCHEDULE CheckFortranParameters AT paramcheck +{ + LANG: Fortran +} "Test whether Fortran parameters work correctly" diff --git a/src/make.code.defn b/src/make.code.defn index d9c9c05..1c0e5d7 100644 --- a/src/make.code.defn +++ b/src/make.code.defn @@ -39,7 +39,8 @@ SRCS = cctk.F90 \ cctk_Types.F90 \ cctk_Version.F90 \ cctk_WarnLevel.F90 \ - util_Table.F90 + util_Table.F90 \ + paramcheck.F90 else diff --git a/src/paramcheck.F90 b/src/paramcheck.F90 new file mode 100644 index 0000000..489949e --- /dev/null +++ b/src/paramcheck.F90 @@ -0,0 +1,15 @@ +#include <cctk.h> +#include <cctk_Arguments.h> +#include <cctk_Functions.h> +#include <cctk_Parameters.h> + +subroutine CheckFortranParameters (CCTK_ARGUMENTS) + implicit none + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + DECLARE_CCTK_FUNCTIONS + + if (one /= 1) then + call CCTK_PARAMWARN ("Fortran parameters do not work -- check the C/Fortran language interface") + end if +end subroutine CheckFortranParameters |