Ticket #36532

installation on Mac el capitan failed

Date d'ouverture: 2016-08-10 13:45 Dernière mise à jour: 2016-08-30 01:25

Rapporteur:
Propriétaire:
(Aucun)
État:
Atteints
Composant:
(Aucun)
Jalon:
(Aucun)
Priorité:
5 - moyen
Sévérité:
5 - moyen
Résolution:
Aucun
Fichier:
Aucun

Détails

I try to compile using g++4.9 + precompile boost 155 or boost 1.6 with mpi option. All is fine until the last ld linkage where the boost:achive failed in your MolDSException.

Here the log result same error on trunk or 0.3.1 version:

mpic++ -o molds -Wl,-rpath,/usr/local/opt/boost//lib/ obj/Enums.o obj/PrintController.o obj/MolDSException.o obj/MallocerFreer.o obj/MpiProcess.o obj/AsyncCommunicator.o obj/Blas.o obj/Lapack.o obj/Utilities.o obj/MathUtilities.o obj/EularAngle.o obj/Parameters.o obj/Atom.o obj/Hatom.o obj/Liatom.o obj/Catom.o obj/Natom.o obj/Oatom.o obj/Satom.o obj/EnvironmentalPointCharge.o obj/AtomFactory.o obj/Molecule.o obj/InputParser.o obj/GTOExpansionSTO.o obj/RealSphericalHarmonicsIndex.o obj/MOLogger.o obj/DensityLogger.o obj/HoleDensityLogger.o obj/ParticleDensityLogger.o obj/Cndo2.o obj/Indo.o obj/ZindoS.o obj/Mndo.o obj/Am1.o obj/Am1D.o obj/Pm3.o obj/Pm3D.o obj/Pm3Pddg.o obj/ElectronicStructureFactory.o obj/MD.o obj/MC.o obj/RPMD.o obj/NASCO.o obj/Optimizer.o obj/ConjugateGradient.o obj/SteepestDescent.o obj/BFGS.o obj/GEDIIS.o obj/OptimizerFactory.o obj/MolDS.o obj/Main.o -L/usr/local/opt/boost//lib/ -L/usr/local/opt/openblas//lib/ -lpthread -lgomp -lboost_serialization-mt -lboost_mpi-mt -lboost_thread-mt -lboost_system-mt -lopenblas Undefined symbols for architecture x86_64:

"boost::archive::text_iarchive_impl<boost::archive::text_iarchive>::load(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)", referenced from:
void boost::serialization::load_construct_data<boost::archive::text_iarchive>(boost::archive::text_iarchive&, MolDS_base::MolDSException*, unsigned int) in MolDSException.o
"boost::archive::text_iarchive_impl<boost::archive::text_iarchive>::text_iarchive_impl(std::basic_istream<char, std::char_traits<char> >&, unsigned int)", referenced from:
MolDS_base::MolDSException::Deserialize(std::basic_istream<char, std::char_traits<char> >&) in MolDSException.o
"boost::archive::text_oarchive_impl<boost::archive::text_oarchive>::save(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
boost::archive::detail::common_oarchive<boost::archive::text_oarchive>::vsave(boost::archive::class_name_type const&) in MolDSException.o boost::archive::detail::pointer_oserializer<boost::archive::text_oarchive, MolDS_base::MolDSException>::save_object_ptr(boost::archive::detail::basic_oarchive&, void const*) const in MolDSException.o
"boost::archive::text_oarchive_impl<boost::archive::text_oarchive>::text_oarchive_impl(std::basic_ostream<char, std::char_traits<char> >&, unsigned int)", referenced from:
MolDS_base::MolDSException::Serialize(std::basic_ostream<char, std::char_traits<char> >&) in MolDSException.o
"boost::archive::basic_text_iprimitive<std::basic_istream<char, std::char_traits<char> > >::~basic_text_iprimitive()", referenced from:
MolDS_base::MolDSException::Deserialize(std::basic_istream<char, std::char_traits<char> >&) in MolDSException.o boost::archive::text_iarchive_impl<boost::archive::text_iarchive>::~text_iarchive_impl() in MolDSException.o boost::archive::text_iarchive_impl<boost::archive::text_iarchive>::~text_iarchive_impl() in MolDSException.o boost::archive::text_iarchive::~text_iarchive() in MolDSException.o boost::archive::text_iarchive::~text_iarchive() in MolDSException.o boost::archive::text_iarchive_impl<boost::archive::text_iarchive>::~text_iarchive_impl() in MolDSException.o
"boost::archive::basic_text_oprimitive<std::basic_ostream<char, std::char_traits<char> > >::~basic_text_oprimitive()", referenced from:
MolDS_base::MolDSException::Serialize(std::basic_ostream<char, std::char_traits<char> >&) in MolDSException.o boost::archive::text_oarchive_impl<boost::archive::text_oarchive>::~text_oarchive_impl() in MolDSException.o boost::archive::text_oarchive_impl<boost::archive::text_oarchive>::~text_oarchive_impl() in MolDSException.o boost::archive::text_oarchive::~text_oarchive() in MolDSException.o boost::archive::text_oarchive::~text_oarchive() in MolDSException.o

ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status

