Page 1 of 1

Compiling OpenSees

Posted: Fri Nov 15, 2013 12:54 pm
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.

Re: Compiling OpenSees

Posted: Mon Nov 18, 2013 9:11 am
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.

Re: Compiling OpenSees

Posted: Mon Nov 18, 2013 11:51 pm
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.

Re: Compiling OpenSees

Posted: Tue Nov 19, 2013 8:50 am
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.

Re: Compiling OpenSees

Posted: Sun Nov 24, 2013 11:32 am
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.

Re: Compiling OpenSees

Posted: Sun Nov 24, 2013 12:24 pm
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.

Re: Compiling OpenSees

Posted: Sun Nov 24, 2013 3:28 pm
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

Re: Compiling OpenSees

Posted: Wed Feb 18, 2015 1:12 am
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. :(

Re: Compiling OpenSees

Posted: Wed Feb 18, 2015 8:39 pm
by gourik
now getting following error

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