922 questions
0
votes
0
answers
31
views
Intel compiler giving error due to whitespace in assumed rank dummy argument declaration
Consider the following code:
Module assumed_rank_module
Implicit None
Contains
Pure Function assumed_rank( a ) Result( s )
Integer :: s
Real, Dimension( .. ), Intent( In ) :: a
s ...
1
vote
1
answer
86
views
Type-bound procedure for parameterized derived type
Could you tell me how to write type-bound procedures for parameterized types?
For example:
module parameters
type :: sinx (kind)
integer, kind :: kind=4
real(kind) :: x
contains
procedure,...
0
votes
1
answer
77
views
normalization in FFTW3
I am trying to use FFTw3 in Visual Studio using the Intel Fortran compiler.
I am confused about normalization.
I have setup a r2r spectral to grid plan for sinx siny components.
...
0
votes
0
answers
89
views
library handle in fortran
I have a fortran dll/so which needs to know its own programhandle.
On windows, I can obtain the handle from the DLLMain routine:
integer(4) function DllMain(hInst, ul_reason_being_called, lpReserved)
...
1
vote
1
answer
95
views
How to find out why VS is recompiling my Fortran file?
I'm working on a mixed Fortran/C++ application in VS 2019. I'm using the IFX compiler, but the issue also shows up with IFORT. I've added some module and submodule files to my Fortran project, and one ...
0
votes
1
answer
142
views
ifx "ignoring unknown option '/version'
I am using Visual Studio 2022 with Intel OneAPI (Base + HPC) to try and create a Fortran program in Windows 11. I'm having a few issues compiling which I'm troubleshooting, but I'm stumped that ifx ...
0
votes
0
answers
95
views
Unrecognised compiler commands in a compiler config file ran using the mpiifort command
Hi I'm trying to compile and run a .f90 code using the intel fortran compiler (ifx) and the intel mpi library on a linux HPC.
I'm invoking the compiler through a .sh script with the following lines:
...
1
vote
0
answers
372
views
How to switch the compiler from IFORT to IFX in Visual Studio 2022
I am working on an existing project with multiple collections of routines, and each collection is compiled with IFORT. Compiler messages are telling me IFORT is deprecated as of late 2024, so I would ...
0
votes
2
answers
244
views
Force error on warning when compiling with ifx/ifort?
This is a remarkably trivial question, but clearly I am missing something: I just want compilation of the below Fortran program to fail when compiling with ifx/ifort if a warning is thrown. I have ...
0
votes
1
answer
188
views
Fortran - Syntax error, found END-OF-STATEMENT [duplicate]
Intel fortran compiler (2024.2.0.633), Visual Studio 2022, 32bit. Compiling .for files from very old fortran routines.
Code did not copy well into code tags, so I pasted an image.
Problem:
C:\Users\...
1
vote
1
answer
2k
views
malloc(): unaligned tcache chunk detected. Has anyone faced this before for MPI fortran programs?
I have an MPI program, where I face the "malloc(): unaligned tcache chunk detected" error if I run it on one processor, but not on 8 processors. The memory allocation looks like this:
...
1
vote
0
answers
142
views
Ifx cannot find modern generic MKL routines like GEMM_F95
I am compiling Fortran code with the ifx compiler (version 2025.0.4) on Windows. I have the Intel MKL library downloaded as well and I am trying to compile a program using it, like this:
ifx test.f90 ...
0
votes
1
answer
655
views
Visual Studio 2022 - Fortran - Debugging Issue
I have been working on a Fortran code in visual studio 2022 using intel OneAPI compiler. The code is compiling correctly and it is running fine. Recently when I try to debug the code, I am unable to ...
0
votes
0
answers
26
views
How to link Abaqus to MATLAB libraries?
I am currently working on writing a UMAT subroutine. In one part of the code, I need to solve a system of linear equations. Initially, I used Fortran libraries such as LAPACK and PARDISO for solving ...
0
votes
0
answers
143
views
Using ScaLAPACK subroutine PDGEMR2D gives errors
I am working on a problem where I need the full spectrum of a Hamiltonian matrix. I order to have a better performance, I am using ScaLAPACK routine PDSYEV to compute the eigenstates and eigenvalues ...
0
votes
0
answers
39
views
Initialize the global matrix to a single process, and then distribute to the process grid to use ScaLAPACK rouines
I am working on a problem, and I need to use ScaLAPACK library to optimize the computations. I have to deal with large numerical problems, where the number of states nst>20000, therefore the ...
10
votes
1
answer
474
views
Unexpected Slower Performance with Column-Major Access in Fortran Arrays
I'm working on optimizing array access patterns in Fortran.
I allocated and accessed the array considering that Fortran allocates multi-dimensional arrays in column-major order.
However, I'm observing ...
0
votes
1
answer
188
views
How to solve LNK4098 warning, libcmt.lib conflicts with libraries? and subsequent erroneous results
I need to produce a static .exe to distribute to users that have no VisualStudio, no Intel Fortran/oneAPI, and no MKL.
My code "UgensTester.f90" worked fine since 2010 with yearly updates, ...
1
vote
1
answer
115
views
How to print a colored text without including ANSI escape sequence in the output length?
!example
program main
implicit none
character(len=8) :: red, reset
character(len=16) :: redO
red = char(27) // '[31m'
reset = char(27) // '[0m'
redO = trim(adjustl(red // "O" // ...
0
votes
0
answers
156
views
Using IFX getting Error Opening Source File message
I'm debugging my Fortran files recently changing from ifort to ifx, then I got a weird problem.
Every time jumping from a subroutine to another subroutine, I get the error shown in the picture, but ...
0
votes
2
answers
122
views
OpenMP tasks crash once the "spawning routine" exits
I have the following program structure:
type(mytype) :: x(10)
!$OMP PARALLEL DEFAULT(SHARED)
!$OMP MASTER
do i = 1, 10
call sub1(x(i)) ! some stuff that cannot be parallelized
call sub2(x(i)) ! ...
0
votes
0
answers
67
views
Undefined references when linking Fortran object to C compiler with Intel MPI and Intel compilers
I inherited a rather large project that I am trying to get to compile (it's a bit old, maybe 10 years). I am trying to use new intel compilers with intel mpi on Ubuntu WSL.
There are some C modules ...
1
vote
1
answer
100
views
How do I initialize a derived-type variable?
How do I initialize a derived-type variable?
PS. I'm an old F77 programmer, with decent knowledge of OOP using C#, but new to "derived-types" in Fortran. A MS student wrote a large code and ...
1
vote
0
answers
73
views
Why is my file io working correctly in gfortran, nvfortran, flang, but not ifort? [duplicate]
I am working on a Fortran95 solution to Project Euler problem 22. I have it working correctly in the three complilers listed in the title, but for some reason the array labelled names is filled ...
1
vote
1
answer
135
views
Mismatched allocation/deallocation error using Intel Inspector
Consider the following minimal working example:
program p
type t
integer,allocatable::i
end type
type(t),allocatable::o
allocate(o)
deallocate(o)
end
This code was ...
0
votes
0
answers
29
views
Accessing a position that does not exist [duplicate]
I am using intel fortran and could not figure out why I don't get an error when accessing a position in a matrix that doesn't exist.
I have a matrix umf3 with dimensions (36,6, 3,960,15). If I print ...
1
vote
1
answer
245
views
Trying to figure why the Fortran "G" format outputs asterisks
The following outputs asterisks (when I would expect -10.00) and I'm trying to figure out why:
WRITE(*,'(G10.4)') -9.99961061241612
WRITE(*,'(G10.4)') -9.9996
I've tried the following cases:
WRITE(*...
2
votes
1
answer
91
views
storing a procedure pointer within a type in Fortran
I would like to store a pointer to a function as an attribute w/in a type. But the compiler complains that the first argument to the function ought to be the type (like the self or this argument in ...
0
votes
0
answers
146
views
Disabling specific compiler option with intel ifort compiler
In order to debug some code, I'm trying to use the "-check pointers" option. But it warn me and stop the run on some specific cases that I know are unrelated and non-problematic.
I am then ...
0
votes
0
answers
328
views
OneApi 2021 with Visual Studio 2019 not working in 1 out of 6 pcs (Windows 11 in all)
I need to use OneAPI 2021 and VS2019 because the huge fortran model I am using only compiles on those, not more recent versions. I have the OneAPI 2021 and vs2019 installers. I have a procedure that ...
1
vote
1
answer
170
views
Trying to understand behavior of Fortran compiler
This toy code has a problem. The program needs an explicit interface for the subroutine print_i.
module types
type plain
integer :: i
end type plain
type, extends(plain) :: fancy
integer :: i2
...
1
vote
1
answer
295
views
Force ifort to ignore the error #6633: The type of the actual argument differs from the type of the dummy argument
I am trying to compile this Fortran code using ifort (version 2022.1.0). I am getting an error:
error #6633: The type of the actual argument differs from the type of the dummy argument.
I already ...
0
votes
0
answers
36
views
Why is the compiler complaining about declaration conflicts and functions not being declared that are? [duplicate]
I am compiling the following file as part of a much larger project:
subroutine GetSoftwareLicense
! Checks out a license for this instance
use Globals
use Licensing
implicit none
...
0
votes
0
answers
96
views
Why print can change the Fortran results?
It is a rather simple but frustrating question. I have written UMAT with ABAQUS, and part codes are as follows,
macro_strain(:) = 0
macro_strain(1:3) = DSTRAN
!print * , '...
0
votes
0
answers
110
views
REAL80 size and checking its availability in Meson build system
Meson is venerable build system, but its Fortran support is limited when compared to C.
For example, in C, Meson has compiler.has_type(...), compiler.has_function(...),
compiler.has_library(...), ...
0
votes
0
answers
69
views
Fortran with MPI: resample with replacement
I want to use Fortran with MPI to do the resample with replacement on an array DATA(10^7). I want to do 1000 times resample with replacement, and plan to split these 1000 tasks across 10 processors.
...
1
vote
1
answer
114
views
Weird omp_get_wtime() behavior on cluster (ifort)
I am running the same fortran code on my local windows machine and a cluster.
A mwe of the code would be:
program mwe
use omp_lib
implicit none
integer :: indx
integer :: indy
integer :: ...
1
vote
0
answers
663
views
Problem to connect Intel API Fortran Compiler with Visual Studio 2022
For my work I am compiling Fortran code in Visual Studio. Since I updated Visual Studio to the latest version (17.9.6), I can't access my code anymore.
I already updated the Intel Base kit and HPC kit ...
4
votes
1
answer
910
views
"no platform load command" warning
What does this warning message indicate & how can I provide the correct "platform load command"?
ld: warning: no platform load command found in '/..../sdgr/..../ftnmmct.f.52.o', assuming:...
1
vote
0
answers
103
views
how to automatically generate a Module from a project in Visual Studio
I work with Fortran projects in VS2019. My projects employ many subroutines. I've been advised to put the subroutines into a MODULE to get more help from the debugger and code check. Copying the names ...
1
vote
0
answers
109
views
I'm struggling with the coarray implementation in Intel Fortran Compiler (IFX) 2024 and Visual Studio 17 (Windows 11):
The code is the simple code available in One API documentation for the test of the coarray functionality (reported below). The build of target "coarray2.exe" completes correctly (see image) ...
0
votes
2
answers
93
views
Different floating point representations of identical 64 bit double precision numbers
I have some Fortran code which forms a handle from the bit-pattern of a structure. It marks two structures as identical when the handle of each is the same.
I am getting different handles for two ...
0
votes
1
answer
169
views
How to set and access a custom pre-processor variable?
I'm working on making a Fortran application run on both Windows and Linux. Up till now, it's been Windows only. For now, the Linux version is entirely terminal-based while the Windows version has a ...
0
votes
0
answers
78
views
Outout is affected for some weird silly reaons (print command as well as silly declaration of array)
I am new to this community. I am using ifort compiler for my abaqus subroutine. I was using it effortlessly until the last 2 weeks I have been struggling a lot! It is just that my output is affected ...
0
votes
1
answer
645
views
Why Intel Fortran + Intel MPI report warn(error) when using MPI_Bcast?
Here is a simple code of fortran with MPI:
program mpi_broadcast_example
use mpi
implicit none
integer :: ierr, rank, size, root
integer :: a
call MPI_Init(ierr)
call ...
0
votes
1
answer
182
views
why is there "WindowsSdkDir" not found warnings when I run ifort compiler from cmd prompt in visual studio
I was using visual studio 2008 with parallel studio xe2011 to do fortran code, sometimes I also use visual studio 2022 community version. I set the cmd prompt for ifort compiler in External Tools and ...
1
vote
0
answers
214
views
Why is Compaq Visual Fortran (CVF) running under WinXP so much faster than gfortran or Intel ifort on Win10Pro 64?
Computer: intel i7-7820
OS: Windows 10 pro 64bit and WinXP pro running in Oracle VM Virtual box
Fortran Compilers: Compaq Visual Fortran(CVF) Pro. 6.6.C
Intel Fortran ifort version 2024.0.2.27
...
1
vote
0
answers
171
views
ifort command-line vs Visual Studio (assumed shape array)
Recently I encountered the following issue:
I made this very simple program in Visual Studio Enterprise 2022, Intel® Fortran Compiler Classic 2021.10.0, Windows 10:
program test
implicit none
...
0
votes
0
answers
271
views
IFORT/IFX differences in (ENx.y) output?
I'm moving some code from the Intel IFORT x86 compiler to the IFX x64 compiler and noticed that the (EN..) format behaves differently.
For example a value of 1234567 output using (EN0.6) produces:
...
0
votes
1
answer
336
views
Fortan subroutine warning in Abaqus (warning LNK4210: .CRT section exists; there may be unhandled static initializers or terminators)
I am facing a problem running this specific subroutine cdpm2vumat.f in abaqus. The job log file shows this error.
cdpm2vumat.f(677): remark #8291: Recommended relationship between field width 'W' and ...