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

Cyclic dependency checking broken between version 2015-11 to 2014.12 #212

Open
gdcarver opened this issue Nov 23, 2015 · 8 comments
Open
Milestone

Comments

@gdcarver
Copy link

This relates to issue 151.

A cyclic dependency exists in some versions of the IFS code (see issue above). Earlier versions of FCM correctly catch this and report it (see report below). However, all versions from 2014.12 to 2015-11 fail to report the cyclic dependency, will appear to work with no fail messages but not produce executable.

I've found that the change happened between the releases 2014.11.0 and 2014.12.0.

Example output from 2014.11.0:

fcm --version
FCM 2014.11.0

fcm make -v -j4 -f oifs.cfg

[FAIL] make oifs           # 9.4s
[FAIL] make                # 9.5s
[FAIL] mpl_message_mod.mod: target depends on itself
[FAIL]     required by: mpl_buffer_method_mod.o
[FAIL]     required by: mpl_buffer_method_mod.mod
[FAIL]     required by: mpl_init_mod.o
[FAIL]     required by: mpl_init_mod.mod
[FAIL]     required by: dr_hook_util.intfb.h
[FAIL]     required by: yomhook.o
[FAIL]     required by: yomhook.mod
[FAIL]     required by: sdl_mod.o
[FAIL]     required by: sdl_mod.mod
[FAIL]     required by: mpl_abort_mod.o
[FAIL]     required by: mpl_abort_mod.mod
[FAIL]     required by: mpl_message_mod.o
[FAIL]     required by: mpl_message_mod.mod
[FAIL]     required by: mpl_open_mod.o
[FAIL]     required by: mpl_open_mod.mod
[FAIL]     required by: mpl_module.o
[FAIL]     required by: mpl_module.mod
[FAIL]     required by: vod2uv.o
[FAIL]     required by: vod2uv.exe

Example output from 2014.12.0:

fcm --version
FCM 2014.12.0

[info] compile+   0.0 M tpm_flt.mod          <- trans/module/tpm_flt.F90
[info] compile   targets: modified=52, unchanged=0, failed=0, total-time=2.3s
[info] compile+  targets: modified=51, unchanged=0, failed=0, total-time=0.1s
[info] ext-iface targets: modified=2, unchanged=0, failed=0, total-time=0.0s
[info] TOTAL     targets: modified=105, unchanged=0, failed=0, elapsed-time=2.9s
[done] make oifs           # 11.2s
[done] make                # 11.3s
@matthewrmshin matthewrmshin added this to the soon milestone Nov 24, 2015
@matthewrmshin matthewrmshin self-assigned this Nov 24, 2015
@matthewrmshin
Copy link
Member

@gdcarver This is puzzling. I have just done a diff between 2014.11.0 and 2014.12.0. I cannot see any change related to fcm make between these versions. I'll try and see if I can repeat your problem in current master.

@matthewrmshin
Copy link
Member

@gdcarver I am unable to repeat this problem in several simple test cases. fcm make correctly identifies the problem in all my little test cases. Do you mind reducing this problem into a simple repeatable test case, and send us a tar ball?

@gdcarver
Copy link
Author

@matthewrmshin I was also a bit puzzled as I looked at the changes doc and couldn't see anything that I thought might affect it. The tests are repeatable but I will check again to make sure.

I'll work on reducing the code and send a test case in a day or two.

@gdcarver
Copy link
Author

@matthewrmshin Oddly, more testing show 2014-12 behaving correctly not but 2015 releases. But I am getting inconsistent results which might be related to the number of threads I'm using.
Can I check - all I should need to do is correctly set my PATH env var to change between installed versions of FCM? There are no possibilities for perl to get confused about which perl modules fcm is using?

@matthewrmshin
Copy link
Member

Can I check - all I should need to do is correctly set my PATH env var to change between installed versions of FCM?

This is the normal expectation.

@gdcarver
Copy link
Author

Then I have some odd behaviour that I do not understand at present.

Installed multiple versions of FCM, I build in separate directories for each version (i.e. mode=new) and delete previous build dir to be sure. I use the same source dir and 1 thread for each test.
In each test, PATH is changed to point to the version of FCM under test (making sure it is the only FCM binary in PATH). fcm --version confirms correct fcm is used in the script log.
Each test run has identical config file and source.

In these tests, FCM should not be able to build the final executable but should correctly report a FAIL and a cyclic dependency and not appear to finish successfully.

I get:

version        FAIL reported (out of 4 runs)
2014-06      3 out of 4
2014-09      4 / 4
2014-11      4 / 4
2014-12      2 / 4
2015-02      2 / 4  (n.b. not the same 2 runs as 2014-12)
2015-03      3 / 4
2015-05,-07,-08,-11 : 0 / 4 
(i.e. never report a FAIL and appear to work though no executable is produced)

Another point to note is that if the FAIL is reported, it is not always the same dependency list between versions.

So, for some versions, they may or may not correctly report the FAIL. I do not understand why. Maybe there is some caching or a race condition going on somewhere but I don't understand where with only 1 thread e.g. fcm make -j1. Have you ever seen anything like this before?

I am working on reducing the code to send you a small test.

@gdcarver
Copy link
Author

gdcarver commented Feb 5, 2016

Matt, apologies for not getting back to you about this yet. Creating the test case was not easy and then I had to work on something else. Will get back to this ASAP.

@matthewrmshin
Copy link
Member

@gdcarver any further progress in creating the test case?

@matthewrmshin matthewrmshin removed their assignment Sep 4, 2023
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