Compiling OpenSees

This forum is for issues related to parallel processing
and OpenSees using the new interpreters OpenSeesSP and OpenSeesMP

Moderator: selimgunay

Post Reply
brag006
Posts: 173
Joined: Wed Feb 15, 2012 1:26 pm
Location: University of Auckland

Compiling OpenSees

Post by brag006 »

When compiling opensees on linux, do we need to make any changes to the makefiles within the SRC directory? Or should just make changes to Makefile.def in the main dir. I am having trouble compiling opensees but not sure where and what changes to make to get it to compile.
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: Compiling OpenSees

Post by fmk »

no. you should just need to provide a corrrect Makefile.def. start using one with EC2 in the name in the MAKES directory. these work for the latest builds of OpenSees.
brag006
Posts: 173
Joined: Wed Feb 15, 2012 1:26 pm
Location: University of Auckland

Re: Compiling OpenSees

Post by brag006 »

Thanks.

I managed to get OpenSeesMP working using one of the Makefiles you recommended. But without Mumps. I am still having trouble compiling it with Mumps. Mumps is succesfully installed on our cluster and I think I have all the correct libraries but I get the following error:

/gpfs1m/projects/uoa00174/opensees/verMumps/OpenSees/SRC/system_of_eqn/linearSOE/mumps/MumpsSolver.o: In function `MumpsSolver::solve()':
MumpsSolver.cpp:(.text+0x1af): undefined reference to `dmumps_c'
MumpsSolver.cpp:(.text+0x2ff): undefined reference to `dmumps_c'
/gpfs1m/projects/uoa00174/opensees/verMumps/OpenSees/SRC/system_of_eqn/linearSOE/mumps/MumpsSolver.o: In function `MumpsSolver::setSize()':
MumpsSolver.cpp:(.text+0x5bb): undefined reference to `dmumps_c'
MumpsSolver.cpp:(.text+0x6ad): undefined reference to `dmumps_c'
/gpfs1m/projects/uoa00174/opensees/verMumps/OpenSees/SRC/system_of_eqn/linearSOE/mumps/MumpsSolver.o: In function `MumpsSolver::~MumpsSolver()':
MumpsSolver.cpp:(.text+0x79d): undefined reference to `dmumps_c'
/gpfs1m/projects/uoa00174/opensees/verMumps/OpenSees/SRC/system_of_eqn/linearSOE/mumps/MumpsSolver.o:MumpsSolver.cpp:(.text+0x7ed): more undefined references to `dmumps_c' follow

=========================================================================================
It is a linker error but I am not sure what the problem is. I think I have all the right libraries and includes and I checked that dmumps_c.h is in the include folder.
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: Compiling OpenSees

Post by fmk »

it's not finding the symbols in the Mumps library. i am sure you are providing the library to the linker so the problem could be the compiler options used to build Mumps .. mixing C and Fortran can be tricky in that the names generated for the procedures are by default dealt differently. try copying the mums lib to something else, opening it up and searching for the dmumps_c expression, you might find there are underscores before or after it. If the Mumps is working with the examples, the simplest thing to be might change the procedure call in the MumpsSolver to be what it is in the Mumps lib.
brag006
Posts: 173
Joined: Wed Feb 15, 2012 1:26 pm
Location: University of Auckland

Re: Compiling OpenSees

Post by brag006 »

I don't think I quite understood what you meant. So I should save libdmumps.a as another name and then open it up? How can I open up a static lib? All I can do was list the object files and the symbols within it. It shows the dmumps_c symbol as defined. I tried placing the lib before and after MumpsSolver.o but no luck either way, I keep on getting other erros related to undefined symbols in scalapack and blacs.
brag006
Posts: 173
Joined: Wed Feb 15, 2012 1:26 pm
Location: University of Auckland

Re: Compiling OpenSees

Post by brag006 »

Here is the relevant output from a 'nm' command to libdmumps.a:

dmumps_c.o:
0000000000000000 T dmumps_c
U dmumps_f77_
U mumps_get_mapping
U mumps_get_pivnul_list
U mumps_get_sym_perm
U mumps_get_uns_perm

as you can see dmumps_c is defined and the call to this function in MumpsSolver appears to be the same.
brag006
Posts: 173
Joined: Wed Feb 15, 2012 1:26 pm
Location: University of Auckland

Re: Compiling OpenSees

Post by brag006 »

The problem turned out to be in my linking to the BLAS and LAPACK libraries. I was using the ones provided with OpenSees when I should've been using the ones already on the cluster. Finally have OpenSeesMP working with Mumps
gourik
Posts: 69
Joined: Wed Dec 31, 2008 10:07 pm
Location: C-DAC,Pune

Re: Compiling OpenSees

Post by gourik »

Hi,

Its good that OpenSeesMp is installed on your cluster. Kindly share the Makefile.def.
I am also trying to install the same, but facing the same isuue. :(
Thanks And Regards,

Gouri
gourik
Posts: 69
Joined: Wed Dec 31, 2008 10:07 pm
Location: C-DAC,Pune

Re: Compiling OpenSees

Post by gourik »

now getting following error

usr/bin/ld: cannot find -lcmumps
collect2: ld returned 1 exit status
make[1]: *** [tcl] Error 1
Thanks And Regards,

Gouri
Post Reply