WICHTIG: Der Betrieb von goMatlab.de wird privat finanziert fortgesetzt. - Mehr Infos...

Mein MATLAB Forum - goMatlab.de

Mein MATLAB Forum

 
Gast > Registrieren       Autologin?   

Partner:




Forum
      Option
[Erweitert]
  • Diese Seite per Mail weiterempfehlen
     


Gehe zu:  
Neues Thema eröffnen Neue Antwort erstellen

fortran in matlab (dpgi/pgf90 to ifort)

 

dynamo

Gast


Beiträge: ---
Anmeldedatum: ---
Wohnort: ---
Version: ---
     Beitrag Verfasst am: 17.11.2008, 18:41     Titel: fortran in matlab (dpgi/pgf90 to ifort)
  Antworten mit Zitat      
Hi to everyone,

i try to implement fortran code from ansys to read binary files. I gladly wrote first programms with fortran code and mex-functions. Now, I try to implement some functions from ansys. The compiling words so far, but not the linking.

console output:
Code:

  ======================== Compile ResRd.F
ResRd.F(1525): (col. 13) remark: PARTIAL LOOP WAS VECTORIZED.
ResRd.F(1010): (col. 10) remark: LOOP WAS VECTORIZED.
ResRd.F(796): (col. 13) remark: LOOP WAS VECTORIZED.
/usr/local/intel/ifort/bin/ifort -c -mp -O2 -DPGI_COMPILER -DLINUXIA64_SYS -DFORTRAN -I/linux/software/ansys_inc/v110/ansys/customize/include ResRd.F
  ======================== Compile ResRdDemo.F
/usr/local/intel/ifort/bin/ifort -c -w -w90 -fpp -vms -KPIC -O2 -DLINUXIA64_SYS -DFORTRAN -DNOSPACEBALL -DNOSTDCALL -DARGTRAIL -I/linux/software/matlab/extern/include -I/linux/software/matlab/simulink/include -I/linux/software/ansys_inc/v110/ansys/customize/include ResRdDemo.F
  ======================== Link ResRdDemo.o and ResRd.o to ResRdDemo.e110
/linux/software/ansys_inc/v110/ansys/customize/misc/linem64t/binlib.a(bintst.o): In function `MAIN__':
bintst.F:(.text+0x2c): undefined reference to `__kmpc_begin'
bintst.F:(.text+0x3a): undefined reference to `__kmpc_global_thread_num'
bintst.F:(.text+0x256): undefined reference to `__kmpc_end'
 

I think, one problem is, that ansys expects dpgi compiler, that i know, is recommanded for the opteron processor, I work with. But there is no dpgi compiler. so I try to compile this things with ifort. So on intel32 systems, the commands to compile and link look like this from a ansys script:
Code:

      MACH="Intel IA-32 Linux"
      binlib="binlib.a"
      fcompile="ifort -c -w -w90 -fpp -vms -KPIC -O2 \
               -DLINUXIA32_SYS -DFORTRAN -DNOSPACEBALL -DNOSTDCALL -DARGTRAIL"
      flink="ifort -static -Wl,-relax -Vaxlib -o "
      blinkopns=""
 

and for opteron processors it is:
Code:

      MACH="AMD Opteron 64-bit Linux"
      binlib="binlib.a"
      fcompile="pgf90 -c -mp -O2 -Mlarge_arrays -fpic -tp k8-64 -Mrecursive \
                -DPGI_COMPILER -DLINUXIA64_SYS -DFORTRAN"
      flink="pgf90 -Bstatic -o"
      blinkopns=""
 

my implementation looks like this:
Code:

#include <fintrf.h>
        SUBROUTINE MEXFUNCTION(NLHS, PLHS, NRHS, PRHS)

#include "impcom.inc"
        INTEGER*8, dimension(*) :: PLHS, PRHS
        INTEGER*4 :: NLHS, NRHS


      external  ResRdBegin, ResRdGeomBegin, ResRdGeomEnd,
     x          ResRdTypeBegin, ResRd blabla
....
        end
 

As you can see above, I tried as long, until I got as few errors, as shown above. (for that, I used the linem64t/binlib.a, that is recommended for ifort from ansys)(I can compile the fortran programms without matlab with ifort) So, can you give me any hint? Do you think, installing the dpgi compiler / pgf90 will solve my problems? Or could you give me some advise for adjusting the compile commands?
(auch auf deutsch antworten kein problem)


Neues Thema eröffnen Neue Antwort erstellen



Einstellungen und Berechtigungen
Beiträge der letzten Zeit anzeigen:

Du kannst Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum antworten.
Du kannst deine Beiträge in diesem Forum nicht bearbeiten.
Du kannst deine Beiträge in diesem Forum nicht löschen.
Du kannst an Umfragen in diesem Forum nicht mitmachen.
Du kannst Dateien in diesem Forum posten
Du kannst Dateien in diesem Forum herunterladen
.





 Impressum  | Nutzungsbedingungen  | Datenschutz | FAQ | goMatlab RSS Button RSS

Hosted by:


Copyright © 2007 - 2024 goMatlab.de | Dies ist keine offizielle Website der Firma The Mathworks

MATLAB, Simulink, Stateflow, Handle Graphics, Real-Time Workshop, SimBiology, SimHydraulics, SimEvents, and xPC TargetBox are registered trademarks and The MathWorks, the L-shaped membrane logo, and Embedded MATLAB are trademarks of The MathWorks, Inc.