Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in opening compiled module files #407

Open
aaruni96 opened this issue Dec 23, 2022 · 4 comments
Open

Error in opening compiled module files #407

aaruni96 opened this issue Dec 23, 2022 · 4 comments

Comments

@aaruni96
Copy link

Hello, I have tried installing pFUnit 4.6 in my workplace in a path accessible to my colleagues.

The build process went smoothly, make tests reports that all tests were passed, and make install did not report any errors either.

But when I actually try to compile a test against my fortran application, the compilation fails, complaining about not being able to find compiled modules and asking me to check include paths.

This is the exact command the makefile executes :

ifort -o Test_StringOperations_driver.o -c  \
-IPFUNIT_INSTALL_DIR/GFTL-1.8/include/v1 \
-IPFUNIT_INSTALL_DIR/GFTL_SHARED-1.5/include/v1 \
-IPFUNIT_INSTALL_DIR/FARGPARSE-1.4/include \
-IPFUNIT_INSTALL_DIR/PFUNIT-4.6/include \
-I. \
-IPFUNIT_INSTALL_DIR/GFTL-1.8/include/v1 \
-IPFUNIT_INSTALL_DIR/GFTL_SHARED-1.5/include/v1 \
-IPFUNIT_INSTALL_DIR/FARGPARSE-1.4/include \
-IPFUNIT_INSTALL_DIR/PFUNIT-4.6/include \
-I. \
-IFORTRAN_SOFTWARE_TO_BE_TESTED_DIR \
-IINTEL_COMPILER_DIR/linux/mpi//intel64/include \
-I. \
-IPFUNIT_INSTALL_DIR/GFTL-1.8/include/v1 \
-IPFUNIT_INSTALL_DIR/GFTL_SHARED-1.5/include/v1 \
-IPFUNIT_INSTALL_DIR/FARGPARSE-1.4/include \
-IPFUNIT_INSTALL_DIR/PFUNIT-4.6/include \
-I. \
-D_TEST_SUITES='"Test_StringOperations.inc"' \
PFUNIT_INSTALL_DIR/PFUNIT-4.6/include/driver.F90

And I get lots of errors of this type :

PFUNIT_INSTALL_DIR/PFUNIT-4.6/include/driver.F90(18): error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [GFTL2_STRINGUNLIMITEDMAP]
   use FUnit, only: TestSuite
-------^

I have already checked that all the include paths in the command are valid, and seem to contain expected files. Here is the output for $ls PFUNIT_INSTALL_DIR/PFUNIT-4.6/include

