intel-fortran

Questions on “forrtl: error (65): floating invalid”

女生的网名这么多〃 提交于 2019-12-11 12:02:15
问题 I've been running a huge Fortran code with Intel compiler version 13.1.3.192 under the debug mode (with -O0 -g -traceback -fpe3 flags being turned on). It gave me the following output message: ... ... forrtl: warning (402): fort: (1): In call to MPI_ALLGATHER, an array temporary was created for argument #1 forrtl: error (65): floating invalid Image PC Routine Line Source arts 00000000016521D9 pentadiagonal_ser 385 pentadiagonal.f90 arts 0000000001644862 pentadiagonal_ 62 pentadiagonal.f90

Optimization defeats robustness measures

妖精的绣舞 提交于 2019-12-11 10:21:07
问题 I am currently investigating robust methods for the summation of arrays, and implemented the algorithm published by Shewchuk in "Adaptive Precision Floating-Point Arithmetic and Fast Robust Geometric Predicates". While the implemented algorithm works as expected in gfortran , ifort optimizes the countermeasures away. To give some context, here is my code: module test_mod contains function shewchukSum( array ) result(res) implicit none real,intent(in) :: array(:) real :: res integer :: xIdx,

FORTRAN block data seems to not be working

南笙酒味 提交于 2019-12-11 06:36:34
问题 I am working on some legacy code that relies heavily on common blocks which are initialized with BLOCK DATA similar to the code below. BLOCK DATA filename PARAMETER (size=100) CHARACTER*8 somearray(size) COMMON /block1/ somearray DATA(somearray(i), i=100)/ *'string1', 'string2', ... , 'string100'/ END At some point in the program a subroutine uses this common block as shown in the code below. SUBROUTINE SUB(array) IMPLICIT DOUBLE PRECISION (A-H,O-Z) CHARACTER*8 array(*), somearray(100) COMMON

Returning a pointer to a device allocated matrix from C to Fortran

南笙酒味 提交于 2019-12-11 05:34:40
问题 First off, I'm kind of new with Fortran/C/CUDA. Secondly, I'm working on a Fortran/C program that performs matrix vector multiplication on the GPU using cuBLAS. I need to multiply multiple (up to 1000) vectors with the one matrix before I need to update the matrix contents. However, the current version I have has to reallocate the matrix every time a new vector is sent to the GPU (which is incredibly wasteful and slow since the matrix hasn't changed). I want to be able to multiply the matrix

Prevent changing variables with intent(in)

ⅰ亾dé卋堺 提交于 2019-12-11 05:15:25
问题 so reading the following question (Correct use of FORTRAN INTENT() for large arrays) I learned that defining a variable with intent(in) isn't enough, since when the variable is passed to another subroutine/function, it can be changed again. So how can I avoid this? In the original thread they talked about putting the subroutine into a module, but that doesn't help for me. For example I want to calculate the determinant of a matrix with a LU-factorization. Therefore I use the Lapack function

How to use a variable in the format specifier statement?

五迷三道 提交于 2019-12-11 05:06:38
问题 I can use: write (*, FMT = "(/, X, 17('-'), /, 2X, A, /, X, 17('-'))") "My Program Name" to display the following lines on the console window: ----------------- My Program Name ----------------- Now, I want to show a pre-defined character instead of - in the above format. I tried this code with no success: character, parameter :: Chr = Achar(6) write (*, FMT = "(/, X, 17(<Chr>), /, 2X, A, /, X, 17(<Chr>))") "My Program Name" Obviously, there are another ways to display what I am trying to

ifort: error #10037: could not find 'link'

為{幸葍}努か 提交于 2019-12-11 04:02:19
问题 I downloaded and installed evaluation software of: Intel Parallel Studio XE Professional Edition for Fortran Windows. My system is a 64 bit, Windows 7 OS. During its installation I was asked to download and install also: Microsoft Visual C++ 2013 Redistributable(x64)- 12.0.21005 . I am trying to compile my source files using the command line. In order for the command ifort to be recognized, I added the directory: C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2016.0.110\windows

ifort's no-wrap-margin works only partially

喜你入骨 提交于 2019-12-11 02:52:52
问题 for some unfortunate reasons I have to use ifort, the "problem" is that ifort truncates long (>80 characters) write(*,*) lines by default (this doesn't happen in gfortran). There's an option called -no-wrap-margin that supposedly recovers the gfortran behavior, which is to write lines as long as I want in a single line. However this only works for lines with less than 8184 characters. A line longer than that, as for example the one obtained with program main implicit none integer :: i write(*

Missing symbol 'for_realloc_lhs' in Matlab's libifcorem​d.dll'

旧巷老猫 提交于 2019-12-11 02:51:50
问题 I built a toto.dll and a toto.lib with ifort (Intel's 2017 update 4 fortran compiler). Then I used mex matlab's compiler to produce several mexw64 files. When I used mex I linked to toto.lib . Then, I ran a .m file (matlab file) inside matlab 2017a 64bits (under win10 64bits), an this file is using functions from the various mexw64 's I compiled. In the matlab file, at the first call of such function I got the following error : Invalid MEX-file 'C:\path\to\mexfile.mexw64': Missing symbol 'for

multiple definition link error in fortran (ifort - gfortran)

不羁的心 提交于 2019-12-11 02:49:23
问题 Well, I've this problem (the description is long, but I think it is easy to solve) . I've three files: nrtype.f90 , which have some stupid definitions, but it is used by the following files: module nrtype integer, parameter :: I4B = SELECTED_INT_KIND(9) integer, parameter :: I2B = SELECTED_INT_KIND(4) integer, parameter :: I1B = SELECTED_INT_KIND(2) integer, parameter :: SP = KIND(1.0) integer, parameter :: DP = KIND(1.0D0) endmodule nrtype LUd.f90 , which makes part of the work: module