Search Results

Search found 231 results on 10 pages for 'fortran'.

Page 1/10 | 1 2 3 4 5 6 7 8 9 10  | Next Page >

  • Pass FORTRAN variable to Python [migrated]

    - by Matthew Bilskie
    I have a FORTRAN program that is called from a Python script (as an ArcGIS tool). I need to pass an array, Raster_Z(i,j), from FORTRAN to python. I have read about the Python subprocess module; however, I have not had much luck in understanding how to do this with FORTRAN. All examples I have found involve simple unix command line calls and not actual programs. Has anyone had any experience in passing a variable from FORTRAN to Python via a memory PIPE? Thank you for your time.

    Read the article

  • Why no fortran standard library ?

    - by Stefano Borini
    To be a language focused on mathematics and scientific computing, I am always baffled by the total lack of useful mathematical routines in the Fortran standard library. One would expect it to be shipped at least with a routine to compute standard deviation and mean, but this is not the case. In particular with the introduction of Fortran 90 and the addition of modules (thus reducing namespace pollution), I don't see any reason why of this critical lack of services. I would like to hear your knowledge about why this is the case.

    Read the article

  • passing a fortran int array to C++ by calling C++ function in fortran

    - by cppb
    hi, I am trying to call a C++ function in FORTRAN subroutine. This C+ function is supposed to update an integer array. Here is a non-working code I wrote. Can someone please let me know what the issue is: ! FORTRAN function that calls a C++ function subroutine my_function() integer(4) ar(*) integer(4) get_filled_ar ! Need correct syntax here. ar = get_filled_ar() end // C++ function: extern "C" { void get_filled_ar(int *ar){ ar[0] = 1; ar[1] = 10; ar[3] = 100; } }

    Read the article

  • Intel Fortran error #10001

    - by Ricardo
    I have a problem with the Intel Fortran compiler. It has been working fine in 8.04 and 10.04 LTS (well, some changes required during the installation due to the fact that 10.04 uses dash and not bash as the shell /bin/sh) Now I have upgraded to 12.04 and when compiling I get the following message: ifort: error #10001: could not find directory in which g++ resides Is there anybody that knows how to solve this problem?

    Read the article

  • Fortran: output format dependent on a variable

    - by Flux Capacitor
    I would like to have a FORTRAN write statement formatted to depend on some variable. For example, I could write: write(*,'(3f15.3,3f9.2)') x,y,z,(var(i),i=1,nvari) where nvari = 3 But, what if, in some cases, I actually have 4 variables (i.e. nvari = 4) I would like to write something like this: write(*,'(3f15.3,nvari(f9.2))') x,y,z,(var(i),i=1,nvari) Now, nvari can be anything and the output will work as I like. How can I make something like this work?

    Read the article

  • Using MATLAB's plotting features as an interactive part of a Fortran program

    - by ldigas
    Although many of you will have a decent idea of what I'm aiming at, just from reading the title -- allow me a simple introduction still. I have a Fortran program - it consists of a program, some internal subroutines, 7 modules with its own procedures, and ... uhmm, that's it. Without going into much detail, for I don't think it's necessary at this point, what would be the easiest way to use MATLAB's plotting features (mainly plot(x,y) with some customizations) as an interactive part of my program ? For now I'm using some of my own custom plotting routines (based on HPGL and Calcomp's routines), but just as part of an exercise on my part, I'd like to see where this could go and how would it work (is it even possible what I'm suggesting?). Also, how much effort would it take on my part ? I know this subject has been rather extensively described in many "tutorials" on the net, but for some reason I have trouble finding the really simple yet illustrative introductory ones. So if anyone can post an example or two, simple ones, I'd be really grateful. Or just take me by the hand and guide me through one working example. platform: IVF 11.something :) on Win XP SP2, Matlab 2008b

    Read the article

  • Calling COM from Intel Fortran?

    - by user57460
    I'm trying to get COM working from my Fortran application. I do a "COMINITIALIZE" followed by a "COMCreateObjectByProgID". Both of these appear to be successful and return a status of zero. However, when I try to use the COM object, I get "Unhandled exception at 0x00000000 in FortranProg01.exe: 0xC0000005: Access violation." I realize that this error can mean almost anything, but has anyone got some suggestions of common problems with COM that produce this problem? Here are some more details. My program code: program FortranProg01 use myolepg implicit none integer*4 comInitStatus integer:: comCreateStatus INTEGER(INT_PTR_KIND()) $OBJECT INTEGER(4) funcResult REAL(8) pkgVersion call COMINITIALIZE(comInitStatus) print *, comInitStatus call COMCreateObjectByProgID('MyOlePg.MyOlePkg', $OBJECT, comCreateStatus) print *, comCreateStatus funcResult = IMyOlePkg_GetPackageVersion($OBJECT, pkgVersion) print *, funcResult call COMUNINITIALIZE() end program FortranProg01 The wizard-generated interface code: INTERFACE !property PackageVersion INTEGER(4) FUNCTION IMyOlePkg_GetPackageVersion($OBJECT, pVal) INTEGER(INT_PTR_KIND()), INTENT(IN) :: $OBJECT ! Object Pointer !DEC$ ATTRIBUTES VALUE :: $OBJECT REAL(8), INTENT(OUT) :: pVal !DEC$ ATTRIBUTES REFERENCE :: pVal !DEC$ ATTRIBUTES STDCALL :: IMyOlePkg_GetPackageVersion END FUNCTION IMyOlePkg_GetPackageVersion END INTERFACE Any help would be much appreciated! Thanks! Brad.

    Read the article

  • Creating Python C module from Fortran sources on Ubuntu 10.04 LTS

    - by Botondus
    In a project I work on we use a Python C module compiled from Fortran with f2py. I've had no issues building it on Windows 7 32bit (using mingw32) and on the servers it's built on 32bit Linux. But I've recently installed Ubuntu 10.04 LTS 64bit on my laptop that I use for development, and when I build it I get a lot of warnings (even though I've apparently installed all gcc/fortran libraries/compilers), but it does finish the build. However when I try to use the built module in the application, most of it seems to run well but then it crashes with an error: * glibc detected /home/botondus/Envs/gasit/bin/python: free(): invalid next size (fast): 0x0000000006a44760 ** Warnings on running *f2py -c -m module_name ./fortran/source.f90* customize UnixCCompiler customize UnixCCompiler using build_ext customize GnuFCompiler Could not locate executable g77 Found executable /usr/bin/f77 gnu: no Fortran 90 compiler found gnu: no Fortran 90 compiler found customize IntelFCompiler Could not locate executable ifort Could not locate executable ifc customize LaheyFCompiler Could not locate executable lf95 customize PGroupFCompiler Could not locate executable pgf90 Could not locate executable pgf77 customize AbsoftFCompiler Could not locate executable f90 absoft: no Fortran 90 compiler found absoft: no Fortran 90 compiler found absoft: no Fortran 90 compiler found absoft: no Fortran 90 compiler found absoft: no Fortran 90 compiler found absoft: no Fortran 90 compiler found customize NAGFCompiler Found executable /usr/bin/f95 customize VastFCompiler customize GnuFCompiler gnu: no Fortran 90 compiler found gnu: no Fortran 90 compiler found customize CompaqFCompiler Could not locate executable fort customize IntelItaniumFCompiler Could not locate executable efort Could not locate executable efc customize IntelEM64TFCompiler customize Gnu95FCompiler Found executable /usr/bin/gfortran customize Gnu95FCompiler customize Gnu95FCompiler using build_ext I have tried building a 32bit version by installing the gfortran multilib packages and running f2py with -m32 option (but with no success): f2py -c -m module_name ./fortran/source.f90 --f77flags="-m32" --f90flags="-m32" Any suggestions on what I could try to either build 32bit version or correctly build the 64bit version? Edit: It looks like it crashes right at the end of a subroutine. The 'write' executes fine... which is strange. write(6,*)'Eh=',Eh end subroutine calcolo_involucro The full backtrace is very long and I'm not sure if it's any help, but here it is: *** glibc detected *** /home/botondus/Envs/gasit/bin/python: free(): invalid next size (fast): 0x0000000007884690 *** ======= Backtrace: ========= /lib/libc.so.6(+0x775b6)[0x7fe24f8f05b6] /lib/libc.so.6(cfree+0x73)[0x7fe24f8f6e53] /usr/local/lib/python2.6/dist-packages/numpy/core/multiarray.so(+0x4183c)[0x7fe24a18183c] /home/botondus/Envs/gasit/bin/python[0x46a50d] /usr/local/lib/python2.6/dist-packages/numpy/core/multiarray.so(+0x4fbd8)[0x7fe24a18fbd8] /usr/local/lib/python2.6/dist-packages/numpy/core/multiarray.so(+0x5aded)[0x7fe24a19aded] /home/botondus/Envs/gasit/bin/python(PyEval_EvalFrameEx+0x516e)[0x4a7c5e] /home/botondus/Envs/gasit/bin/python(PyEval_EvalFrameEx+0x5a60)[0x4a8550] /home/botondus/Envs/gasit/bin/python(PyEval_EvalCodeEx+0x911)[0x4a9671] /home/botondus/Envs/gasit/bin/python[0x537620] /home/botondus/Envs/gasit/bin/python(PyObject_Call+0x47)[0x41f0c7] /home/botondus/Envs/gasit/bin/python[0x427dff] /home/botondus/Envs/gasit/bin/python(PyObject_Call+0x47)[0x41f0c7] /home/botondus/Envs/gasit/bin/python[0x477bff] /home/botondus/Envs/gasit/bin/python[0x46f47f] /home/botondus/Envs/gasit/bin/python(PyObject_Call+0x47)[0x41f0c7] /home/botondus/Envs/gasit/bin/python(PyEval_EvalFrameEx+0x4888)[0x4a7378] /home/botondus/Envs/gasit/bin/python(PyEval_EvalCodeEx+0x911)[0x4a9671] /home/botondus/Envs/gasit/bin/python(PyEval_EvalFrameEx+0x4d19)[0x4a7809] /home/botondus/Envs/gasit/bin/python(PyEval_EvalCodeEx+0x911)[0x4a9671] /home/botondus/Envs/gasit/bin/python(PyEval_EvalFrameEx+0x4d19)[0x4a7809] /home/botondus/Envs/gasit/bin/python(PyEval_EvalCodeEx+0x911)[0x4a9671] /home/botondus/Envs/gasit/bin/python[0x537620] /home/botondus/Envs/gasit/bin/python(PyObject_Call+0x47)[0x41f0c7] /home/botondus/Envs/gasit/bin/python(PyEval_CallObjectWithKeywords+0x43)[0x4a1b03] /usr/local/lib/python2.6/dist-packages/numpy/core/multiarray.so(+0x2ee94)[0x7fe24a16ee94] /home/botondus/Envs/gasit/bin/python(_PyObject_Str+0x61)[0x454a81] /home/botondus/Envs/gasit/bin/python(PyObject_Str+0xa)[0x454b3a] /home/botondus/Envs/gasit/bin/python[0x461ad3] /home/botondus/Envs/gasit/bin/python[0x46f3b3] /home/botondus/Envs/gasit/bin/python(PyObject_Call+0x47)[0x41f0c7] /home/botondus/Envs/gasit/bin/python(PyEval_EvalFrameEx+0x4888)[0x4a7378] /home/botondus/Envs/gasit/bin/python(PyEval_EvalCodeEx+0x911)[0x4a9671] /home/botondus/Envs/gasit/bin/python(PyEval_EvalFrameEx+0x4d19)[0x4a7809] /home/botondus/Envs/gasit/bin/python(PyEval_EvalFrameEx+0x5a60)[0x4a8550] ======= Memory map: ======== 00400000-0061c000 r-xp 00000000 08:05 399145 /home/botondus/Envs/gasit/bin/python 0081b000-0081c000 r--p 0021b000 08:05 399145 /home/botondus/Envs/gasit/bin/python 0081c000-0087e000 rw-p 0021c000 08:05 399145 /home/botondus/Envs/gasit/bin/python 0087e000-0088d000 rw-p 00000000 00:00 0 01877000-07a83000 rw-p 00000000 00:00 0 [heap] 7fe240000000-7fe240021000 rw-p 00000000 00:00 0 7fe240021000-7fe244000000 ---p 00000000 00:00 0 7fe247631000-7fe2476b1000 r-xp 00000000 08:03 140646 /usr/lib/libfreetype.so.6.3.22 7fe2476b1000-7fe2478b1000 ---p 00080000 08:03 140646 /usr/lib/libfreetype.so.6.3.22 7fe2478b1000-7fe2478b6000 r--p 00080000 08:03 140646 /usr/lib/libfreetype.so.6.3.22 7fe2478b6000-7fe2478b7000 rw-p 00085000 08:03 140646 /usr/lib/libfreetype.so.6.3.22 7fe2478b7000-7fe2478bb000 r-xp 00000000 08:03 263882 /usr/lib/python2.6/dist-packages/PIL/_imagingft.so 7fe2478bb000-7fe247aba000 ---p 00004000 08:03 263882 /usr/lib/python2.6/dist-packages/PIL/_imagingft.so 7fe247aba000-7fe247abb000 r--p 00003000 08:03 263882 /usr/lib/python2.6/dist-packages/PIL/_imagingft.so 7fe247abb000-7fe247abc000 rw-p 00004000 08:03 263882 /usr/lib/python2.6/dist-packages/PIL/_imagingft.so 7fe247abc000-7fe247abf000 r-xp 00000000 08:03 266773 /usr/lib/python2.6/lib-dynload/_bytesio.so 7fe247abf000-7fe247cbf000 ---p 00003000 08:03 266773 /usr/lib/python2.6/lib-dynload/_bytesio.so 7fe247cbf000-7fe247cc0000 r--p 00003000 08:03 266773 /usr/lib/python2.6/lib-dynload/_bytesio.so 7fe247cc0000-7fe247cc1000 rw-p 00004000 08:03 266773 /usr/lib/python2.6/lib-dynload/_bytesio.so 7fe247cc1000-7fe247cc5000 r-xp 00000000 08:03 266786 /usr/lib/python2.6/lib-dynload/_fileio.so 7fe247cc5000-7fe247ec4000 ---p 00004000 08:03 266786 /usr/lib/python2.6/lib-dynload/_fileio.so 7fe247ec4000-7fe247ec5000 r--p 00003000 08:03 266786 /usr/lib/python2.6/lib-dynload/_fileio.so 7fe247ec5000-7fe247ec6000 rw-p 00004000 08:03 266786 /usr/lib/python2.6/lib-dynload/_fileio.so 7fe247ec6000-7fe24800c000 r-xp 00000000 08:03 141358 /usr/lib/libxml2.so.2.7.6 7fe24800c000-7fe24820b000 ---p 00146000 08:03 141358 /usr/lib/libxml2.so.2.7.6 7fe24820b000-7fe248213000 r--p 00145000 08:03 141358 /usr/lib/libxml2.so.2.7.6 7fe248213000-7fe248215000 rw-p 0014d000 08:03 141358 /usr/lib/libxml2.so.2.7.6 7fe248215000-7fe248216000 rw-p 00000000 00:00 0 7fe248216000-7fe248229000 r-xp 00000000 08:03 140632 /usr/lib/libexslt.so.0.8.15 7fe248229000-7fe248428000 ---p 00013000 08:03 140632 /usr/lib/libexslt.so.0.8.15 7fe248428000-7fe248429000 r--p 00012000 08:03 140632 /usr/lib/libexslt.so.0.8.15 7fe248429000-7fe24842a000 rw-p 00013000 08:03 140632 /usr/lib/libexslt.so.0.8.15 7fe24842a000-7fe248464000 r-xp 00000000 08:03 141360 /usr/lib/libxslt.so.1.1.26 7fe248464000-7fe248663000 ---p 0003a000 08:03 141360 /usr/lib/libxslt.so.1.1.26 7fe248663000-7fe248664000 r--p 00039000 08:03 141360 /usr/lib/libxslt.so.1.1.26 7fe248664000-7fe248665000 rw-p 0003a000 08:03 141360 /usr/lib/libxslt.so.1.1.26 7fe248665000-7fe24876e000 r-xp 00000000 08:03 534240 /usr/local/lib/python2.6/dist-packages/lxml/etree.so 7fe24876e000-7fe24896d000 ---p 00109000 08:03 534240 /usr/local/lib/python2.6/dist-packages/lxml/etree.so 7fe24896d000-7fe24896e000 r--p 00108000 08:03 534240 /usr/local/lib/python2.6/dist-packages/lxml/etree.so 7fe24896e000-7fe248999000 rw-p 00109000 08:03 534240 /usr/local/lib/python2.6/dist-packages/lxml/etree.so 7fe248999000-7fe2489a7000 rw-p 00000000 00:00 0 7fe2489a7000-7fe2489bd000 r-xp 00000000 08:03 132934 /lib/libgcc_s.so.1

    Read the article

  • Converting Fortran 77 code to C#

    - by user643192
    I'm trying to convert a Fortan77 program to C#. I have a subroutine with about 650 lines of code and horrific GOTO statements all over the place. I'm having a lot of trouble even starting to visualise the flow of the subroutine to figure out what it does. Is there anybody with experience in this sort of thing who could give me any advice on how to get an overview of this subroutine? Are there some tools available to speed up or facilitate this type of conversion?

    Read the article

  • How can a large, Fortran-based number crunching codebase be modernized?

    - by Dave Mateer
    A friend in academia asked me for advice (I'm a C# business application developer). He has a legacy codebase which he wrote in Fortran in the medical imaging field. It does a huge amount of number crunching using vectors. He uses a cluster (30ish cores) and has now gone towards a single workstation with 500ish GPUS in it. However where to go next with the codebase so: Other people can maintain it over next 10 year cycle Get faster at tweaking the software Can run on different infrastructures without recompiles After some research from me (this is a super interesting area) some options are: Use Python and CUDA from Nvidia Rewrite in a functional language. For example, F# or Haskell Go cloud based and use something like Hadoop and Java Learn C What has been your experience with this? What should my friend be looking at to modernize his codebase? UPDATE: Thanks @Mark and everyone who has answered. The reasons my friend is asking this question is that it's a perfect time in the projects lifecycle to do a review. Bringing research assistants up to speed in Fortran takes time (I like C#, and especially the tooling and can't imagine going back to older languages!!) I liked the suggestion of keeping the pure number crunching in Fortran, but wrapping it in something newer. Perhaps Python as that seems to be getting a stronghold in academia as a general-purpose programming language that is fairly easy to pick up. See Medical Imaging and a guy who has written a Fortran wrapper for CUDA, Can I legally publish my Fortran 90 wrappers to Nvidias' CUFFT library (from the CUDA SDK)?.

    Read the article

  • Good FORTRAN books/tutorials for beginners?

    - by AndrejaKo
    This may be a duplicate of http://stackoverflow.com/questions/31672/learning-fortran-in-the-modern-era, but that thread went on discussing legacy code concerns. Anyway, few months ago in a bookstore sale I picked up book called FORTRAN 66 for PDP-11. I found it interesting and decided it would be nice to learn FORTRAN. So I'm looking for some modern books/tutorials dealing with new versions of FORTRAN.

    Read the article

  • MPI_SCATTER Fortran Matrices by Rows

    - by Fortran
    What is the best way to scatter a Fortran 90 matrix by its rows rather than columns? That is, let's say I have a matrix a(4,50) and I want to MPI_SCATTER it onto two processes where each part is alocal(2,50), where rank 0 has rows 1 and 2, and rank 1 has 3 and 4. Now, in C, this is simple since arrays are row-major, but in Fortran 90 they are column-major. I'm trying to avoid using TRANSPOSE to flip a before scattering (i.e, doubling the memory use), and I figure there must be a way in MPI to do this. Would it be MPI_TYPE_VECTOR? MPI_TYPE_CREATE_SUBARRAY? Likewise, what if I have a 3d array b(4,50,3) and I want two scattered matrices of blocal(2,50,3) distributed as above?

    Read the article

  • Mix Enviroment Debugging ( C# Fortran) in VS 2008

    - by Ngu Soon Hui
    I have two visual studio projects, one written in C#, another written in fortran unmanaged code ( Intel Fortran compiler). Both of them are attached to one solution. The C# is the frontend winform, whereas the fortran project is the backend. Is there any tutorials that teach on how to step into code direct from C#?

    Read the article

  • Automatic translation from fortran 90 to f77

    - by osgx
    Hello Is there an converter from fortran 90 downto fortran 77 ? I have a fortran77 only compiler and want to run NAS Parallel Benchmark (NPB for short) on it. But NPB uses some features of F90, like do enddo, smth else. All features are rather simple. Is there A way to translate NPB to F77 strict language? Tags: fortran parallel convert programming-languages

    Read the article

  • Writing fortran robust and "modern" code

    - by Blklight
    In some scientific environments, you often cannot go without FORTRAN as most of the developers only know that idiom, and there is lot of legacy code and related experience. And frankly, there are not many other cross-platform options for high performance programming ( C++ would do the task, but the syntax, zero-starting arrays, and pointers are too much for most engineers ;-) ). I'm a C++ guy but I'm stuck with some F90 projects. So, let's assume a new project must use FORTRAN (F90), but I want to build the most modern software architecture out of it. while being compatible with most "recent" compilers (intel ifort, but also including sun/HP/IBM own compilers) So I'm thinking of imposing: global variable forbidden, no gotos, no jump labels, "implicit none", etc. "object-oriented programming" (modules with datatypes + related subroutines) modular/reusable functions, well documented, reusable libraries assertions/preconditions/invariants (implemented using preprocessor statements) unit tests for all (most) subroutines and "objects" an intense "debug mode" (#ifdef DEBUG) with more checks and all possible Intel compiler checks possible (array bounds, subroutine interfaces, etc.) uniform and enforced legible coding style, using code processing tools C stubs/wrappers for libpthread, libDL (and eventually GPU kernels, etc.) C/C++ implementation of utility functions (strings, file operations, sockets, memory alloc/dealloc reference counting for debug mode, etc.) ( This may all seem "evident" modern programming assumptions, but in a legacy fortran world, most of these are big changes in the typical programmer workflow ) The goal with all that is to have trustworthy, maintainable and modular code. Whereas, in typical fortran, modularity is often not a primary goal, and code is trustworthy only if the original developer was very clever, and the code was not changed since then ! (i'm a bit joking here, but not much) I searched around for references about object-oriented fortran, programming-by-contract (assertions/preconditions/etc.), and found only ugly and outdated documents, syntaxes and papers done by people with no large-scale project involvement, and dead projects. Any good URL, advice, reference paper/books on the subject?

    Read the article

  • Using Fortran to call C++ Functions

    - by Dane Larsen
    I'm trying to get some FORTRAN code to call a couple c++ functions that I wrote (c_tabs_ being one of them). Linking and everything works just fine, as long as I'm calling functions that don't belong to a class. My problem is that the functions I want the FORTRAN code to call belong to a class. I looked at the symbol table using nm and the function name is something ugly like this: 00000000 T _ZN9Interface7c_tabs_Ev FORTRAN won't allow me to call a function by that name, because of the underscore at the beginning, so I'm at a loss. The symbol for c_tabs when it's not in a class is quite simple, and FORTRAN has no problems with it: 00000030 T c_tabs_ Any suggestions? Thanks in advance.

    Read the article

  • How can I explain object-oriented programming to someone who's only coded in Fortran 77? [closed]

    - by Zonedabone
    Possible Duplicate: How can I explain object-oriented programming to someone who’s only coded in Fortran 77? My mother did her college thesis in Fortran, and now (over a decade later) needs to learn c++ for fluids simulations. She is able to understand all of the procedural programming, but no matter how hard I try to explain objects to her, it doesn't stick. (I do a lot of work with Java, so I know how objects work) I think I might be explaining it in too high-level ways, so it isn't really making sense to someone who's never worked with them at all and grew up in the age of purely functional programming. Is there any simple way I can explain them to her that will help her understand? Thanks for the help in advance.

    Read the article

  • MinGW/G++/g95 link problem - libf95 undefined reference to `MAIN_'

    - by pivakaka
    Hi folks, Summing up, my problem consists on compiling g95 objects inside a C++ application. Actually, I'm constructing an interface for an old fortran program. For this task, I'm using the wxWidgets GUI library, and calling fortran subroutines when necessary. At the beginning, I was developing the entire project compiling my fortran files with gfortran (which comes with GCC) and linking them with my app by the g++ -o... command. Everything was working fine but some numbers values calculated by my fotran subroutines returned NAN values. Doing some research, I realized that compiling my fortran files with gfortran with the -m32 flag, generates this NAN values problem. Although compiling with -m64 flag, my code works properly well. The only trouble here is that my App should be 32bits and then I tryed another compiller. Here I found g95 Fortran compiler, which compiles my fortran code and gives the right output on a 32bits environment. But when I'm trying to link these g95 objects into my program I see this following error: g++ -oCyclonTechTower.exe src\fortran\Modulo_Global.o src\fortran\Prop_Fisicas.o src\fortran\inversa.o src\fortran\tower.o src\fortran\PredadeCarga.o src\fortran\gota.o src\fortran\tadi.o src\view\SimulationORSATCustomDialog.o src\view\SimulationChildGUIFrame.o src\view\ParentGUIFrame.o src\view\ClientGUIFrame.o src\model\TowerData.o src\controller\SimulationController.o src\THEIACyclonTechTower.o ..\Resource\resource.o -Lc:\wxWidgets-2.6.4\lib -Lc:\MinGW\lib\gcc-lib\i686-pc-mingw32\4.1.2 -Bdynamic -Wl,--subsystem,windows -mwindows c:\wxWidgets-2.6.4\lib\libwx_mswu-2.6.a -lwxregexu-2.6 -lwxexpat-2.6 -lwxtiff-2.6 -lwxjpeg-2.6 -lwxpng-2.6 -lwxzlib-2.6 -lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32 -lgcc -lf95 c:\MinGW\lib\gcc-lib\i686-pc-mingw32\4.1.2/libf95.a(main.o):(.text+0x32): undefined reference to `MAIN_' collect2: ld returned 1 exit status Build error occurred, build is stopped Time consumed: 1531 ms. I have already read the g95 Manual for integration with C++ and I'm actually calling these functions bellow for controlling the fortran environment: void g95_runtime_start(int argc, char *argv[]); void g95_runtime_stop(); I also included the g95 Fortran Runtime Library libf95.a and the libgcc.a into my linker command. Finishing, I don't have a main method implemented because this is managed by wxWidgets, and my fortran subroutines can not have a main function because this is a C++ program calling fortran functions. Can some of you guys help me with this problem? How can I fix this undefined reference to MAIN__ problem? Any idea will be much appreciated. Thanks in advance, George

    Read the article

  • Suggestions for interesting Fortran adventure?

    - by Gnatz
    I've been listening to some pod-casts lately that have sparked my interest in revisiting a low level procedural programming language like Fortran. However, after downloading a compiler and doing basic language exploration I've been unable to think of a fun interesting application to compose. Does anybody have or know of a resource that I could tap into for some fun and interesting programming scenarios for a low level language like Fortran?

    Read the article

  • How can I explain object-oriented programming to someone who's only coded in Fortran 77?

    - by Zonedabone
    My mother did her college thesis in Fortran, and now (over a decade later) needs to learn c++ for fluids simulations. She is able to understand all of the procedural programming, but no matter how hard I try to explain objects to her, it doesn't stick. (I do a lot of work with Java, so I know how objects work) I think I might be explaining it in too high-level ways, so it isn't really making sense to someone who's never worked with them at all and grew up in the age of purely procedural programming. Is there any simple way I can explain them to her that will help her understand?

    Read the article

  • How To: Referencing LAPACK library from FORTRAN 95 in Cygwin

    - by cholmgreen
    I have a FORTRAN 95 program that needs to make some calls to the LAPACK library. I recently found out that Cygwin because it can install LAPACK as an extra option. Well, LAPACK exists in the /lib/lapack/ directory as "cyglapack.dll". Having only a very informal training in Fortran programming, I have no idea how to reference a .dll library as opposed to a .mod module. Any suggestions or directions to articles answering my question are GREATLY appreciated! (P.S. I did search first.. I don't think I know the proper terms to get a useful article.)

    Read the article

  • Fortran intent(inout) v's no intent

    - by Andrew Walker
    Good practice dictates that subroutine arguments in Fortran should each have a specified intent (i.e. intent(in), intent(out) or intent(inout) as described this question): subroutine bar (a, b) real, intent(in) :: a real, intent(inout) :: b b = b + a ... However, not specifying an intent is valid Fortran: subroutine bar (a, b) real, intent(in) :: a real :: b b = b + a ... Are there any real differences beyond compile time checking for an argument specified as intent(inout) and an argument without a specified intent? Is there anything I should worry about if I'm retrofitting intents to older, intent free, code?

    Read the article

  • FORTRAN function returning an array causes a segfault (calling from C++)

    - by Dane Larsen
    Basically, here's my problem. I'm calling someone else's FORTRAN functions from my C++ code, and it's giving me headaches. Some code: function c_error_message() character(len = 255) :: c_error_message errmsg(1:9) = 'ERROR MSG' return end That's the FORTRAN function. My first question is: Is there anything in there that would cause a segfault? If not, then second: What does that return? A pointer? I'm trying to call it with the following C statement: char *e = c_error_message_(); That causes a segfault. c_error_message(); That too causes a segfault. I declared c_error_message_() earlier on with the following code: extern"C" { char* c_error_message_(); } Would declaring a function with a different return type than the actual return type cause a segfault? I'm at a loss. Thanks for any replies.

    Read the article

  • accing a fortran 'module' in a 'function defined in some other file

    - by cppb
    hello, I am using fortran 90 I have defined a fortran module in fileA.f as: module getArr double precision a(100) end module getArr The same fileA.f contains a subroutine that uses this module subroutine my_sub use getArr implicit none getArr%a(1) = 10.5 end subroutine In fileB.f, I have a fortrtan function. I am trying to access the value of getArr%a(1) as: double precision function my_func(R) use getArr double precision x x = getArr%a(1) return end But I am getting errors at the compile time. It says it is unable to access the module getArr. How should I declare it?? Thanks

    Read the article

1 2 3 4 5 6 7 8 9 10  | Next Page >