Ticket History (3/10 Histories)

2016-08-10 13:45 Updated by: guillaumegodin
  • New Ticket "installation on Mac el capitan failed" created
2016-08-10 15:52 Updated by: mikiya_fujii
Commentaire

Hi guillaumegodin,

Did you use the makefile included in the trunk of molds?, i.e., <molds_dir>/trunk/src/Makefile or Makefile_GNU. The makefile is needed to be modified to suite your environment. Could you offer your makefile and also commands which you executed at the compilation?

BTW, does same error occurred for the latest code in trunk? molds 0.3.1 has a bug related to boost::serialization, c.f., https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=746884 This bug is fixed for the latest code in trunk.

Mikiya

2016-08-10 17:30 Updated by: guillaumegodin
Commentaire

I used the Makefile with few modifications

CC = mpic++ CFLAGS = -O0 override CFLAGS += -fopenmp BOOST_TOP_DIR = /usr/local/opt/boost155/ BOOST_INC_DIR = $(BOOST_TOP_DIR)/include/ BOOST_LIB_DIR = $(BOOST_TOP_DIR)/lib/ BOOST_LIBS = -lboost_serialization-mt -lboost_mpi-mt -lboost_thread-mt -lboost_system-mt #BOOST_LIBS += -lboost_atomic-mt -lboost_chrono-mt -lboost_context-mt -lboost_coroutine-mt -lboost_date_time-mt -lboost_exception-mt -lboost_filesystem-mt -lboost_graph-mt -lboost_graph_parallel-mt -lboost_iostreams-mt -lboost_locale-mt -lboost_log-mt -lboost_log_setup-mt -lboost_math_c99-mt -lboost_math_c99l-mt -lboost_math_tr1-mt -lboost_math_tr1f-mt -lboost_prg_exec_monitor-mt -lboost_program_options-mt -lboost_random-mt -lboost_regex-mt -lboost_signals-mt -lboost_test_exec_monitor-mt -lboost_thread-mt -lboost_timer-mt -lboost_unit_test_framework-mt -lboost_wave-mt OPENBLAS_TOP_DIR = /usr/local/opt/openblas/ OPENBLAS_INC_DIR = $(OPENBLAS_TOP_DIR)/include/ OPENBLAS_LIB_DIR = $(OPENBLAS_TOP_DIR)/lib/ OPENBLAS_LIBS = -lopenblas LIBSBASE = -lpthread -lgomp LIBS = $(LIBSBASE) $(BOOST_LIBS) $(OPENBLAS_LIBS) EXENAME = molds DEPFILE = obj/objfile.dep LDFLAGS = -Wl,-rpath,$(BOOST_LIB_DIR) -Wl,-rpath,$(OPENBLAS_LIB_DIR) THIS_MAKEFILE := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))

.... no change there in ALL_CPP_FILES, ALL_HEAD_FILES & ALL_OBJ_FILES

$(EXENAME): $(DEPFILE) $(ALL_OBJ_FILES) $(CC) -o $@ $(LDFLAGS) $(ALL_OBJ_FILES) -L$(BOOST_LIB_DIR) -L$(OPENBLAS_LIB_DIR) $(LIBS)

-include $(DEPFILE)

.PHONY: depend depend: -rm -f $(DEPFILE) +make -f $(THIS_MAKEFILE) $(DEPFILE)

$(DEPFILE): $(THIS_MAKEFILE) $(ALL_CPP_FILES) $(ALL_HEAD_FILES) $(CC) -MM $(ALL_CPP_FILES) -I$(BOOST_INC_DIR) -I$(OPENBLAS_INC_DIR) | sed 's/\([ ]\)/obj\/\1/g' | sed 's/\($$*\)\.o[ :]*/\1.o : /g' > $(DEPFILE)

