• Ivar KJELBERG added an answer:
    Which is the best alternative to Matlab?
    Matlab is an excellent software, but it is commercial and its price is very high. Other alternatives are available (Octave, Scilab, Freemat, ...) but each one has pros and cons. Is there a real competitor of Matlab?
    Ivar KJELBERG · Centre Suisse d'Electronique et de Microtechnique

    You have also SyQuest:

    From http://www.calerga.com/

    Sincerely, Ivar

  • Tejpal Goda added an answer:
    Which programming language is the fastest when handling large matrices and arrays? Fortran or C++?
    I am trying to provide some answers to a long disputed question on: "which programming language is the fastest when handling large matrices and arrays. Fortran or C++". Personally I use Fortran but after reading some very interesting suggestions and experiences by users that can and did program with both fortran and C++ languages (without providing any evidence... just discussing... but interesting stuff nonetheless) I thought of trying C++ myself and performing a small experiment in an attempt to find some answers. I developed a very simple algorithm which is given below in C++. This code performs some calculations with a square 10000x10000 matrix named jimmy looping the procedure 100 times, while a second part of the algorithm handles an array named jimmy2 (100 million elements) and loops also 100 times the performed calculations. By the way, I must note here that the code for the loops in C++ was found in the net due to my poor capabilities in C++ (I had to start from somewhere). Given that I do not have that much of experience with C++ compilers, I would like someone who does have this experience, to take this algorithm and first of all optimize it, if he/she thinks that I programmed any of its parts in a non optimal manner (most probably I did), and then compile it in a 32-bit machine by using the latest C++ compiler and post the exe file in this conversation. To maintain a level of clarity, please repost the code in C++ if any reprogramming was done. Now, what I did, was to compile the C++ code with the default compiler incorporated in VS2013 and by using Full Optimization (/Ox) in the release configuration, I got the following average times in ms (I run an Intel(R) Core(TM) i5 CPU M520 @2.4GHz on a personal laptop): ms1: 11900 (matrix 10000x10000) ms2: 11400 (array 100,000,000) Those that might be interested in participating here must know that the corresponding average times, when using Visual Intel Fortran Compiler XE14 , were: ms1: 5300 (matrix 10000x10000) ms2: 4900 (array 100,000,000) The algorithm developed in F90 is also given and can be found at the end of this post. Waiting to hear from you C++ experts, with anticipation. P.S. If any C or C# or Python or other language users would like to give it a go the same things apply. Post your code and the .exe file so as to derive the corresponding times. No GPU allowed given that this has as a general goal to compare CPU compilers. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// C++ Code /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #include #include #define WIDTH 10000 #define HEIGHT 10000 int jimmy[HEIGHT][WIDTH]; int jimmy2[HEIGHT * WIDTH]; int n, m, ii, DumDum1, DumDum2; using namespace std; int MS2(int Dum) { int Dum2; // Check for array use auto begin2 = chrono::high_resolution_clock::now(); for (ii = 0; ii < 100; ii++) for (n = 0; n < HEIGHT; n++) for (m = 0; m < WIDTH; m++) { jimmy2[n*WIDTH + m] = (n + 1)*(m + 1); } auto end2 = chrono::high_resolution_clock::now(); auto dur2 = end2 - begin2; auto ms2 = std::chrono::duration_cast(dur2).count(); Dum2 = ms2; return Dum2; } int MS1(int Dum) { int Dum1; //Check for matrix use auto begin = chrono::high_resolution_clock::now(); for (ii = 0; ii < 100; ii++) for (n = 0; n < HEIGHT; n++) for (m = 0; m < WIDTH; m++) { jimmy[n][m] = (n + 1)*(m + 1); } auto end = chrono::high_resolution_clock::now(); auto dur = end - begin; auto ms = std::chrono::duration_cast(dur).count(); Dum1 = ms; return Dum1; } int main() { DumDum1 = MS1 (1); DumDum2 = MS2 (2); cout << "ms1: " << DumDum1 << endl; cout << "ms2: " << DumDum2 << endl; cin.get(); } !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! F90 Code !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Program LoopTest Implicit None Integer, Parameter :: iWidth = 10000, iHeight = 10000, iRepeat = 100 Integer :: i, m, n, iaA (iWidth,iHeight), iaA2 (iWidth * iHeight) Integer :: Count, iTime0, iTime1, iTimeT ! Main call system_clock (iTime0) do i = 1, iRepeat do n = 1, iHeight do m = 1, iWidth iaA (n,m) = (n + 1) * (m + 1) enddo enddo enddo call system_clock (iTime1) iTimeT = floatj (iTime1 - iTime0) / 10 write (*,*) 'ms1: ', iTimeT write (*,*) iaA (iWidth,iHeight) call system_clock (iTime0) do i = 1, iRepeat do m = 1, iHeight do n = 1, iWidth iaA2 ((m-1)*iWidth + n) = (n + 1) * (m + 1) enddo enddo enddo call system_clock (iTime1) iTimeT = floatj (iTime1 - iTime0) / 10 write (*,*) 'ms2: ', iTimeT write (*,*) iaA2 (iWidth*iHeight) pause End Program LoopTest
    Tejpal Goda · Marwadi Education Foundation’s Group of Institutions

    By clubbing any language Fortran ,C or C++ with graphical language CUDA/OPEN CL will act as parallel processing and it has been observed that speed for carrying out program is increases on large scale.  

  • Where can I find kalman filter fortran code?

    I need data assimilation fortran code for wave data and specially, I want to use Kalman filter scheme.
    Here (http://enkf.nersc.no/) I found an ensemble Kalman filter code by its subroutines but I want a standard Kalman filter fortran code.

    பாரதி செழியன் · Indian Institute of Management Udaipur

    FORTRAN is simple and powerful. It would be very helpful for you if you could try to write your own programs in fortran

  • E. Mera added an answer:
    What is the best programming language for solar radiation data processing?

    I just programmed macros in Excel, but I realize that sometimes (when the databases are very large and I would like to calculate many specific variables ) consumes many resources and computing time. I hear of people using Python, Fortran, C++, etc., but what is the best?

    E. Mera · Universidad Tecnológica Metropolitana

    hola, depende cual sea el origen de tus datos, si provienen de imagenes satelitales en la universidad programamos en basic, cuando son datos de estacion o track usamos matlab..

  • Aldo Dall'Osso added an answer:
    Why are physicists stuck with Fortran and not willing to move to Python with NumPy and Scipy?

    Nowadays all of the major Fortran related numerical calculus have exactly mapped equivalent libraries in more modern language framework like Numerical Python (NumPy) and Scientific Python (SciPy). 

    What keeps physicists stuck with Fortran?

    Performance? 

    Portability?

    Scientific evidence?

    Aldo Dall'Osso · AREVA

    The purpose of Python and Fortran is not the same. Fortran is practical for programming mathematical and physical functions, whereas Python is practical for the definition of algorithms that use the above cited functions. For example, the french CEA is developing version 3 of the APOLLO code for neutronic analysis. The physical/mathematical functions are written in Fortran or C++. The calculation schemes that call these functions in order to perform design calculations are written in Python. In this way the time consuming functions take advantage of the high performance of Fortran, whereas the definition of the calculation schemes take advantage of the flexibility of the Python language. A description of this approach can be found in the following paper:
    H. Golfier et al, "APOLLO3: a common project of CEA, AREVA and EDF for the development of a new deterministic multi-purpose code for core physics analysis", M&C 2009, Saratoga Springs, New York, May 3-7, 2009.

  • Karthic R. Narayanan added an answer:
    Why should we define DDSDDE in an abaqus umat code?

    in a umat code with fortran we have to define ddsdde.

    i want to khnow why it is important?

    what dos it do exactly?

    Karthic R. Narayanan · Nanyang Technological University

    Kindly look into this, this will answer your queries

    https://code.google.com/p/parafem/wiki/UMATs

  • SOUFYANE BENMENZER added an answer:
    How to create a solid adiabatic(a blocked_off regions) inside an enclosure ?

    Hello,
     I am a beginner in Fortran Programing ,
    I have conceived a numerical code with Finite Volume Method , in an enclosure
    can any one tell me how I can create a solid adiabatic(a blocked_off regions) inside an enclosure
    I found in Patankar's book that it mus retain the source terms , Sp=-10e30
    But I can't do that with velocity contour.

    SOUFYANE BENMENZER · The University of Batna

    my question is about , I used the finite volume method , to study natural convection in enclosure(cavity)  By Fortran ,,


    How  I can create a blocked_off regions inside an enclosure
    I found in Patankar's book that it mus retain the source terms , Sp=-10e30
    But I can't do that with velocity contour.

  • Raed Batbooti added an answer:
    Does anyone have a fortran code for the locally conservative Galerkin method?

    The locally conservative method with time step or with out for heat and fluid flow in one dimension (for example water is passing through a circular pipe).

    Raed Batbooti · Swansea University

    Hi Hayder, you can looking for related work in the followin source code, don't miss the FEM code avaliable in the mentioned sourse code as I know you are interesting with FEM 

    http://people.sc.fsu.edu/~jburkardt/f_src/f_src.html

  • How can I add some codes into EPANET?

    EPANET is an open source software and I need to add several code to it.

    I have to add new algorithm to it.

    Can I use from MATLAB or FORTRAN?

    Seyed Mehdi Mohammadizadeh · University of Sistan and Baluchestan

    It is the EPANET Programmer's Toolkit.

    I think it is useful for all users of EPANET. 

  • Paul, D. added an answer:
    Does anyone have REFPROP FORTRAN source code for calculating the properties of Carbon dioxide?

    For the stability analysis of supercritical natural circulation loop i require the REFPROP FORTRAN source code for getting the properties of carbon dioxide. If anyone is having the code pl share it.

  • Simon Schröder added an answer:
    Are programming language performance benchmarks relevant in multi-platform applications?

    Let's take Javascript as an example. It's not the best language for heavy computing in comparison to say C++ or Fortran, but it can work across nearly all platforms (Which is an advantage I find very useful). However, I find it hard to take benchmarks into consideration owing to different engines across platforms (Like Chrome's V8 and iOS's Webkit). Also, different CPU architectures are a major factor.

    So the question is: Do benchmarks hold relevance when considering multiplatform applications?

    Simon Schröder · Fraunhofer Institute for Industrial Mathematics ITWM

    Most of the time benchmarks will give you skewed results. Two different computers will produce different results. How will you make sure that neither the OS, nor the CPU architecture, nor the amount and speed of RAM influences the results? If you don't use identical hardware it is impossible to tell what you are benchmarking. What you can actually benchmark is how your solution will scale with problem size (but this is only for one platform). If you have different kinds of hardware you need to set a baseline for every platform independently. As a baseline you can, for example, provide another script written in the same language. This will set a baseline on all platforms. You might have a chance to compare your script to this baseline on each platform separately.

    I am not sure if this approach will make sense as I have not thought this concept through. But, for now I am really skeptical when I see comparison between different platforms.

  • George Varlas added an answer:
    How can I analyze grib files using Fortran?

    Has anyone worked with grib or netCDF files using Fortran? I want, for instance, to find the min/max values of my table etc. Do I have to use the grib filter each time I want to download the data or is there a way to extract each value I want through the code?

    George Varlas · Hellenic Centre for Marine Research

    Dear Stavros I suggest you NCL language for working with grib1, grib2 and netcdf. Also, you can see wgrib tricks: http://www.ftp.cpc.ncep.noaa.gov/wd51we/wgrib/tricks.wgrib

  • Simon Schröder added an answer:
    How can I obtain Voronoi diagram on a Red Blood Cell using XYZ coordinate of points and face connectivity data from Delaunay triangulation?

    Dear all, I intend to obtain Voronoi diagram on RBC using MATLAB/FORTRAN. I need the following specific information.

    1. Voronoi vertex using the normal vector for each Delaunay triangle;
    2. Order of each Voronoi polygon;
    3. Voronoi vertex lists that define the Voronoi polygons;
    4. Component of normals on the Voronoi polygons;
    5. Areas of the Voronoi polygons;
    6. Centroids of the Voronoi polygons;
    7. Finally, plot Voronoi polygons using PATCH;

    Please find attached text files RBC_1 which contain XYZ node coordinates on the RBC and RBC_2 which contain face connectivity data from Delaunay triangulation.

    I have tried to follow the work of John Burkardt for unit sphere: http://people.sc.fsu.edu/~jburkardt/m_src/sphere_voronoi/sphere_voronoi.html but its not working.

    Thank you in advance.

    N.B Any comment and advice will be highly appreciated.

    Simon Schröder · Fraunhofer Institute for Industrial Mathematics ITWM

    Ademiloye, what you see in the images is that the surface tessellation is possible for some 2D surfaces embedded in a 3D space. In the example it works nicely because the points have been placed in a regular pattern. If for this data you would start to randomly disturb some of the points the vertices of a Voronoi cell will not necessarily be in one plane anymore. I would not know how to define the area or the normal of the Voronoi cell in these cases. You should also note that the volume of the new torus is less than that of the original one. You should be aware of this, even if in most cases this would not concern you.

    We currently have a PhD having similar problems in the context of flow simulation. And in his case the points are not nicely distributed in space and he will often find non-planar polygons if he would try to use the original Voronoi diagram.

  • Simon Schröder added an answer:
    Hello all, does anyone know how to define Sign(x) and its derivative Sign(1,x) in Fortran 90?

    I am new to Fortran 90. I intend to define the "Sign(x)" function and it's "derivative" in Fortran 90, which will later be used by AUTO-07p(Bifurcation Analysis Software). In addition, the variables used in my subroutines (the variables inside Sign function), are not "x". For instance, in some sections of a specific subroutine, it is "i", in another section of the same subroutine it is "f", and so on and on. I need to define the "Sign" function that it could be used for all my variables. Also, there are no specific values assigned to my variables in the Fortran code, they are computed by AUTO. Thanks in advance for your attention.

    I am transferring my equations from Maple, in which the derivative of signum(x), is signum(1,x). The derivative of signum(x), is 2 times Dirac delta function (as mentioned by Professor Mittal). It is described in Maple that this function, is always zero except for x=0, in which it's not defined (Which gives the less precise description of Dirac Delta function). I don't know how to write a function in Fortran for the derivative function.

    My code is limited to definition of equations, which will later be used by program AUTO, for bifurcation analysis. Which means, my code is not quite a program, it is simply consisted of specific subroutines which contain my equations and conditions of ODEs. Is it possible to define a FUNTION structure inside a SUBROUTINE, if not how should I implement the functions suggested below for signum(x) into my codes, so that in each subroutine the appropriate variables are used instead of the locally defined x variable. 

    Simon Schröder · Fraunhofer Institute for Industrial Mathematics ITWM

    Aldo, I would actually prefer your version over mine ;)

  • How do you get the amount of memory used by a Fortran process?

    I would like to know if a function/subroutine/system call exists to output the amount of physical memory used by my Fortran code.

    I'm currently facing some memory leaks and I would like to understand exactly where they are coming from.

    I am using ifort compiler on windows (Intel Inspector is not an option for the moment).

    Mikhail Sergeevich Ozhgibesov · Nanyang Technological University

    I would recommend to use Intel profiler (actually there several separated tools which help to solve different problems with code), it has many features and can detect virtually any problem. Unfortunately it's not free, but you can download trial version (it works for 30days without any limitations) from intel website.

  • Mansour Al Qubeissi added an answer:
    Apart from a simplified model, what other modelling factors lead to higher CPU efficiency for a given workstation?

    I developed a FORTRAN based model for the heating and evaporation of multi-component (automotive fuel) droplets. When replacing the large number (100s) of components with smaller representative number of components, the CPU time will decrease significantly. For a given PC, what other factors apart from the format of the written code, routines, subroutines, syntax ..etc., can increase the CPU efficiency of the model?

    Mansour Al Qubeissi · University of Brighton

    Thank you guys. Most of your comments were useful and credited accordingly!

  • Niraj Kumar Jha added an answer:
    How can i simulate the 3D crack propagation of FGMs in Abaqus?

    Is it possible to simulate without any parallel code such as fortran code?

    or should I use UEL in Abaqus?

    Niraj Kumar Jha · Leibniz Universität Hannover

    Hi Dawood ,

    Yes it is possible. You can write your own tangent stiffness for material degradation i.e. UMAT/VUMAT. In case you want to develop your own element then UEL is recommended.

    Please refer a detailed Abaqus example Failure of blunt notched fiber metal laminates..

  • Sameer Abufardeh added an answer:
    What is the most convenient programming language to deal with the big tables of data?

    I'm doing calculations on the big tables (approx. 20 x 1 000 000). To improve the speed of calculations I need to switch from Scilab (Matlab) to Fortran or C++. I have some experience with F & C++. It looks like in Fortran you have to allocate or deallocate memory for variables manually contrary to C++, but declaration and dealing with the big multidimensional tables in C++ looks much more complicated than in Fortran. Am I right? I appreciate any helpful comments.

    Sameer Abufardeh · North Dakota State University

    For Big Data - Best to use scripting languages such as R  or Python easy to learn and easy to use.

  • Bernd Schmeikal added an answer:
    What about using integral mean lookup tables?

    It has been a long time since I have either worked or been able to work in this area. The medications I take long ago deprived me of the ability to do higher math and computer programming.  But I don't understand why people keep trying to use the arithmetic mean; despite its ease of calculation, it really is bad in Richard's equation.  There's low-overhead another approach - a lookup table. 

    Imagine a Darcian integral mean function, F(phi), that integrates from phi to infinity, such that the Darcian integral mean from phi1 to phi2 is the difference of the functions for phi1 and phi2.  In other words, the Darcian integral mean, KD(phi1,phi2) = F(phi2) - F(phi1).  You keep track of the signs.  Then, instead of the computational load of calculating KD for every time and space step, the table for a particular soil need only be calculated once, in fine enough detail that linear or non-linear interpolation between table values for F(phi) meets mass balance needs. 

    In order to study this mathematically, you might look at some old unpublished papers I recently uploaded on a general quasi-exact solution to R.E. in both vertical and horizontal unsaturated flow.  If I recall correctly, they use the Boltzmann transformation and produce time- and space-invariant curves by a high-order shooting method, and the conductivity and saturation functions used in that approach are Fortran subroutines, which can be anything.  Possibly including a transition within the curve from a clay to a sand, etc. 

    Bernd Schmeikal · University of Vienna

    Dear Donald, I'd just like to appreciate this is a very interesting proposal. Bernd

  • S.A. El-Agouz added an answer:
    Can anyone help my to get fortran program for humidification–dehumidification desalination unit ?

    Thank you for reply

    S.A. El-Agouz · Tanta University


    Thank you for this talk
    I use humidification and dehumidification system with the new system for desalination.
    These equations to solve the system of energy side first and then the design is all part.
    The Fortran program is building.
    The problem in the enthalpy of the humid air equation in humidification which make the LN (-).
    Read this paper is attach.

  • Aman Bansal added an answer:
    How to show Output of matrix in FortranForm with "&" character ?

    I have a matrix and i have shown the output of matrix one by one element in FortranForm. 

    the problem is i want to put "&" continuation charater in output because when I am copying the data into fortran Code, Fortran is showing warning that it exceeds 2048 characters .

    So i wanted to put ampersand character in each output of matrix element in FortranForm. please help

    Aman Bansal · Indian Institute of Technology Delhi

    @Aldo Dall'Osso, Dear Sir, This problem i have solved it already. But I have a second problem for which I have already put up a question here.

    Here is the link for the same.  Any help regarding this. 

  • Baikuntha Silwal added an answer:
    Is it possible to link MATLAB and ABAQUS ?

    hi dear masters  i want to simulate crack propagation with cohesive zone in a concrete beam by ABAQUS , i want to know is it possible to link MATLAB and ABAQUS ? ,and for which kind of problems we can use MATLAB? is it possible to use MATLAB codes instead of writing subroutin by fortran in ABAQUS?

    i'd appreciate your help 

    Baikuntha Silwal · University of Virginia

    How can we link between Matlab and OpenSees?

    Does someone use Matlab to run OpenSees. I am looking for matlab code to run OpenSees .

  • Aman Bansal added an answer:
    In mathematica, I want to extract the elements of a matrix and further output should be shown in Fortran Form. Can anyone help me with this?

    In mathematica, my matrix output has symbolic expressions like 2D+3E^2. First I want to extract it and then output to be shown in FortranForm i.e. 2*D+3*E**2. I want to use the matrix elements in Fortran code so for this they have to be in FortranForm. So please, if anyone can provide syntax for this purpose. Persons who know mathematica software can help me with this. 

    I think there should be a single line statement that will do both functions- extracting elements and converting them to FortranForm.

    Aman Bansal · Indian Institute of Technology Delhi

    Thanks Brian G Higgins . 

    This is what i wanted.

  • Hadi Mehdipour added an answer:
    How might one fix an error with Abaqus subroutine?

    Hi everybody,

    I am working on composite material damage and its criteria so that I have to compare some of them which are not included in Ababaqus. I have chosen a simple bar damage example from a book and have tried to run it, but have faced to an error, which has been attached. I also have attached the window which demonstrates that Abaqus and Fortran are linked.

    It would be appreciated if you let me know how to fix the error.

    Thanks

    Hadi

    Hadi Mehdipour · Politecnico di Torino

    Thanks Fernando, It's done.

    Thanks again

  • Ion Laurentiu Tobos added an answer:
    How do you use Fortran .dll and .so executables from an R package?

    I have an R package and I want to update it by giving the option to run a pre-compiled .dll made from a Fortran source, since by this way it is very fast.

    The problem is that I'd like to have except .dll (Windows executables) the .so files (linux executables) in order for the package to continue be platform-independent.

    Is there any way to produce both of them? I have downloaded 'Eclipse' tools - will they help for this reason? (I am working with Windows 7 and GCC GNU compilers for the moment; Cygwin also available).

    Any suggestions? Thank you.

    Ion Laurentiu Tobos · Michigan State University

    I agree there are no miracles ! You either choose to make your code portable, in which case you provide the source code and let your IDE do the work, or you optimize/tweak the crap out of it and compile the modules yourself, but in that case you have to stick with the CPU/architecture you are working on.   As they say, "there's no FREE LUNCH".   What a pitty :(

  • Somenath Chatterjee added an answer:
    How do I insert a reaction kinetic to Aspen Plus?

    I want to write a Fortran subroutine to insert a reaction kinetic to Aspen Plus, because the kinetic I have is not in the form as in Aspen Plus kinetics. As I don't know how to do that, I would be so grateful if someone send me a step by step procedure to follow.

    Many thanks.

    Somenath Chatterjee · Homi Bhabha National Institute

    Custom modeler can be used. Also pseudo components to model reaction intermediates and molecules not available in aspen database is possible. 

  • How FORTRAN 77 contributes in present research activities ?

    Although FORTRAN ( formula translation ) is first ever high level programming language and till now no any programming language snatches its niche in this field. What features makes FORTRAN as a soul language ? How it is used in quantum computation ?

    Mikhail Sergeevich Ozhgibesov · Nanyang Technological University

    Due to it age, FORTRAN has many mathematical libraries and would say that any numerical algorithm has been already implemented in FORTRAN.

    This language is still in use, and many modern and mature Quantum Mechanical softwares are written in it; e.g. GAMESS, SMASH.

  • Liyuan Hu added an answer:
    Could anyone tell me where I can find some folding potential codes?

    Hello, every friend!

    I need to calculate the optical potential between two nuclei, so I've tried to find open source folding potential calculation codes.

    I have known that there are DFPOT and SPI-GENOA, but I haven't found their codes that can be used directly, i.e., where to download them?

    Thank you very much!

    Liyuan Hu · Harbin Engineering University

    @Alexis Diaz-Torres

    Dear Prof. Alexis Diaz-Torres,

    Hello!

    I have found some code on CPC website, such as "A C-code for the double folding interaction potential of two spherical nuclei", "A C-code for the double folding interaction potential for reactions involving deformed target nuclei", "Real and imaginary part of the heavy ion optical potential from a realistic nucleon-nucleon interaction" and "DFPOT: a program for the calculation of double folded potentials". However, I am still not sure if one of them will be proper for my application.

    Thank you!

    All the best,

    Liyuan

About Fortran

Sharing FORTRAN knowledge

Topic Followers (299) See all