You are not logged in.

#1 2015-10-25 20:47:20

yellowhat
Member
Registered: 2011-09-17
Posts: 10

MSC Marc and ifort

Hi all,
I am trying to use a commercial software MSC Marc with ifort [user subroutine].
ifort is working because I am able to compile a dummy fortran file.
When I try to compile an user suborutine with Marc it gives me this error:

/home/username/MSC/2014.2/marc2014.2/lib/linux64i8/casilib.a(unicodeutils.o): In function `CASI_tmpnam':
unicodeutils.c:(.text+0x1b): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
ld: /home/username/MSC/2014.2/marc2014.2/lib/linux64i8/ACSI_MarcLib.a(Build_MarcLib.o): undefined reference to symbol '_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode@@GLIBCXX_3.4'
/usr/lib/libstdc++.so.6: error adding symbols: DSO missing from command line
/home/username/MSC/2014.2/marc2014.2/tools/run_marc: link failed for /home/username/Downloads/stuff.o
.

I don't understand the 'DSO missing from command line'.
The exact same subroutine works flawlessly under Windows.

Thanks

Offline

#2 2015-10-27 19:26:31

yellowhat
Member
Registered: 2011-09-17
Posts: 10

Re: MSC Marc and ifort

Up

Offline

#3 2015-10-29 20:02:46

yellowhat
Member
Registered: 2011-09-17
Posts: 10

Re: MSC Marc and ifort

Maybe this can help:

ld: cannot find -lVT
ld: cannot find -ldwarf
/home/user/MSC/2014.2/marc2014.2/tools/run_marc: link failed for /home/user/Downloads/stuff.o

Installing libdwarf solved "ld: cannot find -ldwarf".
libvt is part of openmpi, but even after I install openmpi it continues to give this error.

Last edited by yellowhat (2015-10-29 20:45:30)

Offline

#4 2015-10-30 08:37:34

Goresome
Member
From: Russia
Registered: 2011-12-06
Posts: 67

Re: MSC Marc and ifort

About the problem in the first post, you also have to add -lstdc++

Offline

#5 2015-10-30 20:01:19

yellowhat
Member
Registered: 2011-09-17
Posts: 10

Re: MSC Marc and ifort

Even if installing libstdc++5:

ls -al /usr/lib | grep libstdc++
-rw-r--r--   1 root root  5301776 Aug  5 13:36 libstdc++.a
lrwxrwxrwx   1 root root       19 Aug  7 14:09 libstdc++.so -> libstdc++.so.6.0.21
lrwxrwxrwx   1 root root       18 Apr 28  2014 libstdc++.so.5 -> libstdc++.so.5.0.7
-rwxr-xr-x   1 root root   820368 Apr 28  2014 libstdc++.so.5.0.7
lrwxrwxrwx   1 root root       19 Aug  7 14:09 libstdc++.so.6 -> libstdc++.so.6.0.21
-rwxr-xr-x   1 root root 11550024 Aug  7 14:09 libstdc++.so.6.0.21

I got the same error.

Offline

#6 2015-10-30 23:03:48

Goresome
Member
From: Russia
Registered: 2011-12-06
Posts: 67

Re: MSC Marc and ifort

Not simply installing, you should add it to linker command line (it has the symbol your compilation missing in the first post). icc/ifort don't link to GCC libraries automatically.

Offline

#7 2015-10-31 06:28:18

yellowhat
Member
Registered: 2011-09-17
Posts: 10

Re: MSC Marc and ifort

Even if I type:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/

or

ldconfig /usr/lib/

gives same error.

Offline

#8 2015-12-10 16:07:26

alennon
Member
From: Dublin, Ireland
Registered: 2009-01-13
Posts: 15

Re: MSC Marc and ifort

In case this issue is not yet resolved, I have come across a similar problem with the RedHat version of MSC.Marc 2014.2 on an Ubuntu installation.

As indicated by #Goresome, the linker option needs to be added to the command line.  However, with Marc, this is not controlled explicitly by the user but is set from a configuration file "include_linux64" (or "include" if you're 32 bit) within the Marc "tools" directory, which is called by the "run_marc" script when user subroutine compilation is flagged.

You need to change the line

LINK_OPT= 

to

 LINK_OPT="-lstdc++"

Depending on how you installed Marc, you may need root permissions to change the "include_linux64" file.

This worked for me. 

P.S. I had another issue with some preprocessor directives in one of the common blocks but that is another story and should be unrelated to the linking issue.

Last edited by alennon (2015-12-10 16:08:14)

Offline

Board footer

Powered by FluxBB