goddard-fortran-ecosystem / pfunit Goto Github PK
View Code? Open in Web Editor NEWParallel Fortran Unit Testing Framework
License: Other
Parallel Fortran Unit Testing Framework
License: Other
After following the README guide, I have experienced the following error:
./testSuites.inc(1): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: => = . [ % (
ADD_TESTS_SUITE(helloWorld_suite)
---------------------------------^
./testSuites.inc(1): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: => = . [ % (
ADD_TESTS_SUITE(helloWorld_suite)
---------------------------------^
./testSuites.inc(1): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: => = . [ % (
ADD_TESTS_SUITE(helloWorld_suite)
---------------------------------^
compilation aborted for /linkhome/rech/lmd/rlmd998/own_libs/pffunit-serial/include/driver.F90 (code 1)
make: *** [tests.x] Error 1
It turns out the README.md tells you to add testSuites.inc with the following content:
! Add a test suite to the build.
ADD_TESTS_SUITE(helloWorld_suite)
But there is a problem, because there is an extra S, from TESTS to TEST. After applying this simple modification it successfully compiles:
! Add a test suite to the build.
ADD_TEST_SUITE(helloWorld_suite)
It took me a few days to realize about it.
It looks like support for building with GNU make has been removed, but the documentation in the READMEs (especially the main README.md documentation) still refers to the make build using GNUMakefile, which no longer exists.
Travis recently started removing the troublesome oclint
from its osx
builds. Thus, our explicit uninstall causes an error now. Remove from .travis.yml
@mathomp4 I'm a bit confused why the latest regression tests for merge requests onto develop are breaking. My own test for gfortran+OSX with a fresh clone works just fine.
My best bet is that I've introduced a new dependency with some of my C interoperability updates. Could use your help in fixing.
Extensions exist in other projects. Should bring those into framework as optional.
This work was only partially completed before.
Does pFUnit have integration with CMake that allows the tests to run as part of the build? Something like this for GTest:
Framework should have an (ordered) table of pre and post actions to take. MPI driver can then simply be a matter of registering mpi_init() and mpi_finalize().
The following error shows up when trying to compile fArgparse from pFUnit.
Environment variables:
FC=ifort
F90_VENDOR=INTEL
F90=ifort
Cmake command output:
cmake -DSKIP_OPENMP=YES -DSKIP_MPI=YES -DCMAKE_INSTALL_PREFIX=$PFUNIT ..
/ccc/cont003/home/drf/p529jorn/pFUnit/build
[p529jorn@irene171 build]$ cmake -DSKIP_OPENMP=YES -DSKIP_MPI=YES -DCMAKE_INSTALL_PREFIX=$PFUNIT ..
-- The Fortran compiler identification is Intel 17.0.4.20170411
-- The C compiler identification is GNU 4.8.5
-- Check for working Fortran compiler: /ccc/products/ifort-17.0.4.196/system/default/17.0.4.196/bin/intel64/ifort
-- Check for working Fortran compiler: /ccc/products/ifort-17.0.4.196/system/default/17.0.4.196/bin/intel64/ifort -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /ccc/products/ifort-17.0.4.196/system/default/17.0.4.196/bin/intel64/ifort supports Fortran 90
-- Checking whether /ccc/products/ifort-17.0.4.196/system/default/17.0.4.196/bin/intel64/ifort supports Fortran 90 -- yes
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
Error when compiling:
[p529jorn@irene171 build]$ make
[ 17%] Built target generate-type-incs
[ 22%] Built target generate-template-incs
[ 22%] Built target force-generation-of-includes
[ 43%] Built target gftl-shared
[ 43%] Built target demo.x
[ 44%] Building Fortran object extern/fArgParse/src/CMakeFiles/fargparse.dir/BaseAction.F90.o
/ccc/cont003/home/drf/p529jorn/pFUnit/extern/fArgParse/src/BaseAction.F90(110): error #8304: In an intrinsic assignment statement, variable shall not be polymorphic. [N_ARGUMENTS]
this%n_arguments = n_arguments
--------------^
/ccc/cont003/home/drf/p529jorn/pFUnit/extern/fArgParse/src/BaseAction.F90(112): error #8304: In an intrinsic assignment statement, variable shall not be polymorphic. [N_ARGUMENTS]
this%n_arguments = None
--------------^
/ccc/cont003/home/drf/p529jorn/pFUnit/extern/fArgParse/src/BaseAction.F90(123): error #8304: In an intrinsic assignment statement, variable shall not be polymorphic. [DEFAULT]
this%default = String(default)
-----------------^
/ccc/cont003/home/drf/p529jorn/pFUnit/extern/fArgParse/src/BaseAction.F90(125): error #8304: In an intrinsic assignment statement, variable shall not be polymorphic. [DEFAULT]
this%default = default
-----------------^
/ccc/cont003/home/drf/p529jorn/pFUnit/extern/fArgParse/src/BaseAction.F90(128): error #8304: In an intrinsic assignment statement, variable shall not be polymorphic. [DEFAULT]
this%default = NONE
--------------^
/ccc/cont003/home/drf/p529jorn/pFUnit/extern/fArgParse/src/BaseAction.F90(132): error #8304: In an intrinsic assignment statement, variable shall not be polymorphic. [CONST]
this%const = const
--------------^
/ccc/cont003/home/drf/p529jorn/pFUnit/extern/fArgParse/src/BaseAction.F90(134): error #8304: In an intrinsic assignment statement, variable shall not be polymorphic. [CONST]
this%const = NONE
--------------^
/ccc/cont003/home/drf/p529jorn/pFUnit/extern/fArgParse/src/BaseAction.F90(199): warning #6178: The return value of this FUNCTION has not been defined. [MATCHES]
logical function matches(this, argument)
--------------------^
/ccc/cont003/home/drf/p529jorn/pFUnit/extern/fArgParse/src/BaseAction.F90(309): error #8304: In an intrinsic assignment statement, variable shall not be polymorphic. [N_ARGUMENTS]
n_arguments = this%n_arguments
------^
compilation aborted for /ccc/cont003/home/drf/p529jorn/pFUnit/extern/fArgParse/src/BaseAction.F90 (code 1)
make[2]: *** [extern/fArgParse/src/CMakeFiles/fargparse.dir/BaseAction.F90.o] Error 1
make[1]: *** [extern/fArgParse/src/CMakeFiles/fargparse.dir/all] Error 2
make: *** [all] Error 2
It is a Linux machine with Intel Compiler 17.0.4.196
The documentation in the README says that if -DCMAKE_INSTALL_PREFIX is not set then it will default to /usr/local/
. However, in reality it defaults to build/installed. Furthermore, the layout of the installation directory is that of a Windows system rather than a Linux one. While cmake can cope with this easily enough, it would be nice if a unix-like installation could be done when running on Linux.
Is it possible to run just a single tests (or one of a few tests) out of a full suite? By running the executable and searching for command line options, I don't see any way:
Command line arguments:
Options:
'-h', '--help' : Prints this message
'-v', '--verbose' : Logs start/stop of each test
'-d', '--debug' : Logs start/stop of each test (same as -v)
'-o <file>' : Diverts output to specified file
'-robust' : (experimental) runs tests in a separate shell
Attempts to detect/handle hangs and crashes
'-max-timeout-duration <duration>' : Limit detection time for robust
'-max-launch-duration <duration>' : Limit detection time for robust
'-skip n' : used by remote start with 'robust' internally
This flag should NOT be used directly by users.
'-xml <file>' : output JUnit XML to specified file
XML can be used with e.g. Jenkins.
'-name <name>' : give tests an identifying name in XML output
Hi @tclune et al.,
There seems to be a logic error somewhere in either include/add_pfunit_sources.cmake
or one of the functions calling this:
CMake Error at include/add_pfunit_sources.cmake:33 (file):
file problem creating directory:
/tmp.F90unit-20190507-36706-1qjb902/pFUnit-4.0.0/build/tests/funit-core
Call Stack (most recent call first):
include/add_pfunit_ctest.cmake:47 (add_pfunit_sources)
tests/funit-core/CMakeLists.txt:98 (add_pfunit_ctest)
Your code is taking the current working directory and substituting .F90
in the directory path. e.g.,
/tmp/pfunit-20190507-36706-1qjb902/pFUnit-4.0.0/build
➡️ /tmp/pfunit-20190507-36706-1qjb902/pFUnit-4.0.0/build
I think I know the fix for this and can open a PR. This is a blocker for adding a homebrew formula, so the sooner a minor release can be minted after fixing, the better.
I got the error below:
[ 98%] Building Fortran object model/lipluggable/tests/CMakeFiles/tests.dir/home2/rpfische/spack6/opt/spack/linux-centos7-x86_64/gcc-4.9.3/pfunit-3.2.9-lefpp6xzvqfxyixvfjo3gcdrwugtgyel/include/driver.F90.o
/home2/rpfische/spack6/opt/spack/linux-centos7-x86_64/gcc-4.9.3/pfunit-3.2.9-lefpp6xzvqfxyixvfjo3gcdrwugtgyel/include/driver.F90:253.34:
allocate(context, source=newMpiContext())
1
Error: Function 'newmpicontext' at (1) has no IMPLICIT type
This is caused by a comedy of errors. driver.F90 has an "#ifdef USE_MPI" in it. I don't know where USE_MPI was supposed to be defined. This installed version of pFUnit was built with -DMPI=NO, so it was NOT supposed to be defined:
==> 'cmake' '/home2/rpfische/spack6/var/spack/stage/pfunit-3.2.9-lefpp6xzvqfxyixvfjo3gcdrwugtgyel/pFUnit-3.2.9' '-G' 'Unix Makefiles' '-DCMAKE_INSTALL_PREFIX:PATH=/home2/rpfische/spack6/opt/spack/linux-centos7-x86_64/gcc-4.9.3/pfunit-3.2.9-lefpp6xzvqfxyixvfjo3gcdrwugtgyel' '-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo' '-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON' '-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=FALSE' '-DCMAKE_INSTALL_RPATH:STRING=/home2/rpfische/spack6/opt/spack/linux-centos7-x86_64/gcc-4.9.3/pfunit-3.2.9-lefpp6xzvqfxyixvfjo3gcdrwugtgyel/lib;/home2/rpfische/spack6/opt/spack/linux-centos7-x86_64/gcc-4.9.3/pfunit-3.2.9-lefpp6xzvqfxyixvfjo3gcdrwugtgyel/lib64' '-DCMAKE_PREFIX_PATH:STRING=/home2/rpfische/spack6/opt/spack/linux-centos7-x86_64/gcc-4.9.3/python-3.5.2-o4sbclg3sf5uuroc53qpu4axrvr62ar5;/home2/rpfische/spack6/opt/spack/linux-centos7-x86_64/gcc-4.9.3/cmake-3.11.1-joeqauye6ejnz5j3lahtwbpdgc6fpgwa' '-DPYTHON_EXECUTABLE=/home2/rpfische/spack6/opt/spack/linux-centos7-x86_64/gcc-4.9.3/python-3.5.2-o4sbclg3sf5uuroc53qpu4axrvr62ar5/bin/python3.5' '-DBUILD_SHARED=YES' '-DCMAKE_Fortran_MODULE_DIRECTORY=/home2/rpfische/spack6/opt/spack/linux-centos7-x86_64/gcc-4.9.3/pfunit-3.2.9-lefpp6xzvqfxyixvfjo3gcdrwugtgyel/include' '-DBUILD_DOCS=NO' '-DOPENMP=NO' '-DMPI=NO'
However... my project defines its own USE_MPI
. And it becomes a problem because my project compiles the driver.F90
source code, which then mis-interprets my project's USE_MPI
definition as its own.
Given that pFUnit source code is compiled by the user, the solution would be to use longer/more obscure preprocessor symbols. Eg: USE_MPI
-> _PFUNIT_USE_MPI
.
You could add the file .gitattributes
to the main directory that contains the following line:
*.pf linguist-language=fortran
That way, the *.pf files have fortran synthax highlighting on github.
This is already done for your pFUnit_demos repo: https://github.com/Goddard-Fortran-Ecosystem/pFUnit_demos/blob/master/.gitattributes
Thanks for the great unit testing environment!
Some issues came up during the installation. Check below the error:
cmake -DSKIP_OPENMP=YES -DSKIP_MPI=YES ..
-- The Fortran compiler identification is GNU 4.8.5
-- The C compiler identification is GNU 4.8.5
-- Check for working Fortran compiler: /usr/bin/f95
-- Check for working Fortran compiler: /usr/bin/f95 -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/bin/f95 supports Fortran 90
-- Checking whether /usr/bin/f95 supports Fortran 90 -- yes
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- *** Setting default install prefix to /home/users/ajornet/pFUnit/build/installed.
-- *** Override with -DCMAKE_INSTALL_PREFIX=<path>.
-- Performing Test _LOGICAL_DEFAULT_KIND: SUCCESS (value=4)
-- Performing Test _INT_DEFAULT_KIND: SUCCESS (value=4)
-- Performing Test _ISO_INT8: SUCCESS (value=1)
-- Performing Test _ISO_INT16: SUCCESS (value=2)
-- Performing Test _ISO_INT32: SUCCESS (value=4)
-- Performing Test _ISO_INT64: SUCCESS (value=8)
-- Performing Test _REAL_DEFAULT_KIND: SUCCESS (value=4)
-- Performing Test _DOUBLE_DEFAULT_KIND: SUCCESS (value=8)
-- Performing Test _ISO_REAL32: SUCCESS (value=4)
CMake Error at cmake/CheckFortranSource.cmake:13 (string):
string sub-command STRIP requires two arguments.
Call Stack (most recent call first):
cmake/CheckCompilerCapabilities.cmake:57 (CHECK_FORTRAN_SOURCE_RUN)
CMakeLists.txt:55 (include)
-- Performing Test _REAL32_IEEE_SUPPORT: SUCCESS (value=)
-- Performing Test _ISO_REAL64: SUCCESS (value=8)
CMake Error at cmake/CheckFortranSource.cmake:13 (string):
string sub-command STRIP requires two arguments.
Call Stack (most recent call first):
cmake/CheckCompilerCapabilities.cmake:57 (CHECK_FORTRAN_SOURCE_RUN)
CMakeLists.txt:55 (include)
-- Performing Test _REAL64_IEEE_SUPPORT: SUCCESS (value=)
-- Performing Test _ISO_REAL128: SUCCESS (value=10)
CMake Error at cmake/CheckFortranSource.cmake:13 (string):
string sub-command STRIP requires two arguments.
Call Stack (most recent call first):
cmake/CheckCompilerCapabilities.cmake:57 (CHECK_FORTRAN_SOURCE_RUN)
CMakeLists.txt:55 (include)
-- Performing Test _REAL128_IEEE_SUPPORT: SUCCESS (value=)
You need to run this command from the toplevel of the working tree.
CMake Error at cmake/build_submodule.cmake:26 (message):
git submodule update --init failed with 1, please checkout submodules
Call Stack (most recent call first):
extern/CMakeLists.txt:2 (build_submodule)
-- Configuring incomplete, errors occurred!
See also "..../pFUnit/build/CMakeFiles/CMakeOutput.log".
If works after applying the following fixes:
git diff origin/master
diff --git a/cmake/CheckFortranSource.cmake b/cmake/CheckFortranSource.cmake
index 0c0883e..7259c29 100644
--- a/cmake/CheckFortranSource.cmake
+++ b/cmake/CheckFortranSource.cmake
@@ -10,7 +10,7 @@ macro (CHECK_FORTRAN_SOURCE_RUN file var)
# Successful runs return "0", which is opposite of CMake sense of "if":
if (NOT run)
- string(STRIP ${${var}} ${var})
+ string(STRIP "${${var}}" ${var})
if (NOT CMAKE_REQUIRED_QUIET)
message(STATUS "Performing Test ${var}: SUCCESS (value=${${var}})")
endif ()
diff --git a/cmake/build_submodule.cmake b/cmake/build_submodule.cmake
index 4b55ce9..4f70542 100644
--- a/cmake/build_submodule.cmake
+++ b/cmake/build_submodule.cmake
@@ -19,7 +19,7 @@ macro (build_submodule submodule)
if (GIT_SUBMODULE)
execute_process (
COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
RESULT_VARIABLE GIT_SUBMODULE_RESULT
)
if (NOT GIT_SUBMODULE_RESULT EQUAL "0")
Isn't time to rise minimum supported Python to 3.5?
We are three months away from Python2.7 end of support.
Currently the develop branch automatically downloads and installs FTL during the build process. This is convenient for users that do not want to know about this simple dependency, but bad for higher level tools such as spack. It is also bad for users that need to build in an environment that cannot access the internet.
What is needed is an optional CMake command line flag that specifies a path to an installed FTL. If present, then that path is used. If not present, then CMake will obtain FTL from GitHub.
Apologies if you're already aware of this, but the GitHub-created tarballs on releases don't include any git submodules, so they fail to build. And because they're also not git repos, you can't just run git submodule update --init --recursive
to check them out.
Our solution was to add git-archive-all as a submodule, and a make target (dist
, for tradition) that calls it to produce a tarball with all the submodules, and upload that manually to the GitHub release. Our wrapper script is here if that's helpful for you.
I'm currently having a couple of issues with building the pFUnit demos:
The FARGPARSE_TOP_DIR
variable in PFUNIT.mk
is empty, so building the demos don't work:
/home/Tools/pFUnit_demos/Trivial: ./build_with_make_and_run.x
/home/Tools/pFUnit-4.0/build/install/PFUNIT-4.0/include/PFUNIT.mk:10:
/include/FARGPARSE.mk: No such file or directory
make: *** No rule to make target '/include/FARGPARSE.mk'. Stop.
./build_with_make_and_run.x: line 9: ./my_tests: No such file or directory
Fargparse does get installed though, in /path/to/install/FARGPARSE-0.9
Transitively going through PFUNIT.mk
, FARGPARSE.mk
, and GFTL_SHARED.mk
to set their dependency paths correctly seems to fix things. But from the looks of things, these should be set at configure time?
Perhaps just my opinion, but I think you're installing pFUnit (and the dependencies) in the wrong place: if I run cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/install
, I would expect everything to be under /path/to/install
, but it's actually under /path/to/install/PFUNIT-4.0
. This is a bit surprising! I have to set PFUNIT_DIR
to /path/to/install/PFUNIT-4.0
, rather than the path I told CMake. Maybe the modules should go under /path/to/install/includes/pfunit
given the number of them, but I think "principle of least surprise" would be good here -- just install stuff in the conventional paths.
I was trying to create a small demo project that uses all the advanced bells-and-whistles from pfunit 4.0 (develop branch), and am encountering several issues with the install step. I've fixed a few (not yet committed), but am hoping you can help with the python paths.
Currently PFUNITConfig.cmake has the following snippet
set (PFUNIT_PARSER "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_LIST_DIR}/bin/funitproc")
set (PFUNIT_DRIVER "${CMAKE_CURRENT_LIST_DIR}/include/driver.F90")
set (PFUNIT_TESTUTILS "${CMAKE_CURRENT_LIST_DIR}/include/TestUtil.F90")
This is no longer accurate, given the new locations of the config files (trying to be consistent across multiple projects of mine). So I've modified them to be:
set (PFUNIT_PARSER "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_LIST_DIR}/../bin/funitproc")
set (PFUNIT_DRIVER "${CMAKE_CURRENT_LIST_DIR}/../include/driver.F90")
set (PFUNIT_TESTUTILS "${CMAKE_CURRENT_LIST_DIR}/../include/TestUtil.F90")
That seems fine, but funitproc can now not find the parser:
Traceback (most recent call last):
File "/Users/tclune/swdev/GitHub/pFUnit/nag/installed/PFUNIT-4.0/cmake/../bin/funitproc", line 12, in <module>
import funit.pFUnitParser
My problem is that I don't really understand how the previous version worked. I know there are a few options for extending Python's search path, but don't want to resort to that if there is a natural fix.
Current documentation says that there are options:
-SKIP_OPENMP and -SKIP_HAMCREST
but these do not yet exist. Further the legacy "USE_OPENMP" conflicts.
The add_pfunit_test
macro in cmake
only works if it is passed relative paths to the .pf
files. Line 101 of PFUNITConfig.cmake
prepends the absolute path to the source directory of CMakeLists.txt to the file name of the pf-source files. This means that if the provided path is already absolute then cmake will look for a nonexistent file. For example, say CMakeLists.txt
and test.pf
are both in directory /a/b/c
and the absolute path to test.pf
is provided to add_pfunit_test
. Then cmake will be looking for the test source file at location /a/b/c/a/b/c/test.pf
where it does not exist.
The solution to this would be to either check whether an absolute path is provided or to compute the relative path using the cmake file(RELATIVE_PATH)
command.
The find_package() logic should be moved to before the include of PFUNIT.cmake.
For some reason this works on OS X, but the problem shows up on Linux.
This is detritus from earlier refactoring - just did not notice.
This is to get command line arguments.
Some work has already been committed to replicate some of the python command line argument parsing capabilities. Eventually hit a snag with compiler bugs, so it is not yet used in pFUnit. The work should be completed and bug reports filed with vendors if issues still exist.
This avoids the need to duplicate containers and simplifies use of containers across subcomponents.
In our code we have some preprocessing that adds the line number to some aborts that happen to make it easier to find. This is great except for our PfUnit unit testing, as if the line number happens to change -- the unit test will also fail even if everything else is the same. So what I'd like to be able to do is to do a pattern match in the exception handling rather than have to include the line number in the match. I'd just like to see this as an option, not the standard way to do things.
Hi,
I'm having issues trying to install pFUnit on OSX Mojave 10.14.5. Below are the steps that I have taken, hopefully you can see where I'm going wrong.
mkdir build
cd build
cmake .. -DSKIP_MPI -DSKIP_OPENMP
(terminal output in attached output_1.log)make tests
(terminal output in attached output_2.log)make install
(terminal output in attached output_3.log plus errors in screenshot below about "libfunit.a" and "no symbols")In the folder installed/PFUNIT-4.0/include I have the files listed in the attached screenshot below but no base.mk.
[output_1.txt](https://github.com/Goddard-Fortran-Ecosystem/pFUnit/files/3330734/output_1.txt) [output_2.txt](https://github.com/Goddard-Fortran-Ecosystem/pFUnit/files/3330735/output_2.txt) [output_3.txt](https://github.com/Goddard-Fortran-Ecosystem/pFUnit/files/3330736/output_3.txt)The permanent home was moved to a new org under GitHub. Need to update that in CMake and git submodule.
While there are many fans of CamelCase, a strong argument can be made that it is inappropriate for case-insensitive languages. The style I have adopted is for ClassNames to be CamelCase, and methods/variables to be snake_case. For backward compatibility, CamelCase will be be retained until pFUnit 5.0
Build with MPI=YES does not run the mpi-related tests in a canonical manner. Will add a top-level "tests" target and enable ctest to run the full suite of tests.
This is partially implemented as "ignore" on develop branch. Latest JUnit has switched to "disable" so may as well keep up with them while this is not released
This is my first time trying the software. I'm trying to build with gfortran v5.4.0 per README instructions.
$ git clone https://github.com/Goddard-Fortran-Ecosystem/pFUnit.git
$ export FC=gfortran
$ mkdir build; cd build
$ cmake ..
.
.
.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/morton/tmp/pFUnit/build
Then, when I try to build the tests I get numerous "allocatable polymorphic variables..." errors that prevent me from going further...
$ make tests
.
.
.
/home/morton/tmp/pFUnit/extern/fArgParse/src/BaseAction.F90:309:6:
n_arguments = this%n_arguments
1
Error: Assignment to an allocatable polymorphic variable at (1) is not yet supported
.
.
.
Have looked far and wide for what this even means and am wondering if there's a simple fix or not.
I think I would like to modify the add_pfunit_test() macro to use cmake_parse_arguments().
The interface would then look like:
add_pfunit_test (<executable-name>
TEST_SOURCES src1 [, src2[, ...]]
OTHER_SOURCES src1 [,src2[, ...]])
REGISTRY registry
TEST_SOURCES will be processed with funitproc. OTHER_SOURCES are treated as regular sources. And REGISTRY is to specify the 'testSuites.inc' so you can have multiple cases in a single directory. (Not particularly wed to the name 'REGISTRY' though.)
In addition to appreciating your feedback, I would like to know whether we need OTHER_SOURCES_C? It seems like we ought to be able to mix the Fortran and C sources into one add_executable() statement, no?
We're looking at adopting pFUnit for unit testing in a fairly large project but before working on this integration just wanted to check if there is an expected timescale for moving from 3 to 4 and what level of backwards compatibility can we anticipate? It would be good to see if there are places we might be able to contribute.
Is there a public roadmap for the next major version of pFUnit?
There are 2 separate use cases here.
First use case is where the order of the tests matter. Currently pfunit happens to enforce ordering to be the same as the order the tests are registered. But later we hope to have an option run in reverse and random order. Some mechanism to enforce strict ordering even when run in that mode is useful.
A second case, requested by @MatthewHambley arises when it simply does not make sense to run remaining tests once one test in the suite has failed. A question arises as to whether to mark the skipped tests as failed or skipped in the tally.
First of all thanks for the great unit test environment!
Reading Halo_mod I noticed, that "include mpif.h" is used.
(Other modules like PF_MpiTestCase already have "use mpi")
Using mpi with "include mpif.h" is outdated and should not be done anymore. Instead think about putting "use mpi" or even better (for all functionality) "use mpi_f08".
From the mpi forum:
Instead of using mpif.h, the use of the mpi_f08 or mpi module is strongly encouraged for the following reasons:
Logic needs to be refreshed for the refactored structure.
This not been an issue during development but must be resolved before other projects can port to the 4.0 version.
A side discussion with @MatthewHambley suggests that it would be useful to have the RobustRunner somehow launch tearDown() methods for tests that crashed or hung. At the very least, this would be useful for the common case where a crashing test leaves temp files laying around that break the opens in the subsequent setUp() invocations.
Going with snake case for now.
On the develop branch, there is now little reason to have travis separately test serial and parallel builds. A parallel build is explicitly just an extension of the serial build and exercises all serial tests.
Minor step to reduce burden on Travis resources.
Dear pFUnit-team,
we use pFUnit in our internal project (and its great!) but have an issue, that the python installation creates
bin/__pycache__/foo.pyc
files that are not ignored with the .gitignore
in bin/
. As we have pFUnit as git-submodule it is a small annoyance that it is dirty all the time :/
Changing the bin/.gitignore
from /*.pyc
to *.pyc
(as in source/
) would fix that issue.
Thank you very much!
On NREL's Peregrine compute system, which runs CentOS 7 and cmake 3.8, this cmake command found at source/CMakeLists.txt
line 11 collapses to a single string:
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/GenerateAssertsOnArrays.py --maxRank ${MAX_RANK}
The fix is to wrap the argument in quotes:
COMMAND "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/GenerateAssertsOnArrays.py" "--maxRank" "${MAX_RANK}"
I see that the CMake configuration has changed in the develop
branch. I'll test that branch on our system and issue a pull request with our cmake fixes, if necessary.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.