intel-fortran

Correct execution of Final routine in Fortran

白昼怎懂夜的黑 提交于 2020-01-04 09:33:37
问题 I have following Fortran code type t_octree integer :: max_num_point class(t_octree_node), pointer :: root => null() contains final :: DESTROY_OCTREE end type t_octree type t_octree_node real :: box(2,3) integer :: depth type(t_octree_node), pointer :: parent => null() type(t_octree_node), pointer :: children(:) => null() class(t_octree_leaf), pointer :: leaf => null() contains final :: CLEAN_NODE end type t_octree_node type, extends(t_octree_node) :: t_octree_leaf integer, allocatable :: id(

Correct execution of Final routine in Fortran

给你一囗甜甜゛ 提交于 2020-01-04 09:32:32
问题 I have following Fortran code type t_octree integer :: max_num_point class(t_octree_node), pointer :: root => null() contains final :: DESTROY_OCTREE end type t_octree type t_octree_node real :: box(2,3) integer :: depth type(t_octree_node), pointer :: parent => null() type(t_octree_node), pointer :: children(:) => null() class(t_octree_leaf), pointer :: leaf => null() contains final :: CLEAN_NODE end type t_octree_node type, extends(t_octree_node) :: t_octree_leaf integer, allocatable :: id(

Change of directory in Fortran in a non compiler-specific way

泄露秘密 提交于 2020-01-04 02:41:07
问题 I wish to change the working directory in a Fortran 90 code. Is it possible to do this in a non compiler-specific way? Here is my code: program change_directory integer :: ierr call system("mkdir -p myfolder/") !call system("cd myfolder/") !doesn't work ierr = chdir("myfolder") if (ierr.NE.0) then write(*,'(A)') "warning: change of directory unsuccessful" end if open(unit=33,file="myfile.txt",iostat=ierr) if (ierr.EQ.0) then write(unit=33,fmt='(A)') "Test message" close(unit=33) end if end

Compiling mixed C++/C code with Fortran using Visual Studio 2013 and Intel Fortran

好久不见. 提交于 2020-01-03 19:43:55
问题 I am trying to compile a simple C++/Fortran Mixed program but have linking issue. I am using Visual Studio 2013 Ultimate and Intel Visual Fortran Compiler XE 14. The program is very simple and is copied from somewhere from the net. It has one C++ file and one Fortran file The C++ file is: // Illustrate passing integer and floating point arrays // from C++ to Fortran #include <iostream> using namespace std; extern "C" { int __stdcall SUMIT(int *, int*); float __stdcall MEAN(float*, int*); }

Compiling mixed C++/C code with Fortran using Visual Studio 2013 and Intel Fortran

故事扮演 提交于 2020-01-03 19:43:52
问题 I am trying to compile a simple C++/Fortran Mixed program but have linking issue. I am using Visual Studio 2013 Ultimate and Intel Visual Fortran Compiler XE 14. The program is very simple and is copied from somewhere from the net. It has one C++ file and one Fortran file The C++ file is: // Illustrate passing integer and floating point arrays // from C++ to Fortran #include <iostream> using namespace std; extern "C" { int __stdcall SUMIT(int *, int*); float __stdcall MEAN(float*, int*); }

Can Fortran PURE functions use global parameters?

ⅰ亾dé卋堺 提交于 2020-01-03 16:58:39
问题 It seems to me the what is called a pure function in Fortran is not considered pure enough for those who use functional programming. So here is my question. Suppose I have the following code: MODULE basics IMPLICIT NONE INTEGER, PARAMETER :: dp = kind(1.0d0) REAL(dp), PARAMETER :: PI=3.1415926535897932_dp REAL(dp), PARAMETER :: earthEquatorialRadius=6378.137_dp END MODULE basics MODULE myFunctions USE basics IMPLICIT NONE PURE REAL(dp) FUNCTION sphericalArc(angleInRadians) REAL(dp),INTENT(IN)

What is _IO_wfile on a gprof output of a fortran code?

我与影子孤独终老i 提交于 2020-01-03 15:56:44
问题 I have some fortran code compiled with intel fortran compiler ifort. When I do a profile test with gprof, I get that most of the time is used in IO operations, I think finding the end of the files, but I can no find any more documentation on this: index % time self children called name <spontaneous> [1] 20.6 0.07 0.00 _IO_wfile_seekoff [1] ----------------------------------------------- <spontaneous> [2] 20.6 0.07 0.00 sforcepf_ [2] ----------------------------------------------- <spontaneous

How to implement Structures of Arrays instead of Arrays of Structures in Fortran?

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-02 19:11:08
问题 I'm writing my code on CFD topic with Fortran. After discussing with some friends from computer science, they told me that one could speed up the computation time if one implements Structures of Arrays (SoA) instead of Arrays of Structures (AoS) on his/her code. There are many examples I've seen about this topic's implementation, but most of them are in C or C++. (e.g. https://software.intel.com/en-us/articles/how-to-manipulate-data-structure-to-optimize-memory-use-on-32-bit-intel

Using f2py with windows x64 and Intel Fortran

房东的猫 提交于 2020-01-02 07:05:53
问题 I'm trying to achieve in using f2py on windows 8, x64, with Intel Fortran Compiler. I've tried two things : 1) install via windows 64x installer. http://www.lfd.uci.edu/~gohlke/pythonlibs/ NumPy is correctly installed, but no compiler found when executing f2py -c --help-fcompiler I got : Fortran compilers found: Compilers available for this platform, but not found: --fcompiler=absoft Absoft Corp Fortran Compiler --fcompiler=compaqv DIGITAL or Compaq Visual Fortran Compil --fcompiler=g95 G95

Using f2py with windows x64 and Intel Fortran

家住魔仙堡 提交于 2020-01-02 07:05:04
问题 I'm trying to achieve in using f2py on windows 8, x64, with Intel Fortran Compiler. I've tried two things : 1) install via windows 64x installer. http://www.lfd.uci.edu/~gohlke/pythonlibs/ NumPy is correctly installed, but no compiler found when executing f2py -c --help-fcompiler I got : Fortran compilers found: Compilers available for this platform, but not found: --fcompiler=absoft Absoft Corp Fortran Compiler --fcompiler=compaqv DIGITAL or Compaq Visual Fortran Compil --fcompiler=g95 G95