Giter Club home page Giter Club logo

Comments (3)

sundmanbo avatar sundmanbo commented on June 5, 2024

There are several different liboctq files in the TQ3 directory because they
representr different contributions and we have not had time to harmonize
them. That will be done in version 4. For the moment use the libraries in
the isoC-Sigli when linking with C++

Best wishes

Bosse

2016-01-25 19:46 GMT+01:00 Anil Kunwar [email protected]:

I recently tried to compile the libraries in
https://githubcom/sundmanbo/opencalphad/tree/version3/TQ3lib-clean/isoC-Sigli
(with an additional liboceqa library from the main OC directory) with the
following contents in Makefile:
######################################################################
OBJS=liboctqo liboctqisoco
EXE=Example_TQ #this is the cpp file name and it was tgintfcpp on
2015-10-02
LIBS=/
CC = g++
CFLAGS = -c -Wall

PHONY : all clean

all:
make $(EXE)

clean:
rm -f *o *mod $(EXE)

liboctqo: liboctqF90
gfortran $(CFLAGS) -g -fbounds-check -finit-local-zero -I$(LIBS) liboctqF90

liboctqisoco: liboctqisocF90
gfortran $(CFLAGS) -g -fbounds-check -finit-local-zero -I$(LIBS)
liboctqisocF90

$(EXE): $(OBJS)
$(CC) -o $(EXE) -fopenmp -lstdc++ $(EXE)cpp liboctqisoco liboctqo liboceqa
-lgfortran -lm
$(CC) $(CFLAGS) -I/ $(EXE)cpp

###############################################################################
The compilation produces " undefined reference to `c_selecteq' and so on

However, the compilation is successful in the isoC-Sigli libraries with
the cpp file name tgintfcpp on 2015-10-02 Some updates might have required
additional settings in the linking with the make command

Please suggest on what i should add on the above makefile


Reply to this email directly or view it on GitHub
#27.

from opencalphad.

anilkunwar avatar anilkunwar commented on June 5, 2024

Dear Sir,
Thank you for mentioning about the differences existing between the liboctq files. However, the fortran compilation of liboctq.F90 and liboctqisoc.F90 within the isoC-Sigli directory requires copy paste of liboceq.a and liboceqplus.mod files from the main opencalphad compilation location. This is mentioned in the linkpm.txt within the TQ3lib-clean/isoC-Sigli/ directory as:

copy ..\..\liboceq.a .

copy ..\..\liboceqplus.mod .

gfortran -c liboctq.F90

gfortran -c liboctqisoc.F90

g++ -o sigli -fopenmp -lstdc++ Example_TQ.cpp liboctqisoc.o liboctq.o liboceq.a -lgfortran -lm

Compilation with the same set of commands for the files within the isoC-Sigli directory also produces the same type of error:

