Find the answer to your Linux question:
Results 1 to 2 of 2
Dear all, I am interested in using fortran and an external library called matio used to save arrays to matlab .mat files. I have installed the matio and matio-dev packages ...
  1. #1
    Just Joined!
    Join Date
    Sep 2007
    Posts
    33

    load fortran module for matio libraries using gfortran

    Dear all,

    I am interested in using fortran and an external library called matio used to save arrays to matlab .mat files.

    I have installed the matio and matio-dev packages from synaptics but i cannot compile a code receiving an error

    Code:
    christos@christos-laptop:~/Desktop$ gfortran -o test test.f90 -lmatio -lz
    test.f90:2.13:
    
        USE MATIO
                 1
    Fatal Error: Can't open module file 'matio.mod' for reading at (1): No such file or directory
    How can i load a module in order to use it in fortran through the GCC compiler?

    Many thanks in advance

  2. #2
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
    Posts
    1,117
    Hi.

    If you have compiled the library, then try removing the use matio statement. That is used somewhat like the old include statement (one compiles a file having a module x statement, producing x.mod, which the compiler then includes in source code with use x).

    It looks like you are already using the matio library with -lmatio

    I don't think it is intended that you do both the use matio and -lmatio, but I am not familar with matio specifically.

    Good luck ... cheers, drl
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...