- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
I've installed the VS2015 (enterprise)update 2 and PSXE 2016 update 3, then when i started a new main program fortran project, the syntax wasn't highlighted.
Then i did what was told in https://software.intel.com/en-us/articles/troubleshooting-fortran-integration-issues-with-visual-studio/ , but after i did the step3, the problem still persists.
In my directory C:\Program Files (x86)\Microsoft Visual Studio 14.0\Intel Fortran\VFPackages i only have 4 files (even after doing "integrate.bat"):
VFAVWin.dll, VFHieEditor.dll, VFProj.dll, VFProjConvert.dll .
Do you have any idea what's wrong with my installation?
Thanks for your time and i hope to get the answer soon because i have only a few day to confirm the compatibility of the program before paying for the purchase.
Regards,
TRAN
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That folder looks like mine. I'm no expert in the syntax highlighting, but mine has comments in green, keywords in blue, constant strings in red
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also try the steps shown in https://software.intel.com/en-us/articles/problem-fortran-source-files-not-compiled-when-building-in-visual-studio
Do your Fortran programs otherwise get compiled properly?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Steve.
I tried the steps you said, and it didnt change anything.
Otherwise, the 'hello world' project got compiled. But my fortran codes which compiled codeblocks couldnt get compiled.
I did reinstall PSXE2016 twice but it didnt help.
Do you have any clue? Or may be there are some options need to be enabled?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please attach a ZIP of the buildlog.htm from the failed build.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Steve.
Here is my log file:
###############
Compiling with Intel(R) Visual Fortran Compiler 16.0 [IA-32]... ifort /nologo /debug:full /Od /warn:interfaces /module:"Debug\\" /object:"Debug\\" /Fd"Debug\vc140.pdb" /traceback /check:bounds /check:stack /libs:dll /threads /dbglibs /c /Qlocation,link,"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\\bin" "F:\Work_Lgpm\Modele_discret\Simpson\main.f90" F:\Work_Lgpm\Modele_discret\Simpson\main.f90(104): error #6404: This name does not have a type, and must have an explicit type. [GETPID] pid = getpid() ------------------^ F:\Work_Lgpm\Modele_discret\Simpson\main.f90(410): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [MODULE_CALCUL] use Module_calcul --------^ F:\Work_Lgpm\Modele_discret\Simpson\main.f90(466): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [MODULE_CALCUL] use Module_calcul --------^ F:\Work_Lgpm\Modele_discret\Simpson\main.f90(506): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [MODULE_CALCUL] use Module_calcul --------^ compilation aborted for F:\Work_Lgpm\Modele_discret\Simpson\main.f90 (code 1)
###################
My code worked perfectly in Codeblocks. I think that i missed some settings in my VS.....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
First, in what source is module module_calcul defined? It does not appear to have been compiled. Are you doing a build of the solution or are you just compiling a single file? If the latter, then please select Build > Build Solution instead.
For the reference to GETPID, you need to put in:
USE IFPORT
in the program unit that calls this, so that it is declared.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In Codeblocks, i wrote my code in one single file, all modules (all my functions are in Module_calcul), subroutines are in the head of main.f90.
I added USE IFORT right after "program main" , and rebuild the solution, it showed the same error as before.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is the subroutine which i need getid()
#############
subroutine init_random_seed()
USE IFORT
use iso_fortran_env, only: int64
implicit none
integer, allocatable :: seed(:)
integer :: i, n, un, istat, dt(8), pid
integer(int64) :: t
call random_seed(size = n)
allocate(seed(n))
! First try if the OS provides a random number generator
open(newunit=un, file="/dev/urandom", access="stream", &
form="unformatted", action="read", status="old", iostat=istat)
if (istat == 0) then
read(un) seed
close(un)
else
! Fallback to XOR:ing the current time and pid. The PID is
! useful in case one launches multiple instances of the same
! program in parallel.
call system_clock(t)
if (t == 0) then
call date_and_time(values=dt)
t = (dt(1) - 1970) * 365_int64 * 24 * 60 * 60 * 1000 &
+ dt(2) * 31_int64 * 24 * 60 * 60 * 1000 &
+ dt(3) * 24_int64 * 60 * 60 * 1000 &
+ dt(5) * 60 * 60 * 1000 &
+ dt(6) * 60 * 1000 + dt(7) * 1000 &
+ dt(8)
end if
pid = getpid()
t = ieor(t, int(pid, kind(t)))
do i = 1, n
seed(i) = lcg(t)
end do
end if
call random_seed(put=seed)
contains
! This simple PRNG might not be good enough for real work, but is
! sufficient for seeding a better PRNG.
function lcg(s)
integer :: lcg
integer(int64) :: s
if (s == 0) then
s = 104729
else
s = mod(s, 4294967296_int64)
end if
s = mod(s * 279470273_int64, 4294967291_int64)
lcg = int(mod(s, int(huge(0), int64)), kind(0))
end function lcg
end subroutine init_random_seed
######################
I added Use IFORT, and a new error message:
error #7002: Error in opening the compiled module file. Check INCLUDE paths. [IFORT]
A little more precisely about my code structure:
Module_calcul
Contains
! all functions go here
end module_calcul
Some subroutoines
program main
end program main
Moreover, i still have problem with highlighting syntax codes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That should be:
USE IFPORT
The error for getpid prevented the module from compiling. Once you fix that it should be fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, my bad, i fixed it into USE IFPORT, then new error messages
###################################################
F:\Work_Lgpm\Modele_discret\Simpson\main.f90(79): error #6401: The attributes of this name conflict with those made accessible by a USE statement. [SEED] integer, allocatable :: seed(:) --------------------------------^ F:\Work_Lgpm\Modele_discret\Simpson\main.f90(84): error #6424: This name has already been used as an external subroutine name. [SEED] allocate(seed(n)) -----------------^ F:\Work_Lgpm\Modele_discret\Simpson\main.f90(89): error #6424: This name has already been used as an external subroutine name. [SEED] read(un) seed ---------------------^ F:\Work_Lgpm\Modele_discret\Simpson\main.f90(108): error #6424: This name has already been used as an external subroutine name. [SEED] seed(i) = lcg(t) ----------------^ F:\Work_Lgpm\Modele_discret\Simpson\main.f90(111): error #6424: This name has already been used as an external subroutine name. [SEED] call random_seed(put=seed) -----------------------------^ F:\Work_Lgpm\Modele_discret\Simpson\main.f90(111): error #6362: The data types of the argument(s) are invalid. [RANDOM_SEED] call random_seed(put=seed)
###################################################
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok - turns out that IFPORT has something called SEED. Change the "USE IFPORT" line to:
USE IFPORT, ONLY: GETPID
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It compiles now but doesnt run, here are the outputs messages:
################################
'Console5.exe' (Win32) : Chargé 'F:\Work_Lgpm\Codes\Code_thermique_discrete\Console5\Console5\Debug\Console5.exe'. Les symboles ont été chargés.
'Console5.exe' (Win32) : Chargé 'C:\Windows\SysWOW64\ntdll.dll'. Impossible to find or open file PDB.
'Console5.exe' (Win32) : Chargé 'C:\Windows\SysWOW64\kernel32.dll'. Impossible to find or open file PDB.
'Console5.exe' (Win32) : Chargé 'C:\Windows\SysWOW64\KernelBase.dll'. Impossible to find or open file PDB.
'Console5.exe' (Win32) : Chargé 'C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2016.3.207\windows\redist\ia32_win\compiler\libifportmd.dll'. Module was generated without symbols.
'Console5.exe' (Win32) : Chargé 'C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2016.3.207\windows\redist\ia32_win\compiler\libmmd.dll'. The symbols were loaded.
'Console5.exe' (Win32) : Chargé 'C:\Windows\SysWOW64\user32.dll'. Impossible to find or open file PDB.
'Console5.exe' (Win32) : Chargé 'C:\Windows\SysWOW64\gdi32.dll'. Impossible to find or open file PDB.
'Console5.exe' (Win32) : Chargé 'C:\Windows\SysWOW64\vcruntime140d.dll'. Impossible to find or open file PDB.
'Console5.exe' (Win32) : Chargé 'C:\Windows\SysWOW64\ucrtbased.dll'. Impossible to find or open file PDB.
'Console5.exe' (Win32) : Chargé 'C:\Windows\SysWOW64\advapi32.dll'. Impossible to find or open file PDB.
'Console5.exe' (Win32) : Chargé 'C:\Windows\SysWOW64\msvcrt.dll'. Impossible to find or open file PDB.
'Console5.exe' (Win32) : Chargé 'C:\Windows\SysWOW64\sechost.dll'. Impossible to find or open file PDB.
'Console5.exe' (Win32) : Chargé 'C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2016.3.207\windows\redist\ia32_win\compiler\libifcoremdd.dll'. Module was generated without symboles.
'Console5.exe' (Win32) : Chargé 'C:\Windows\SysWOW64\rpcrt4.dll'. Impossible to find or open file PDB.
'Console5.exe' (Win32) : Chargé 'C:\Windows\SysWOW64\imagehlp.dll'. Impossible to find or open file PDB.
'Console5.exe' (Win32) : Chargé 'C:\Windows\SysWOW64\sspicli.dll'. Impossible to find or open file PDB.
'Console5.exe' (Win32) : Chargé 'C:\Windows\SysWOW64\cryptbase.dll'. Impossible to find or open file PDB.
'Console5.exe' (Win32) : Chargé 'C:\Windows\SysWOW64\bcryptprimitives.dll'. Impossible to find or open file PDB.
'Console5.exe' (Win32) : Chargé 'C:\Windows\SysWOW64\imm32.dll'. Impossible to find or open file PDB.
#########################
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The messages about lacking .pdb for those binary libraries appear to be normal, and wouldn't account for failure to run.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tim P. wrote:
The messages about lacking .pdb for those binary libraries appear to be normal, and wouldn't account for failure to run.
Here are message from my terminal, this code didnt have any problem when i ran in Codeblocks.
forrtl: severe (24): end-of-file during read, unit 2, file F:\Work_Lgpm\Codes\Code_thermique_discrete\Console5\Console5\Param.dat
Image PC Routine Line Source
libifcoremdd.dll 569219D2 Unknown Unknown Unknown
libifcoremdd.dll 56967C3D Unknown Unknown Unknown
Console5.exe 001108C5 _INIT_PARAMETERS 365 main.f90
Console5.exe 00117ED3 _MAIN__ 511 main.f90
Console5.exe 00118A0F Unknown Unknown Unknown
Console5.exe 0011B4FE Unknown Unknown Unknown
Console5.exe 0011B3CA Unknown Unknown Unknown
Console5.exe 0011B26D Unknown Unknown Unknown
Console5.exe 0011B518 Unknown Unknown Unknown
KERNEL32.DLL 75D638F4 Unknown Unknown Unknown
ntdll.dll 777D5DE3 Unknown Unknown Unknown
ntdll.dll 777D5DAE Unknown Unknown Unknown
##########
I have the feeling that i VS ran in 32bit when i OS is 64bit. Should i reinstall my VS2015?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
VS projects default to 32-bit. You have to go into the configuration manager and add the x64 platform configuration.
Note the file path in the error message. When you run in Visual Studio the "default directory" is the project directory, not where the EXE is. You may need to move the data file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Steve,
I've reinstalled VS and PSXE in programfile(x86), and everything works fine.
Thanks for all.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page