...
liboctq.F90:(.text+0x4004): multiple definition of `__liboctq_MOD_tqgcom'
liboctqisoc.o:liboctqisoc.F90:(.text+0x4004): first defined here
liboctq.o: In function `__liboctq_MOD_tqrpfil':
liboctq.F90:(.text+0x4173): multiple definition of `__liboctq_MOD_tqrpfil'
liboctqisoc.o:liboctqisoc.F90:(.text+0x4173): first defined here
liboctq.o: In function `__liboctq_MOD_tqrfil':
liboctq.F90:(.text+0x4361): multiple definition of `__liboctq_MOD_tqrfil'
liboctqisoc.o:liboctqisoc.F90:(.text+0x4361): first defined here
liboctq.o: In function `__liboctq_MOD_tqini':
liboctq.F90:(.text+0x45a8): multiple definition of `__liboctq_MOD_tqini'
liboctqisoc.o:liboctqisoc.F90:(.text+0x45a8): first defined here
/tmp/ccYdtw9r.o: In function `Get_Ceq(int const&, void*)':
Example_TQ.cpp:(.text+0x20): undefined reference to `c_selecteq'
/tmp/ccYdtw9r.o: In function `Initialize(void*)':
Example_TQ.cpp:(.text+0x4e): undefined reference to `c_tqini'
/tmp/ccYdtw9r.o: In function `Create_New_Ceq_and_Return_ID(std::string const&)':
Example_TQ.cpp:(.text+0xad): undefined reference to `c_newEquilibrium'
/tmp/ccYdtw9r.o: In function `Get_Ceq_pointer(int const&, void*)':
Example_TQ.cpp:(.text+0xe2): undefined reference to `c_selecteq'
/tmp/ccYdtw9r.o: In function `GetAllElementsFromDatabase(std::string)':
Example_TQ.cpp:(.text+0x13a): undefined reference to `c_checktdb'
/tmp/ccYdtw9r.o: In function `ReadDatabase(std::string, void*)':
Example_TQ.cpp:(.text+0x1a9): undefined reference to `c_tqrfil'
/tmp/ccYdtw9r.o: In function `ReadDatabaseLimited(std::string&, std::vector<std::string, std::allocator<std::string> >&, void*)':
Example_TQ.cpp:(.text+0x353): undefined reference to `c_tqrpfil'
/tmp/ccYdtw9r.o: In function `ReadPhases(std::vector<std::string, std::allocator<std::string> >&, void*)':
Example_TQ.cpp:(.text+0x3b5): undefined reference to `c_ntup'
Example_TQ.cpp:(.text+0x3f8): undefined reference to `c_tqgpn'
Example_TQ.cpp:(.text+0x40f): undefined reference to `c_tqgpi'
Example_TQ.cpp:(.text+0x4b8): undefined reference to `c_ntup'
/tmp/ccYdtw9r.o: In function `ResetTemperature(void*)':
Example_TQ.cpp:(.text+0x5bc): undefined reference to `c_reset_conditions'
/tmp/ccYdtw9r.o: In function `ResetAllConditionsButPandN(void*, std::vector<std::string, std::allocator<std::string> > const&, int const&, std::string const&)':
Example_TQ.cpp:(.text+0x6ba): undefined reference to `c_reset_conditions'
Example_TQ.cpp:(.text+0x81f): undefined reference to `c_reset_conditions'
/tmp/ccYdtw9r.o: In function `Change_Phase_Status(std::string const&, int const&, double const&, void*)':
Example_TQ.cpp:(.text+0x976): undefined reference to `c_Change_Status_Phase'
/tmp/ccYdtw9r.o: In function `SetTemperature(double const&, void*)':
Example_TQ.cpp:(.text+0x9fc): undefined reference to `c_tqsetc'
/tmp/ccYdtw9r.o: In function `SetPressure(double const&, void*)':
Example_TQ.cpp:(.text+0xa8a): undefined reference to `c_tqsetc'
/tmp/ccYdtw9r.o: In function `SetMoles(double const&, void*)':
Example_TQ.cpp:(.text+0xb18): undefined reference to `c_tqsetc'
/tmp/ccYdtw9r.o: In function `SetComposition(std::vector<double, std::allocator<double> >&, void*, int const&, std::string&)':
Example_TQ.cpp:(.text+0xc4e): undefined reference to `c_tqsetc'
Example_TQ.cpp:(.text+0xcaa): undefined reference to `c_nel'
/tmp/ccYdtw9r.o: In function `SetConstituents(int, std::vector<double, std::allocator<double> >, void*)':
Example_TQ.cpp:(.text+0xe05): undefined reference to `c_tqsphc1'
/tmp/ccYdtw9r.o: In function `List_Conditions(void*)':
Example_TQ.cpp:(.text+0xf26): undefined reference to `c_List_Conditions'
/tmp/ccYdtw9r.o: In function `CalculateEquilibrium(void*, int const&, int&, std::vector<std::string, std::allocator<std::string> > const&)':
Example_TQ.cpp:(.text+0x1069): undefined reference to `c_tqce'
Example_TQ.cpp:(.text+0x106e): undefined reference to `c_errors_number'
/tmp/ccYdtw9r.o: In function `GetGibbsData(int, void*)':
Example_TQ.cpp:(.text+0x111c): undefined reference to `c_tqcph1'
/tmp/ccYdtw9r.o: In function `ReadPhaseFractions(std::vector<std::string, std::allocator<std::string> > const&, std::vector<double, std::allocator<double> >&, void*)':
Example_TQ.cpp:(.text+0x14c1): undefined reference to `c_tqgetv'
/tmp/ccYdtw9r.o: In function `ReadMU(void*, std::vector<double, std::allocator<double> >&)':
Example_TQ.cpp:(.text+0x15cc): undefined reference to `c_tqgetv'
Example_TQ.cpp:(.text+0x15f8): undefined reference to `c_nel'
/tmp/ccYdtw9r.o: In function `ReadTemperature(void*)':
Example_TQ.cpp:(.text+0x1691): undefined reference to `c_tqgetv'
/tmp/ccYdtw9r.o: In function `ReadConstituentFractions(std::vector<std::string, std::allocator<std::string> > const&, std::vector<double, std::allocator<double> > const&, std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >&, void*, std::string const&)':
Example_TQ.cpp:(.text+0x1724): undefined reference to `c_tqgpn'
Example_TQ.cpp:(.text+0x182d): undefined reference to `c_tqgetv'
Example_TQ.cpp:(.text+0x18c7): undefined reference to `c_ntup'
/tmp/ccYdtw9r.o: In function `ListExtConstituentFractions(int, std::vector<std::string, std::allocator<std::string> >, void*)':
Example_TQ.cpp:(.text+0x196b): undefined reference to `c_tqgphc1'
/tmp/ccYdtw9r.o: In function `Global_Find_Transitions(std::basic_ofstream<char, std::char_traits<char> >&, double&, int const&, double&, double, std::vector<double, std::allocator<double> >&, std::vector<std::string, std::allocator<std::string> > const&, std::vector<std::string, std::allocator<std::string> > const&, void*, int const&, std::string const&, int const&, std::vector<int, std::allocator<int> >&, std::vector<std::string, std::allocator<std::string> >&, std::vector<std::string, std::allocator<std::string> > const&)':
Example_TQ.cpp:(.text+0x3037): undefined reference to `c_selecteq'
Example_TQ.cpp:(.text+0x30cf): undefined reference to `c_set_status_globaldata'
/tmp/ccYdtw9r.o: In function `Random_Equilibrium_Loop(double&, double&, std::vector<double, std::allocator<double> >&, std::vector<std::string, std::allocator<std::string> > const&, std::vector<std::string, std::allocator<std::string> > const&, void*, int, std::string const&, int const&, int const&, std::vector<int, std::allocator<int> >&, std::vector<std::string, std::allocator<std::string> >&, std::vector<std::string, std::allocator<std::string> > const&)':
Example_TQ.cpp:(.text+0x3e87): undefined reference to `c_selecteq'
/tmp/ccYdtw9r.o: In function `main':
Example_TQ.cpp:(.text+0x6e72): undefined reference to `c_cnam'
Example_TQ.cpp:(.text+0x6f26): undefined reference to `c_nel'
Example_TQ.cpp:(.text+0x8688): undefined reference to `c_set_status_globaldata'
/tmp/ccYdtw9r.o: In function `Find_Transitions(double const&, int const&, double const&, std::vector<double, std::allocator<double> >&, std::vector<std::string, std::allocator<std::string> > const&, std::vector<double, std::allocator<double> >&, std::vector<std::string, std::allocator<std::string> > const&, bool, bool, std::vector<int, std::allocator<int> >&, std::vector<std::string, std::allocator<std::string> >&, void*, double, std::vector<std::string, std::allocator<std::string> > const&) [clone ._omp_fn.0]':
Example_TQ.cpp:(.text+0xe105): undefined reference to `c_selecteq'
/tmp/ccYdtw9r.o: In function `Random_Equilibrium_Loop(double&, double&, std::vector<double, std::allocator<double> >&, std::vector<std::string, std::allocator<std::string> > const&, std::vector<std::string, std::allocator<std::string> > const&, void*, int, std::string const&, int const&, int const&, std::vector<int, std::allocator<int> >&, std::vector<std::string, std::allocator<std::string> >&, std::vector<std::string, std::allocator<std::string> > const&) [clone ._omp_fn.1]':
Example_TQ.cpp:(.text+0xe3ad): undefined reference to `c_selecteq'
collect2: error: ld returned 1 exit status

Hoping for your reply.

Yours Sincerely,
Anil Kunwar

from opencalphad.

sundmanbo avatar sundmanbo commented on June 5, 2024

Dear Anil

I know about these problems but with some patience I am sure you can sort
this out yourself.

If you can make a proposal for a working set of liboctq and liboctqisoc for
all cases would be nice. At present each example has been developed
independently and there is no compatibility check. As I mentioned that
will be done in the next version but as the source code is open anyone can
make modifications that suits him.

Best wishes

Bosse

2016-01-26 15:11 GMT+01:00 Anil Kunwar [email protected]:

Dear Sir,
Thank you for mentioning about the differences existing between the
liboctq files. However, the fortran compilation of liboctq.F90 and
liboctqisoc.F90 within the isoC-Sigli directory requires copy paste of
liboceq.a and liboceqplus.mod files from the main opencalphad compilation
location. This is mentioned in the linkpm.txt within the
TQ3lib-clean/isoC-Sigli/ directory as:

copy ....\liboceq.a .

copy ....\liboceqplus.mod .

gfortran -c liboctq.F90

gfortran -c liboctqisoc.F90

g++ -o sigli -fopenmp -lstdc++ Example_TQ.cpp liboctqisoc.o liboctq.o liboceq.a -lgfortran -lm

Compilation with the same set of commands for the files within the
isoC-Sigli directory also produces the same type of error:

liboctq.F90:(.text+0x4004): multiple definition of __liboctq_MOD_tqgcom' liboctqisoc.o:liboctqisoc.F90:(.text+0x4004): first defined here liboctq.o: In functionliboctq_MOD_tqrpfil':
liboctq.F90:(.text+0x4173): multiple definition of __liboctq_MOD_tqrpfil' liboctqisoc.o:liboctqisoc.F90:(.text+0x4173): first defined here liboctq.o: In functionliboctq_MOD_tqrfil':
liboctq.F90:(.text+0x4361): multiple definition of __liboctq_MOD_tqrfil' liboctqisoc.o:liboctqisoc.F90:(.text+0x4361): first defined here liboctq.o: In functionliboctq_MOD_tqini':
liboctq.F90:(.text+0x45a8): multiple definition of __liboctq_MOD_tqini' liboctqisoc.o:liboctqisoc.F90:(.text+0x45a8): first defined here /tmp/ccYdtw9r.o: In functionGet_Ceq(int const&, void
)':
Example_TQ.cpp:(.text+0x20): undefined reference to c_selecteq' /tmp/ccYdtw9r.o: In functionInitialize(void
)':
Example_TQ.cpp:(.text+0x4e): undefined reference to c_tqini' /tmp/ccYdtw9r.o: In functionCreate_New_Ceq_and_Return_ID(std::string const&)':
Example_TQ.cpp:(.text+0xad): undefined reference to c_newEquilibrium' /tmp/ccYdtw9r.o: In functionGet_Ceq_pointer(int const&, void
)':
Example_TQ.cpp:(.text+0xe2): undefined reference to c_selecteq' /tmp/ccYdtw9r.o: In functionGetAllElementsFromDatabase(std::string)':
Example_TQ.cpp:(.text+0x13a): undefined reference to c_checktdb' /tmp/ccYdtw9r.o: In functionReadDatabase(std::string, void
)':
Example_TQ.cpp:(.text+0x1a9): undefined reference to c_tqrfil' /tmp/ccYdtw9r.o: In functionReadDatabaseLimited(std::string&, std::vector<std::string, std::allocatorstd::string >&, void
)':
Example_TQ.cpp:(.text+0x353): undefined reference to c_tqrpfil' /tmp/ccYdtw9r.o: In functionReadPhases(std::vector<std::string, std::allocatorstd::string >&, void
)':
Example_TQ.cpp:(.text+0x3b5): undefined reference to c_ntup' Example_TQ.cpp:(.text+0x3f8): undefined reference toc_tqgpn'
Example_TQ.cpp:(.text+0x40f): undefined reference to c_tqgpi' Example_TQ.cpp:(.text+0x4b8): undefined reference toc_ntup'
/tmp/ccYdtw9r.o: In function ResetTemperature(void*)': Example_TQ.cpp:(.text+0x5bc): undefined reference toc_reset_conditions'
/tmp/ccYdtw9r.o: In function ResetAllConditionsButPandN(void*, std::vector<std::string, std::allocator<std::string> > const&, int const&, std::string const&)': Example_TQ.cpp:(.text+0x6ba): undefined reference toc_reset_conditions'
Example_TQ.cpp:(.text+0x81f): undefined reference to c_reset_conditions' /tmp/ccYdtw9r.o: In functionChange_Phase_Status(std::string const&, int const&, double const&, void_)':
Example_TQ.cpp:(.text+0x976): undefined reference to c_Change_Status_Phase' /tmp/ccYdtw9r.o: In functionSetTemperature(double const&, void_)':
Example_TQ.cpp:(.text+0x9fc): undefined reference to c_tqsetc' /tmp/ccYdtw9r.o: In functionSetPressure(double const&, void_)':
Example_TQ.cpp:(.text+0xa8a): undefined reference to c_tqsetc' /tmp/ccYdtw9r.o: In functionSetMoles(double const&, void_)':
Example_TQ.cpp:(.text+0xb18): undefined reference to c_tqsetc' /tmp/ccYdtw9r.o: In functionSetComposition(std::vector<double, std::allocator >&, void_, int const&, std::string&)':
Example_TQ.cpp:(.text+0xc4e): undefined reference to c_tqsetc' Example_TQ.cpp:(.text+0xcaa): undefined reference toc_nel'
/tmp/ccYdtw9r.o: In function SetConstituents(int, std::vector<double, std::allocator<double> >, void_)': Example_TQ.cpp:(.text+0xe05): undefined reference to c_tqsphc1'
/tmp/ccYdtw9r.o: In functionList_Conditions(void_)': Example_TQ.cpp:(.text+0xf26): undefined reference to c_List_Conditions'
/tmp/ccYdtw9r.o: In functionCalculateEquilibrium(void_, int const&, int&, std::vector<std::string, std::allocator<std::string> > const&)': Example_TQ.cpp:(.text+0x1069): undefined reference to c_tqce'
Example_TQ.cpp:(.text+0x106e): undefined reference toc_errors_number' /tmp/ccYdtw9r.o: In function GetGibbsData(int, void*)':
Example_TQ.cpp:(.text+0x111c): undefined reference toc_tqcph1' /tmp/ccYdtw9r.o: In function ReadPhaseFractions(std::vector<std::string, std::allocatorstd::string > const&, std::vector<double, std::allocator >&, void*)':
Example_TQ.cpp:(.text+0x14c1): undefined reference toc_tqgetv' /tmp/ccYdtw9r.o: In function ReadMU(void*, std::vector<double, std::allocator >&)':
Example_TQ.cpp:(.text+0x15cc): undefined reference toc_tqgetv' Example_TQ.cpp:(.text+0x15f8): undefined reference to c_nel'
/tmp/ccYdtw9r.o: In functionReadTemperature(void_)': Example_TQ.cpp:(.text+0x1691): undefined reference to c_tqgetv'
/tmp/ccYdtw9r.o: In functionReadConstituentFractions(std::vector<std::string, std::allocator<std::string> > const&, std::vector<double, std::allocator<double> > const&, std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >&, void_, std::string const&)': Example_TQ.cpp:(.text+0x1724): undefined reference to c_tqgpn'
Example_TQ.cpp:(.text+0x182d): undefined reference toc_tqgetv' Example_TQ.cpp:(.text+0x18c7): undefined reference to c_ntup'
/tmp/ccYdtw9r.o: In functionListExtConstituentFractions(int, std::vector<std::string, std::allocator<std::string> >, void_)': Example_TQ.cpp:(.text+0x196b): undefined reference to c_tqgphc1'
/tmp/ccYdtw9r.o: In functionGlobal_Find_Transitions(std::basic_ofstream<char, std::char_traits<char> >&, double&, int const&, double&, double, std::vector<double, std::allocator<double> >&, std::vector<std::string, std::allocator<std::string> > const&, std::vector<std::string, std::allocator<std::string> > const&, void_, int const&, std::string const&, int const&, std::vector<int, std::allocator<int> >&, std::vector<std::string, std::allocator<std::string> >&, std::vector<std::string, std::allocator<std::string> > const&)': Example_TQ.cpp:(.text+0x3037): undefined reference to c_selecteq'
Example_TQ.cpp:(.text+0x30cf): undefined reference toc_set_status_globaldata' /tmp/ccYdtw9r.o: In function Random_Equilibrium_Loop(double&, double&, std::vector<double, std::allocator >&, std::vector<std::string, std::allocatorstd::string > const&, std::vector<std::string, std::allocatorstd::string > const&, void*, int, std::string const&, int const&, int const&, std::vector<int, std::allocator >&, std::vector<std::string, std::allocatorstd::string >&, std::vector<std::string, std::allocatorstd::string > const&)':
Example_TQ.cpp:(.text+0x3e87): undefined reference toc_selecteq' /tmp/ccYdtw9r.o: In function main':
Example_TQ.cpp:(.text+0x6e72): undefined reference toc_cnam' Example_TQ.cpp:(.text+0x6f26): undefined reference to c_nel'
Example_TQ.cpp:(.text+0x8688): undefined reference toc_set_status_globaldata' /tmp/ccYdtw9r.o: In function Find_Transitions(double const&, int const&, double const&, std::vector<double, std::allocator >&, std::vector<std::string, std::allocatorstd::string > const&, std::vector<double, std::allocator >&, std::vector<std::string, std::allocatorstd::string > const&, bool, bool, std::vector<int, std::allocator >&, std::vector<std::string, std::allocatorstd::string >&, void*, double, std::vector<std::string, std::allocatorstd::string > const&) [clone ._omp_fn.0]':
Example_TQ.cpp:(.text+0xe105): undefined reference toc_selecteq' /tmp/ccYdtw9r.o: In function Random_Equilibrium_Loop(double&, double&, std::vector<double, std::allocator >&, std::vector<std::string, std::allocatorstd::string > const&, std::vector<std::string, std::allocatorstd::string > const&, void*, int, std::string const&, int const&, int const&, std::vector<int, std::allocator >&, std::vector<std::string, std::allocatorstd::string >&, std::vector<std::string, std::allocatorstd::string > const&) [clone ._omp_fn.1]':
Example_TQ.cpp:(.text+0xe3ad): undefined reference to`c_selecteq'
collect2: error: ld returned 1 exit status

Hoping for your reply.

Yours Sincerely,
Anil Kunwar


Reply to this email directly or view it on GitHub
#27 (comment)
.

from opencalphad.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.