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 

\COMMONS.CMN cannot be opened

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



Joined: 31 Aug 2011
Posts: 30
Location: Connecticut

PostPosted: Fri Apr 22, 2016 3:22 am    Post subject: \COMMONS.CMN cannot be opened Reply with quote

I've received new fortran source code from NIST for the calculation of steam table properties. Within this new release of source code they are introduced a set of common.cmn files into the source code. Visual studio is throwing an error stating

Error 405 INCLUDE file 'C:\data\VisualBasic\StatePointClass\NISTV91RefProps\COMMONS.CMN' cannot be opened

I don't know what is gong on here and need some help and guidance fixing this error.

Thank you,
Bill Johnson
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Fri Apr 22, 2016 5:07 am    Post subject: Reply with quote

We know nothing about what is in the source file(s) with the INCLUDE directives, so you need to show us the source file, or at least the lines with the INCLUDE.

Does the .CMN file exist and in the place defined by the path string? Is the file readable?
Back to top
View user's profile Send private message
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Sat Apr 23, 2016 4:27 am    Post subject: Reply with quote

Just a hunch: I'll bet the path (not the file) is listed in your VC properties as one of the include paths. So, if that partcular file is not in that folder, of course it can't be found.

If that is NOT the case, and the INCLUDE gives the full path including the file, then you'll have to point each INCLUDE to the file on YOUR system. It would be a very bad coding technique to do something like this....

And, as has been said before, the context is important to make sure the help offered has value.
Back to top
View user's profile Send private message Visit poster's website
BillJohnson



Joined: 31 Aug 2011
Posts: 30
Location: Connecticut

PostPosted: Sat Apr 23, 2016 1:55 pm    Post subject: Still Confused. Reply with quote

Dear Forum,

I don't know how to set the path for the commons.cmn file that is referenced within the .for file.

Here's a code snippet inside the .for file that is referencing the commons.cmn file.

Code:
     
 include 'COMMONS.CMN'
      character*255 herr
c
      ierr=0
      herr=' '


I put these common .cmn files in the include folder of visual studio. Is that the correct place to put the common file. Also, is the extension suppose to be .cmn or .for??

Here's a snippet of code for the first few lines of the commons.cmn files.

Code:

c  begin file commons.for
      implicit double precision (a-h,o-z)
      implicit integer (i-k,m,n)
      implicit logical (l)

      parameter (ncmax=20)     !max number of components in mixture
      parameter (nrefmx=10)    !max number of fluids for transport ECS
      parameter (n0=-ncmax-nrefmx)

      parameter (mxtrm=56)     !max number of Helmholtz terms
      parameter (mxcrt=20)     !max number of critical terms in FEQ

c..Use for fitting pure fluids:
c     parameter (ncmax=1)
c     parameter (n0=1)
c     parameter (mxtrm=40)
c     parameter (mxcrt=25)
c     parameter (mxtrm=30)
c     parameter (mxcrt=15)

c..Use for fitting binary mixtures:
c     parameter (ncmax=2)
c     parameter (n0=1)



[img][/img]
Back to top
View user's profile Send private message
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Sat Apr 23, 2016 2:11 pm    Post subject: Reply with quote

If you look at the properties of the Project, you'll see some arcane reference to include files like $(INCLUDE). This is the default path.

In the FTN95 command line, if you can add your own argument(s), you can add the parameters
Code:

/INCLUDE "pathtofile"


IMHO, better to move the file to the folder that contains your code. Then, no additional /INCLUDE nor change to the project will be needed.
Back to top
View user's profile Send private message Visit poster's website
BillJohnson



Joined: 31 Aug 2011
Posts: 30
Location: Connecticut

PostPosted: Sat Apr 23, 2016 2:52 pm    Post subject: Reply with quote

I've looked in the properties of the project and don't see any location for specifying the include files. Is it possible you could take a screen shot of your visual studio screen and please show me which tab that you specify the include files.
Back to top
View user's profile Send private message
BillJohnson



Joined: 31 Aug 2011
Posts: 30
Location: Connecticut

PostPosted: Sat Apr 23, 2016 2:58 pm    Post subject: Reply with quote

This is so frustrating. I know it is a simple task, but when you don't have a clue what to do....I am completely lost on how to specify the path within code or within the properties menu of visual studio. Please help.
Back to top
View user's profile Send private message
BillJohnson



Joined: 31 Aug 2011
Posts: 30
Location: Connecticut

PostPosted: Sat Apr 23, 2016 3:19 pm    Post subject: Reply with quote

I finally figured out what I was doing wrong. When adding the code to visual studio I selected the code that was under the directroy "c:\temp\NIST' inside of visual studio. However, my solution file is under c:\data\visualbasic\statepoint. So, even though the code was copied over, visual studio keep the path point to the old path. To rectify this, I first moved the code using windows explored to the c:\data\visualbasic\statepoint where this is my location of my project solution file. I don't understand why visual studio just doesn't move the files over to your project solution file when you are selecting fortran files on a different location on your hard drive.

Thank you for your help. Now I have another compiling problem. Opening a new post on that one. Thanks.
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