Compiling Fortran

For developers writing C++, Fortran, Java, code who have questions or comments to make.

Moderators: silvia, selimgunay, Moderators

Post Reply
fabian.gerold
Posts: 15
Joined: Mon Aug 06, 2007 3:37 am
Location: Bauhaus University Weimar
Contact:

Compiling Fortran

Post by fabian.gerold »

Can anyone give me a hint how to compile the Fortran part of OpenSees?
I have the Intel Fortran Compiler installed, but the OpenSeesFortran.mak makefile does not run (started with "nmake OpenSeesFortran.mak").

Do I first have to create blas.lib, lapack.lib, arpack.lib, umfpack.lib?

I tried to compile arpack.lib (just added all files in ARPACK to a mscv project), but it gives me this error:
D:\OpenSees_MD\OTHER\ARPACK\sgetv0.f(367) : Error: If the actual argument is scalar, the corresponding dummy argument shall be scalar unless the actual argument is an element of an array that is not an assumed-shape or pointer array, or a substring of such an element. [SX]
The corresponding line is:
call svout (logfil, 1, rnorm0, ndigit, '_getv0: re-orthonalization ; rnorm0 is')
Do you have a documentation how to build the Fortran stuff, or do you have a Visual Studio project file for this?

Thank you very much.
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

building opensees using vc++ does no require that you build these libraries. are you using some other c++ compiler?

i have never had problems compiling any of these files with any fortran compiler. the problem is probably the mak file. you
can always create your own lib files from scratch using the files in the appropriate OpenSees/OTHER directories.
fabian.gerold
Posts: 15
Joined: Mon Aug 06, 2007 3:37 am
Location: Bauhaus University Weimar
Contact:

Post by fabian.gerold »

The Problem is, that I want to link against Qt libraries, which have Multithreaded-dll runtime format.
Can you tell me how to use the .mak file, or how to generate visual studio projects from that?
fabian.gerold
Posts: 15
Joined: Mon Aug 06, 2007 3:37 am
Location: Bauhaus University Weimar
Contact:

Post by fabian.gerold »

OpenSees obviously needs libIEPCF90.lib and libF90.lib.
Do you have Multithreaded-dll runtime versions of these libs? Or maybe the sources?

(otherwise it crashes when i link against my multithreaded-dll runtime format .lib files)

maybe i should switch to linux :-)
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

i don't. your only option is to comile the required fortran libraries yourself on your machine with the apppropriate settings, then you will not need these additional libraries.

ps. you can get 30 day trial versions of the intel compiler for free.
fabian.gerold
Posts: 15
Joined: Mon Aug 06, 2007 3:37 am
Location: Bauhaus University Weimar
Contact:

Post by fabian.gerold »

I have the Intel Fortran compiler installed and can build LAPACK.lib, ARPACK.lib, BLAS.lib, UmfPack.lib

Here is how I tried to compile:

The command for LAPACK.lib is:

Code: Select all

NMAKE /f "OpenSeesFortran.mak" CFG="LAPACK - Win32 Debug"
In the "OpenSeesFortran.mak", I added "/libs:dll" compiler switch to get DLL runtime.

I changed “fl32.exe” in the .mak to “ifort.exe”, probably fl32 was an older compiler version.

The problem is: I can't build the feap.lib

Code: Select all

feap\elmt06.f(2) : Error: This name does not have a type
Also the openSeesFortran.lib does not build, because there are no LIB32_OBJS=
defined in the .mak file.

Can you tell me what I'm doing wrong?

Thank you very much.
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

i am not quite sure all the funtions that are in the feap lib. there may be some material files, most files should be in
SRC/element/feap .. put this in a project & build it like the others.
fabian.gerold
Posts: 15
Joined: Mon Aug 06, 2007 3:37 am
Location: Bauhaus University Weimar
Contact:

Post by fabian.gerold »

ok, that works. There are errors in some fortran files, especially in arpack. If you delete these files, it compiles and runs fine.
Thank you very much for the help.
opensees33
Posts: 6
Joined: Tue Oct 23, 2007 1:30 am

Re: Compiling Fortran

Post by opensees33 »

fabian.gerold wrote:Can anyone give me a hint how to compile the Fortran part of OpenSees?
I have the Intel Fortran Compiler installed, but the OpenSeesFortran.mak makefile does not run (started with "nmake OpenSeesFortran.mak").

Do I first have to create blas.lib, lapack.lib, arpack.lib, umfpack.lib?

I tried to compile arpack.lib (just added all files in ARPACK to a mscv project), but it gives me this error:
D:\OpenSees_MD\OTHER\ARPACK\sgetv0.f(367) : Error: If the actual argument is scalar, the corresponding dummy argument shall be scalar unless the actual argument is an element of an array that is not an assumed-shape or pointer array, or a substring of such an element. [SX]
The corresponding line is:
call svout (logfil, 1, rnorm0, ndigit, '_getv0: re-orthonalization ; rnorm0 is')
Do you have a documentation how to build the Fortran stuff, or do you have a Visual Studio project file for this?

Thank you very much.
Hi Friend
I want to say that i have same problem that i do not know how the Fortran that is part of OpenSees will compile and also some source is missing from it .
I love opensees
edu1
Posts: 4
Joined: Tue Nov 27, 2007 12:59 am

Post by edu1 »

Hello

Many different compilers exist for the Fortran computer language. The two main flavors of Fortran are Fortran 77 and Fortran 90. Each of these has separate compilers and the user must decide which flavor and compiler to use.
I love opensees.berkeley.edu.
Post Reply