replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Nasty irritating MODule issue
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Nasty irritating MODule issue

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
KennyT



Joined: 02 Aug 2005
Posts: 318

PostPosted: Wed Jan 25, 2012 3:40 pm    Post subject: Nasty irritating MODule issue Reply with quote

From time to time, I get updated source code from a colleague which contains changes to "INTERFACE" routines. So, I recompile the relevant source but then I get mismatching argument errors. The relevant .MOD file says it has been updated, but to get the compiler and linker to recognise the changes, I have to delete the .MOD file first!

Anyone experienced the issue?

I don't want to delete all the .MOD files as a matter of course, because we have some "recursive" USEs going on: (File B.FOR has "USE A"s and A.FOR has "USE B"s!!!) so deleting all the .MODs would cause a lot of grief as well!

TIA

K
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Wed Jan 25, 2012 6:54 pm    Post subject: Reply with quote

I suspect that the only way to resolve this problem will be to rationalise the structure of the modules so that they are nolonger recursive.
Back to top
View user's profile Send private message AIM Address
KennyT



Joined: 02 Aug 2005
Posts: 318

PostPosted: Thu Jan 26, 2012 1:02 pm    Post subject: Reply with quote

I suspect you're right!

K
Back to top
View user's profile Send private message Visit poster's website
JohnCampbell



Joined: 16 Feb 2006
Posts: 2615
Location: Sydney

PostPosted: Fri Jan 27, 2012 1:38 am    Post subject: Reply with quote

My impression of mixing code from multiple sources is that .mod files are only updated by the compiler, based on the date stamp of the .f95 files. If the file provided by your colleague is older than the .mod file, the .mod is not updated. I always delete all .mod ( and .obj) files before restarting a new build.

John
Back to top
View user's profile Send private message
KennyT



Joined: 02 Aug 2005
Posts: 318

PostPosted: Fri Jan 27, 2012 6:42 am    Post subject: Re: Reply with quote

JohnCampbell wrote:
My impression of mixing code from multiple sources is that .mod files are only updated by the compiler, based on the date stamp of the .f95 files. If the file provided by your colleague is older than the .mod file, the .mod is not updated. I always delete all .mod ( and .obj) files before restarting a new build.

John

Aah! Very interesting comment/thought. I wonder, is there a version of "touch" that resets the date of a file to "something old", which, given our recursive behaviour, would avoid this problem?

K

edit: So I tried changing the modified/created/accessed times using "attributemagic", then recompiling my modules but none of the .MOD file dates were changed - so I wonder what the "rules" are???

K

2nd edit: So I deleted all the .OBJ files, recompiled all the source and the dates of "some" of the .MODs were changed, but not all! Confused

K
Back to top
View user's profile Send private message Visit poster's website
KennyT



Joined: 02 Aug 2005
Posts: 318

PostPosted: Mon Jan 30, 2012 12:19 pm    Post subject: Reply with quote

OK, rather than a block "DEL *.MOD" before recompiling everything, I've changed my compile script to just delete the specific .MOD files for each source file, e.g.:

DEL A.MOD
FTN95 A.FOR
DEL B1.MOD
DEL B2.MOD
FTN95 B.FOR

and that seems to be the cleanest way to do it...

K
Back to top
View user's profile Send private message Visit poster's website
davidb



Joined: 17 Jul 2009
Posts: 560
Location: UK

PostPosted: Mon Jan 30, 2012 9:09 pm    Post subject: Re: Nasty irritating MODule issue Reply with quote

KennyT wrote:
we have some "recursive" USEs going on: (File B.FOR has "USE A"s and A.FOR has "USE B"s!!!)


Recursive use statements is not legal Fortran.
_________________
Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group