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 

Creating MOD-files

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
Wilfried Linder



Joined: 14 Nov 2007
Posts: 314
Location: Düsseldorf, Germany

PostPosted: Thu Jul 01, 2010 9:47 am    Post subject: Creating MOD-files Reply with quote

Just a report:

I use several modules. The source code for 3 modules is within one FOR file. After compiling, I get one OBJ file and 3 MOD files. So far it is as it should be.

Now, when I use a batch job to compile all my files, the commands there are like c:\programme\silverfrost\ftn95\ftn95 /silent /fixed_format *.for

Funny: Old OBJ files are overwritten, old MOD files not!! So, before compiling I first have to delete the MOD files...

Regards, Wilfried
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Fri Jul 02, 2010 3:28 am    Post subject: Reply with quote

Wilfred,

I've noticed this also. As a consequence, I control the compilation with a batch file which I first delete all .obj and .mod files then list the compilation of files, so that the order of the creation of .mod files is before they are needed in other files.

I would suspect that if you use ftn95 *.f95, you could not guarantee the correct order and some files may use a previous version of the .mod file, if it is to change.

I have experienced this when developing software on 2 pc's (desktop and notebook), when copying files between computers, the apparent date stamp check for creation of .mod files can give the wrong version.

You could put all these rules in a makefile, but the safest and simplest is to use a batch file which controls the compilation.

I don't use Plato, so do not know what it does in this case.

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



Joined: 14 Nov 2007
Posts: 314
Location: Düsseldorf, Germany

PostPosted: Fri Jul 02, 2010 11:43 am    Post subject: Reply with quote

John,

in between I also put a "del *.mod" into my batch file. Directly after compiling the modules file, I copy the MOD files into the respective directories.

Thanks, regards and a nice weekend,
Wilfried
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Tue Jul 13, 2010 8:17 am    Post subject: Reply with quote

I have had a look at the code for the compiler and this behaviour is deliberate. The mod file is only replaced if its content changes.

This apparently relates to the behavour of a makefile if mod files are included. One does not wish to trigger a remake unless the file has changed.

There is a compiler option MINIMISE_REBUILD that is configured on by default. If you switch this off then the mod file will be replaced.


Code:
FTN95 prog.f95 /-MINIMISE_REBUILD


i.e. put a minus sign before MINIMISE_REBUILD.
Back to top
View user's profile Send private message AIM Address
Wilfried Linder



Joined: 14 Nov 2007
Posts: 314
Location: Düsseldorf, Germany

PostPosted: Tue Jul 13, 2010 9:47 am    Post subject: Reply with quote

Paul, thank you for this information! I have now included the option /-minimise_rebuild in my batch file.

Regards, Wilfried
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 -> General 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