Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussions

No command line arguments - Start Without Debugging - IVF in Visual Studio 2005

charnwoodfox
Beginner
1,553 Views
I am using IVF 9.1 with MS Visual Studio (VS) 2005 Professional Ed. on Windows XP. When running the following code snippet with Start Debugging option from VS toolbar or from command line, it returns:
Number of args: 3 [This is correct!]
When using Start Without Debugging option, it returns:
Number of args: 1 [This is wrong!]
Note: From command line I typed: xxx.exe arg1 arg2
and in VS I set the project command line arguments field to: arg1 arg2 for All Configurations.
i.e. The arguments seem to be "lost" when executing the application without debugging via the Visual Studio interface.
Can youoffer an explanation/fix please?
Code:
      program XXX
      integer n
      n = nargs()
      write(*,*) "Number of args: ", n 
      pause
      end program XXX



0 Kudos
7 Replies
Steven_L_Intel1
Employee
1,553 Views
I don't see a difference when I try it. I get the same number of arguments either way. Note that setting up the command line for running the program is done by VS and is outside IVF's control.
0 Kudos
charnwoodfox
Beginner
1,553 Views
Thanks for the reply Steve. I suspect that it is a VS2005 issue, but note that a similar C code correctly gave 3 arguments which ever way I executed it.
I have tried reinstalling VS and IVF - it is the 30 day trial version by the way -but the problem did not disappear. I cannot think of what else to try and, as some other users report, I cannot access the Intel Premier Support - I keep going around in circles on the www pages.
0 Kudos
Steven_L_Intel1
Employee
1,553 Views
I tried it with VS2005 and it worked fine for me. I suspect there's something else at work that you're not seeing. It isn't a Fortran issue as IVF is just calling the C library routine to get the information.

If you're having trouble with Intel Premier Support, send e-mail to quad.support-at-intel.com
0 Kudos
Steven_L_Intel1
Employee
1,553 Views
Are you using a 32-bit or 64-bit version of Windows XP. I recently learned that VS2005 has a bug in this area on x64 systems in that it incorrectly creates the command line when "start without debugging" is used.
0 Kudos
charnwoodfox
Beginner
1,553 Views
Hi Steve ... I have copied my system info below. I am using 32-bit Windows andopted not to install the 64-bit component of IVF9.1. (Though note that I have reinstalled VS2005 and IVF9.1 a few times to check the installation/options and I may have had the 64-bitcheckbox for IVF9.1 selected on an earlieroccasion.) In the present installation of IVF9.1, Intel Debugger 9.1 and IVF9.1 Integrations with MVS* I selected the "complete" components and also the checkbox to automatically update the environmental variables. Please also note that I am presently using the 30 day evaluation release! Thanks for your support!
----------
System info:
OS NameMicrosoft Windows XP Professional
Version5.1.2600 Service Pack 2 Build 2600
System ManufacturerDell Inc.
System ModelPrecision M70
System TypeX86-based PC
Processorx86 Family 6 Model 13 Stepping 8 GenuineIntel ~1994 Mhz
BIOS Version/DateDell Inc. A03, 30/09/2005
SMBIOS Version2.3
Windows DirectoryC:WINDOWS
System DirectoryC:WINDOWSsystem32
Microsoft Visual Studio 2005
Version 8.0.50727.42 (RTM.050727-4200)
Microsoft .NET Framework
Version 2.0.50727
Installed Edition: Professional
Microsoft Visual Basic 2005 77626-009-0000007-41893
Microsoft Visual Basic 2005
Microsoft Visual C++ 2005 77626-009-0000007-41893
Microsoft Visual C++ 2005
Intel Fortran Compiler Integration
Intel Fortran Compiler Integration for Microsoft Visual Studio 2005, Version 9.1.3192.2005, Copyright (C) 2002-2006 Intel Corporation
Intel Fortran Compiler for 32-bit applications, Version 9.1. Build 20060323Z Package ID: W_FC_P_9.1.024 (30 day evaluation license)

0 Kudos
charnwoodfox
Beginner
1,553 Views
P.S. I have also informed Intel Premier Support of this issue and am awaiting their reply. I will update the thread if they can confirmthe behaviourand have a solution.
0 Kudos
charnwoodfox
Beginner
1,553 Views
Hi Steve / Others ...
I have downloaded and installed a more recent release of the Windows Fortran Compiler (i.e.W_FC_C_9.1.025) on the advice of Intel Premier Support and the command line argument issue has disappeared.Relief!
0 Kudos
Reply