Category "fortran"

Can I add a watch to a COMMON block?

I have a very large, very old, very byzantine, very undocumented set of Fortran code that I am trying to troubleshoot. It is giving me divide-by-zero problems

How to use the Fortran compiler in Intel Parallel Studio XE with Visual Studio

I am trying to debug a Fortran code. I have installed Intel Parallel Studio XE which includes the iFort compiler and Microsoft Visual Studio. During the install

MPI_alltoallw working and MPI_Ialltoallw failing

I am trying to implement non-blocking communications in a large code. However, the code tends to fail for such cases. I have reproduced the error below. When ru

"undefined reference" error when trying to compile a fortran program with external dependencies using ifort

I am using the following command to compile my fortran program, which is the last line of the result of the hdf5 h5fc command on my Ubuntu 20.04.4 LTS x86_64 ma

How can I call python code from a FORTRAN Code?

I have written a python code for modeling a structure in Abaqus. I have checked it by abaqus cae noGUI=mycode.py in command window (That's how Abaqus is called

How to avoid declaring and setting the value of a variable in each subroutine?

How to avoid repeated declaration of a variable that has a constant value in subroutines? For example: program test implicit none integer :: n integer ::

Data alignment inside a structure in Intel Fortran

I'm trying to align in memory the following type of data: type foo real, allocatable, dimension(:) :: bar1, bar2 !dir$ attributes align:64 :: bar1 !di

Error: "The leftmost part-ref in a data-ref can not be a function reference."

I am trying to write a FORTRAN subroutine for ABAQUS that would modify the seepage coefficient and thus the flow depending on whether there is contact on the su

Passing allocatable array into a subroutine

I am working on a f90 code that I didn't write. I am not a very experienced fortran user. There is a part that bothers me a bit and I am not sure if it is a nor

Python ctypes pass pointer in structure field to Fortran derived types

I want to make a variable-size array to pass to a Fortran DLL and get the result (by reference), so that I can get value directly. In the Fortran code, I use a

f2py compilation error with type(c_ptr) from iso_c_binding

Summary I am trying to write a model using Fortran and I need to use a function to integrate (closed limits). I tried working with fgsl and the standalone scrip

Difference between Fortran's "abstract" and "normal" interfaces

I'm trying to understand the difference between abstract interfaces and "normal" interfaces. What makes an interface abstract? When is each one necessary? Supp

How to find NaN in an array and stop once found?

Say, I want a routine to stop once a not-a-number is found in an array. How can I do this? if (array(i) .eq. NA) ... seems not work. The array is an array of fl

f2py does not properly import, despite successfully compiling

I am successfully compiling my Fortran subroutine with f2py. However, a folder is created as well as a pyd file. If I do not put the created pyd file in the g