$(ALL_OBJ_FILES): $(CC) -I$(BOOST_INC_DIR) -I$(OPENBLAS_INC_DIR) -o $@ $< $(CFLAGS) -c

.PHONY: clean clean: -rm -f $(ALL_OBJ_FILES) $(EXENAME) $(DEPFILE)

all: clean depend $(EXENAME)

i look at the boost lib using this command and found something strange nm libboost_serialization-mt.dylib |fgrep text_iarchive |c++filt

000000000000e1d0 T boost::archive::text_iarchive_impl<boost::archive::text_iarchive>::text_iarchive_impl(std::1::basic_istream<char, std::1::char_traits<char> >&, unsigned int) 000000000000e150 T boost::archive::text_iarchive_impl<boost::archive::text_iarchive>::text_iarchive_impl(std::1::basic_istream<char, std::1::char_traits<char> >&, unsigned int)

so the std::basic_istream is not reconized.

I compile the boost155 using brew & gcc4.9

2016-08-22 20:31 Updated by: guillaumegodin
  • État Update from Ouvert to Atteints
  • Ticket Close date is changed to 2016-08-22 20:31
Commentaire

Using gcc5 and building openblas (brew with gcc), openmpi (brew with gcc) & boost (no brew!) it works.

2016-08-23 00:21 Updated by: mikiya_fujii
Commentaire

Thanks for notifying me the success of the compilation. Was using gcc5 important? Or, Was using same compiler for molds, openblas, and boos important?

2016-08-23 13:49 Updated by: guillaumegodin
Commentaire

I made those steps. I will try new clang-llvm-3.8 look like it can work too!

% all libs must used the gcc-5! brew install gcc-5

export HOMEBREW_CC=gcc-5 export HOMEBREW_CXX=g++-5

brew reinstall openmpi --build-from-source brew reinstall openblas --build-from-source

then install boost_1_60 using this guideline for installation: http://qiita.com/misho/items/0c0b3ca25bb8f62aa681 tar xvf boost_1_60_0.tar.bz2 cd boost_1_60_0 sublime tools/build/src/tools/darwin.jam​ => tools/build/src/tools/darwin.jam line 582 et pas 579

--- tools/build/src/tools/darwin.jam +++ tools/build/src/tools/darwin.jam @@ -579,7 +579,7 @@

actions link.dll bind LIBRARIES {

- "$(CONFIG_COMMAND)" -dynamiclib -Wl,-single_module -install_name "$(<:B)$(<:S)" -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(FRAMEWORK_PATH) -framework$(_)$(FRAMEWORK:D=:S=) $(OPTIONS) $(USER_OPTIONS) + "$(CONFIG_COMMAND)" -dynamiclib -Wl,-single_module -install_name "/usr/local/gcc/lib/$(<:B)$(<:S)" -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(FRAMEWORK_PATH) -framework$(_)$(FRAMEWORK:D=:S=) $(OPTIONS) $(USER_OPTIONS)

}

./bootstrap.sh --with-libraries=all --prefix=/usr/local/gcc

sublime project-config.jam -if ! darwin in [ feature.values <toolset> ] -{ - using darwin ; -} +using darwin : 5.4 : g++-5 ;

sublime ~/user_config.jam adding a line with "using mpi ;" without quotes

./b2 ./b2 install