add_pfunit_ctest.cmake        pf_arraywrapper_5d.mod   pf_assert.mod             pf_exceptionvector.mod     pf_mockrepository.mod         pf_repeatpattern.mod            pf_testfilter.mod
add_pfunit_sources.cmake      pf_arraywrapper.mod      pf_assertoverloads.mod    pf_expectation.mod         pf_mpicontext.mod             pf_resultprinter.mod            pf_testlistener.mod
add_pfunit_test.cmake         pf_assertbasic.mod       pf_assertreal_0d.mod      pf_featurematcher.mod      pf_mpitestcase.mod            pf_robustrunner.mod             pf_testlistenervector.mod
driver.F90                    pf_assertcomplex_0d.mod  pf_assertreal_1d.mod      pf_file.mod                pf_mpitestmethod.mod          pf_selfdescribing.mod           pf_testmethod.mod
driver.F90.in                 pf_assertcomplex_1d.mod  pf_assertreal_2d.mod      pf_formatter.mod           pf_mpitestparameter.mod       pf_selfdescribingvector.mod     pf_test.mod
fhamcrest.mod                 pf_assertcomplex_2d.mod  pf_assertreal_3d.mod      pf_globpattern.mod         pf_namefilter.mod             pf_serialcontext.mod            pf_testresult.mod
funit_core.mod                pf_assertcomplex_3d.mod  pf_assertreal_4d.mod      pf_isarraywithsize.mod     pf_none.mod                   pf_sourcelocation.mod           pf_testrunner.mod
funit.mod                     pf_assertcomplex_4d.mod  pf_assertreal_5d.mod      pf_isequal.mod             pf_norms_0d.mod               pf_stringcontains.mod           pf_testsuite.mod
pf_abstractarraywrapper.mod   pf_assertcomplex_5d.mod  pf_assertstring.mod       pf_is.mod                  pf_norms_1d.mod               pf_stringdescription.mod        pf_testtimer.mod
pf_abstractmatcher.mod        pf_assertinteger_0d.mod  pf_assertutilities.mod    pf_isnear.mod              pf_norms_2d.mod               pf_stringendswith.mod           pf_testvector.mod
pf_abstractpattern.mod        pf_assertinteger_1d.mod  pf_basedescription.mod    pf_isnot.mod               pf_norms_3d.mod               pf_stringstartswith.mod         pf_throwfundamentaltypes.mod
pf_abstractpatternvector.mod  pf_assertinteger_2d.mod  pf_basematcher.mod        pf_isrelativelynear.mod    pf_norms_4d.mod               pf_stringtestannotationmap.mod  pf_timeoutannotation.mod
pf_abstractprinter.mod        pf_assertinteger_3d.mod  pf_basetestrunner.mod     pf_istrueorfalse.mod       pf_norms_5d.mod               pf_stringutilities.mod          pf_typesafematcher.mod
pf_abstracttestparameter.mod  pf_assertinteger_4d.mod  pf_debuglistener.mod      pf_keywordenforcer.mod     pf_parallelcontext.mod        pf_substringmatcher.mod         pf_typesafeselfdescribing.mod
pf_abstracttestresult.mod     pf_assertinteger_5d.mod  pf_describedas.mod        pf_literalpattern.mod      pf_parameterizedtestcase.mod  pf_surrogatedescription.mod     PFUNIT.mk
pf_allof.mod                  pf_assertlogical_0d.mod  pf_disableannotation.mod  pf_matchable.mod           pf_params.mod                 pf_surrogatetestcase.mod        pfunit.mod
pf_anyof.mod                  pf_assertlogical_1d.mod  pf_dotpattern.mod         pf_matcherassert.mod       pf_posix.mod                  pf_taplistener.mod              pfunit_private.mod
pf_arraywrapper_1d.mod        pf_assertlogical_2d.mod  pf_dynamictestcase.mod    pf_matcherdescription.mod  pf_privateexception.mod       pf_testannotation.mod           pf_unixpipeinterfaces.mod
pf_arraywrapper_2d.mod        pf_assertlogical_3d.mod  pf_every.mod              pf_matchervector.mod       pf_regularexpression.mod      pf_testcase.mod                 pf_unixprocess.mod
pf_arraywrapper_3d.mod        pf_assertlogical_4d.mod  pf_exceptionlist.mod      pf_matchobject.mod         pf_remoteproxytestcase.mod    pf_testfailure.mod              pf_xmlprinter.mod
pf_arraywrapper_4d.mod        pf_assertlogical_5d.mod  pf_exception.mod          pf_mockcall.mod            pf_remoterunner.mod           pf_testfailurevector.mod        TestUtil.F90

Please advise.

@tclune
Copy link
Member

tclune commented Jan 2, 2023

Sorry - just back from vacation. It looks like there are missing $() around PFUNIT_INSTALL_DIR. I will go take a look at the included Makefiles. The CI is really only testing the CMake usage at this point, so not too surprising if the Makefile usage is showing this.

@tclune
Copy link
Member

tclune commented Jan 2, 2023

OK - I see now that your PFUNIT_INSTALL_DIR is an explicit path - not meant to be a shell variable. Sorry about that. Thinking ...

The usual cause of these sorts of things is that your environment is using a different Fortran compiler/version that what was used to build pFUnit. E.g., it is clear you are using ifort for compiling your test, but is it possible that pFUnit itself was built with gFortran? If you save the output from the initial CMake command that may shed some light on the matter.

@aaruni96
Copy link
Author

aaruni96 commented Jan 8, 2023

Hi, and sorry for the late response.

PFUNIT_INSTALL_DIR is a full path I have redacted. Its not a variable at all.

pFUnit was built with the same version of ifort. From the file build/CMakeFiles/CMakeOutput.log,

$ cat CMakeOutput.log | grep -i 'ifort version' | head -n 1
ifort version 18.0.2

And asking ifort its version from the terminal,

$ ifort --version
ifort (IFORT) 18.0.2 20180210
Copyright (C) 1985-2018 Intel Corporation.  All rights reserved.

@aaruni96
Copy link
Author

Hello,

Quick update: things appear to work as intended as of commit 253ef29. Might be helpful to investigate what has changed since then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants