Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28607 Discussions

Urgent Help Requested in Running Intel FORTRAN on Windows

chatdumkc_edu
Beginner
1,897 Views

Hello Steve Lionel,

This is a SOS.  I have old FORTRAN files (F77 version) in a folder on my desktop.  What I need to do is to compile and run these files.  I am using Windows and have Intel Visual FORTRAN with IMSL libraries.  The steps I used are as below:

1.  Open the Fname.for file using Microsoft Visual Studio 2008.

2.  Now from the "File" menu (top left hand corner of the pane), I am choosing the "Add to Existing Project" or "Add to New Project".

3.  Then I am going to the "Build" menu (top of the pane) and using the option "Build Solution"

On the solution pane I am getting the message: 0 errors 0 warnings (means that compilation is done).

4. Now when I am trying to run the program by choosing "Start without Debugging" -the problem crops up and the message says: "Unable to Start Program 'C\Users\chatd\Desktop....\Special Function\Debug\Special Function.exe'  "

The System cannot find the file specified.  

I do not know how to resolve this problem as I cannot locate the *.exe file either.  Need URGENT help on this.  Any pointers?  

- thanks,

Deb Chatterjee 

0 Kudos
30 Replies
Steven_L_Intel1
Employee
1,246 Views
0 Kudos
chatdumkc_edu
Beginner
1,246 Views

 

Steve,

Did everything that you stated in the post. The problem persists,even after resetting the two icons. After I reset the two icons I exited and then opened a new window with Microsoft Visual Studio.  Executing the "Build Solution" gives NO errors. But when I try executing "Start Without Debugging",  I get the following error (exact) message:

"Unable to Start Program 'C\Users\chatd\Desktop\Intel FORTRAN 11.1.048(32 bit) Source Files\Complex Airy Function\Debug\Complex Airy Function.exe' "

The System cannot find the file specified

For your perusal I have attached the source file [complex-airy.for] which I created on 07/04/2014 and I was trying to run it for the 1st time but could not get to that point. Running the source files seems to be a nightmare not because of any FORTRAN/math problems,but the associated protocols which I have not kept a track of. 

Please let me know what should be my next step.

- thanks

Deb Chatterjee

0 Kudos
mecej4
Honored Contributor III
1,246 Views

The source file has a number of syntax errors, and the source code for the function CAI needs to be supplied. Some variables in the common block /BLCK2/ have different types and byte lengths in different places. If CAI is the generic function from the IMSL special functions, you need a USE CAI_INT statement in the subprogram which invokes CAI. Your statement 103 should probably be 102.

As a consequence of the errors, compilation and linking will fail, and the question of debugging is premature. The large number of incorrect types for the variables in a program of such small size is indicative of careless programming. I suggest that you add IMPLICIT NONE to every subprogram and make sure that all variables have correct types before you attempt to debug the program.

0 Kudos
chatdumkc_edu
Beginner
1,246 Views

Thank you for the remarks/comments.

The CAI is a IMSL subroutine.   The specific FORTRAN 90 interface (as in the IMSL manual) is C_CAI (single precision) and Z_CAI (double precision). [page 171 of the IMSL MATH Library Special Functions documentation].  So, I am somewhat unsure as how to use it in the *.FOR environment. (Old FORTRAN).  What would be the FORTRAN 77 interface for CAI (in double precision). The manual does not specify anything.

Other comments are well-taken.I shall correct them but I am using F77 version of FORTRAN.The file name is complex-airy.for  

Thanks again for pointing out the errors. Do the errors you have pointed out could be the cause of the observed problem? However my question is why when I am trying to BUILD SOLUTION, no errors are reported?

- thanks,

Deb Chatterjee

0 Kudos
Steven_L_Intel1
Employee
1,246 Views

In the Debug or Release subfolder of your project should be a file buildlog.htm  Please ZIP it and attach the ZIP to a reply here. This will help us understand why your project did not build correctly. My guess is that the wrong project type was chosen, but the build log will tell me.

If there is no buildlog.htm, then ZIP all of the files in the Debug or Release folder and attach the ZIP here.

0 Kudos
mecej4
Honored Contributor III
1,246 Views

You are mistaken in assuming that a file with the name <some_name>.for is considered to follow the Fortran 77 standard. The file suffix ".for" simply indicates that the source file is in fixed form, which incidentally was the only source form in Fortran 77 and earlier.

Several of the IMSL subroutines and functions are no longer easy to use from strict Fortran 77 code, because the Fortran 77 interfaces to them are un- or under-documented. That should not be a problem, since you are not using a Fortran 77 compiler. The specific names for the generic CAI are C_CAI and Z_CAI, but you should avoid using them without having a definite reason for doing so.

We do not know which version of Visual Studio and which version of IMSL you are using, and you may have to attached a copy of your project/solution file and build-log file for the purpose of obtaining help with the IDE. I think that this is an additional complication and, at this point and given the other problems mentioned, a distraction. With IMSL properly configured, you should be able to build your application from the IFort command window using the /Qimsl /traceback options. The article https://software.intel.com/en-us/node/510280 may be of help, but note that it probably is written for different versions of Visual Studio, Intel Fortran and IMSL than the ones that you have.

I attach an edited version of your source file that I could compile and run. You must, of course, check the output file to check if the code is correct. Note that I reduced the value of NPT to 121 in order to control the size of the output file.

 

0 Kudos
chatdumkc_edu
Beginner
1,246 Views

mecej4:

Thanks for taking the trouble to modify the code and running it. I downloaded your modified code and ran it.  That is I made a solution file as console1.sln and then built it the response when I execute the command Build Solution is cut and pasted here as below:

1>------ Build started: Project: Complex Airy (Version 2), Configuration: Debug Win32 ------
1>
1>Build log written to  "file://C:\Users\chatd\Desktop\Intel FORTRAN 11.1.048 (32 bit) Source Files\Complex Airy (Version 2)\Debug\BuildLog.htm"
1>Complex Airy (Version 2) - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

The interesting thing is that when I then try to actually run the program by choosing the command option: Start Without Debugging, I get the message:

Unable to Start Program 'C\Users\chatd\Desktop\Intel FORTRAN 11.1.048(32 bit) Source Files\Complex Airy (Version  2)\Debug\Complex Airy (Version 2).exe' 

The system cannot find the file specified

So, I believe that it is probably (?) not a FORTRAN issue but most likely a Microsoft Visual Studio or Intel Visual FORTRAN issue.

Where am I going wrong with the above? What maybe the possible troubleshooting pointers?

- thanks,

Deb Chatterjee

 

 

 

0 Kudos
chatdumkc_edu
Beginner
1,246 Views

Steve Lionel (Intel) wrote:

In the Debug or Release subfolder of your project should be a file buildlog.htm  Please ZIP it and attach the ZIP to a reply here. This will help us understand why your project did not build correctly. My guess is that the wrong project type was chosen, but the build log will tell me.

If there is no buildlog.htm, then ZIP all of the files in the Debug or Release folder and attach the ZIP here.

Steve,

I am attaching a buildlog.htm file here and a solution (*.sln) file  for your perusal. Please let me know what may be the next better step to resolve this issue. I am just at a dead end. 

- thanks,

Deb Chatterjee

0 Kudos
Deb_C_
Beginner
1,246 Views

Also, should I reinstall Microsoft Visual Studio 2008 and Intel Visual FORTRAN on my desktop? [That looks like a viable option but perhaps very painful. :-( ]

- thanks,

Deb Chatterjee

0 Kudos
jimdempseyatthecove
Honored Contributor III
1,246 Views

Your build log contains:

Deleting intermediate files and output files for project 'Console1', configuration 'Debug|Win32'.

Console1 - 0 error(s), 0 warning(s)

Nothing was built. Use the configuration manager and check to see if your project(s) are included in build.

Jim Dempsey

0 Kudos
Deb_C_
Beginner
1,246 Views

Thank you Jim.  Now how do I fix this? I have no access to a User's Manual which I can read and fix the issue, and thereby reducing my asking  so many questions on this forum.

However, all said and done do you have any pointers for me how to fix this? Is it a problem with the installation of Microsoft Visual Studio or Intel Visual  FORTRAN? 

- thanks,

Deb C. (aka Deb Chatterjee) 

P.S.: I have two accounts to access this forum. 

0 Kudos
Steven_L_Intel1
Employee
1,246 Views

Deb,

I have a theory - please also attach the .vfproj file. My guess is that you created a project but didn't add any source files to the project, therefore there was nothing to build. Just opening the source in Visual Studio doesn't put the source in a project.

Select Project > Add Existing Item. Browse to your .f90 source and add it to the project. Then build.

The error about not finding the EXE is that no source files were found to build, thus no EXE got built.

You DO have the user documentation available under Help in Visual Studio, though it might not help you here other than reading the "getting started" information on how to create a project.

0 Kudos
mecej4
Honored Contributor III
1,246 Views

Deb C., for what it's worth, here is a zip file with all the files needed for building the EXE, with VS2012 and IFort 14. Before attempting to build the project, please edit the project properties and change the paths to the INCLUDE and LIB directories of your IMSL installation.

The Intel Fortran documentation is available online at https://software.intel.com/en-us/compiler_14.0_ug_f . If you still have difficulties, I suggest that you

  • start over, using simple programs in the beginning. Write a "hello world" Fortran program, with no IMSL calls, and go through the steps of creating a new VS project, adding the single source file to the project, building the application and running it in the debugger. 
  • build and run one of the IMSL example programs given in the IMSL manual -- for example, the one for CAI.
  • now try your original program with corrections as noted, build and run.

 

0 Kudos
Deb_C_
Beginner
1,246 Views

mecej4:

I have VS 2008 (Visual Studio 2008 & not 2012).  So, will IFORT 14 work for VS2008? I am not sure.  But, I will try.  Let me also consider to Steve's suggestion - in the post above.

Thanks for helping me out in these dire times.

- Deb C. (Deb Chatterjee)

0 Kudos
Deb_C_
Beginner
1,246 Views

Steve,

I tend to agree with you.  I shall send you the *.vproj file(s) which are on my office PC.  

- thanks,

Deb C. (Deb Chatterjee)

0 Kudos
mecej4
Honored Contributor III
1,246 Views

Here is the VS2008 project. As noted earlier, you will have to change the paths to the IMSL include and lib directories to the values for your installation, under the project properties. You may also need to choose the configuration(s) for which you have a compatible IMSL.

0 Kudos
Deb_C_
Beginner
1,246 Views

mecej4:

In my original code the IMSL paths were the same as the earlier ones which were working but before this disastrous crash.  Anyway, I shall modify and try running the yours.  

Thanks again,

Deb C. (Deb Chatterjee) 

0 Kudos
chatdumkc_edu
Beginner
1,246 Views

Steve Lionel (Intel) wrote:

Deb,

I have a theory - please also attach the .vfproj file. My guess is that you created a project but didn't add any source files to the project, therefore there was nothing to build. Just opening the source in Visual Studio doesn't put the source in a project.

Select Project > Add Existing Item. Browse to your .f90 source and add it to the project. Then build.

The error about not finding the EXE is that no source files were found to build, thus no EXE got built.

You DO have the user documentation available under Help in Visual Studio, though it might not help you here other than reading the "getting started" information on how to create a project.

Steve,

I am attaching a *.vproj file here.  Also, I am using the product Intel Visual FORTRAN Compiler 11.1 Professional Edition with IMSL for Windows

Can you please let me know what is that I am doing wrong? I want to set up procedures so that I just create a *.FOR source code, compile and then run for results. My problem is that switching between various versions and protocols etc., is what I cannot (or do not want to) keep a track of. This becomes a never-ending nightmare.

Thanks for your help.

- Deb Chatterjee (aka Deb C.) 

 

0 Kudos
chatdumkc_edu
Beginner
1,246 Views

mecej4 wrote:

Here is the VS2008 project. As noted earlier, you will have to change the paths to the IMSL include and lib directories to the values for your installation, under the project properties. You may also need to choose the configuration(s) for which you have a compatible IMSL.

Mecej4:

I did have the appropriate changes in my original source code. Your modification to my source code seems to use a the commands USE CAI_INT instead of EXTERNAL CAI. Your one seems appropriate for FORTRAN 90 interface and I am using the *.FOR environment.  I am not sure if I can use a mixed declaration in either *.f90 or *.for environments.  As I responded to Steve Lionel, just earlier, I am using the product Intel Visual FORTRAN Compiler 11.1 Professional Edition with IMSL for Windows

- thanks,

Deb Chatterjee (aka Deb C.)

0 Kudos
mecej4
Honored Contributor III
1,097 Views

Apparently, you did not read my comments in #6, which address exactly this issue. In short, you are not using a Fortran 77 compiler. The IFort 11 compiler treats a .for file as a Fortran9X source file in fixed format. You do need to read the documentation and understand the differences between using a USE statement to provide an interface as opposed to simply declaring a function or subroutine as EXTERNAL.

Your VFPROJ file in #19 does not show any files in the "source files" tab of the solution explorer, as Steve Lionel guessed in #13. Therefore, VS decides that there is nothing to do, as the project is empty at this point.

Right click on "source files" in the solution explorer, then left click on Add and then on "Existing Item" . Add your source file using the file selection box that appears.

0 Kudos
Reply