Makefile for molds is: """"""""""""""" CC = mpic++ CFLAGS = -m64 -O0 override CFLAGS += -fopenmp BOOST_TOP_DIR = /usr/local/gcc BOOST_INC_DIR = $(BOOST_TOP_DIR)/include/ BOOST_LIB_DIR = $(BOOST_TOP_DIR)/lib/ BOOST_LIBS = -lboost_serialization -lboost_mpi -lboost_thread -lboost_system OPENBLAS_TOP_DIR = /usr/local/opt/openblas OPENBLAS_INC_DIR = $(OPENBLAS_TOP_DIR)/include/ OPENBLAS_LIB_DIR = $(OPENBLAS_TOP_DIR)/lib/ OPENBLAS_LIBS = -lopenblas LIBSBASE = -lpthread -lgomp LIBS = $(LIBSBASE) $(BOOST_LIBS) $(OPENBLAS_LIBS) EXENAME = molds DEPFILE = obj/objfile.dep LDFLAGS = -Wl,-rpath,$(BOOST_LIB_DIR) -Wl,-rpath,$(OPENBLAS_LIB_DIR) THIS_MAKEFILE := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))

ALL_CPP_FILES = .... ALL_OBJ_FILES = .... $(EXENAME): $(DEPFILE) $(ALL_OBJ_FILES) $(CC) -o $@ $(LDFLAGS) $(ALL_OBJ_FILES) -L$(BOOST_LIB_DIR) -L$(OPENBLAS_LIB_DIR) $(LIBS)

""""""""""""""

make clean

make -j8

./molds ../test/c2h6_am1.in

Another question related to development: can you tell me if I can add Br & I atoms for AM1 and can we also implement RM1 ?

Another question related to geometry: How you know the bonds between atoms in the geometry definition ? I would like to generate input files from/similar to mopac .in.

BR

Guillaume (https://github.com/thegodone)

2016-08-24 01:27 Updated by: mikiya_fujii
Commentaire

Thank you for your logging to compile MolDS.

Another question related to development: can you tell me if I can add Br & I atoms for AM1

Although I have no scheduled plan to implement Br & I atoms and also RM1 now, we (developing team) are welcome to your contribution for them.
If you have a will/interest to implement Br & I atoms, the code which have been already implemented for thickets #33721 (Add F (Fluorine)) and #33722 (Add Cl (chlorine)) may help you.
The modification for these thickets #33721 and #33722 are summarized in r1667 and r1668, respectively. Of course, I will support you to implement Br & I atoms.

and can we also implement RM1 ?

Sure. It's very interesting try. (problem is a time to coding....)

Another question related to geometry: How you know the bonds between atoms in the geometry definition ? I would like to generate input files from/similar to mopac .in.

Unfortunately, the current version of MolDS does not support Z-matrix (bond, angle, and dihedral) of molecular configurations and conversion between the Z-matrix and the Cartesian coordinates which are used in MolDS. Actually, in the electronic structure calculation, information about bonds are not needed.

As another candidate to convert the Z-matrix which are used in mopac inputs and the Cartesian coordintes (xyz format), OpenBabel is useful: http://openbabel.org/wiki/Babel
e.g., (from mopac to MolDS)
$ babel -imopin ethanol.in -oxyz ethanol.xyz
Then, create an input for MolDS from the ethanol.xyz

My bests,

2016-08-29 14:24 Updated by: guillaumegodin
Commentaire

Dear All,

I implement the RM1 + adding Br & I atoms for RM1 & AM1 (caution I don't have the book to set some initial variable likke vdw etc...)

For the Derivate parameters I used you little script.

I tested it on CH3Br_rm1.in & CH3I_rm1.in & CH3Br_am1.in & CH3I_am1.in it works fine not sure about the results but no issues.

I made a clone copy of the svn last commit in github there https://github.com/thegodone/molds-branch/commits/master

I also set my makefile there.

I add a question relative to geometry do you optimized it somewhere in the code, if yes how ?

Best regards,

Guillaume

2016-08-29 21:16 Updated by: guillaumegodin
Commentaire

Dear,

Forget my stupid question on geometry optimization. I found it!

Btw, I have not or partial access to your list of the publications in your references (atom.h).

So it's hard for me to grab Atom properties for Br/I/P. I've just bougth the Pople book but for the rest, I will try to use the MOPAC data when available.

Can you share some publications related to whos Atoms Br/I/P or can you complete the atom defiinitions ?

you can use direct contact there: guillaume.godin@gmail.com

BR,

guillaume

2016-08-30 01:25 Updated by: mikiya_fujii
Commentaire

Dear Guillaume,

Thank you for your implementation@github which I will see and merge to trunk.

Mikiya

guillaumegodin への返信

Dear, Forget my stupid question on geometry optimization. I found it! Btw, I have not or partial access to your list of the publications in your references (atom.h). So it's hard for me to grab Atom properties for Br/I/P. I've just bougth the Pople book but for the rest, I will try to use the MOPAC data when available. Can you share some publications related to whos Atoms Br/I/P or can you complete the atom defiinitions ? you can use direct contact there: guillaume.godin@gmail.com BR, guillaume

Attachment File List

No attachments

Modifier

Please login to add comment to this ticket » Connexion