[DFTB-Plus-User] Cannot Compile dftb-plus!

gaguilar at inescporto.pt gaguilar at inescporto.pt
Mon Dec 21 18:21:43 CET 2009


Hi to all,

The solution pointed by Ben Houraine doesn't work.
After googling I knew that gcc 4.x does not support f2c (or g2c),
then I found another solution in  
http://lists.boost.org/boost-build/2006/05/13901.php

so, I have modified

the line (in Makefile.common)
$(LN) $(LNOPT) -o $@ $^ -g $(O_LIBS) $(L_LIBS)

by this one
$(LN) $(LNOPT) -o $@ -Wl,--start-group  $^ -Wl,--end-group -g  
$(O_LIBS) $(L_LIBS)

that works for me and libgfortran is not needed,

best regards,

gerardo

Quoting Ben Hourahine <benjamin.hourahine at strath.ac.uk>:

> Hello gerardo,
>
> I think the compiler behaviour changed between versions for  erfc
> depending on its optimization and debugging options. You can get the
> code to recognise erfc as an external by modifying Makefile.user to
> include the line
>
> CPPOPT = -DDEBUG=$(DEBUG) -DEXTERNALERFC
>
> and in the case of gfortran then link with the additional
> library -lgfortran
>
> Cheers
>
> Ben
>
> gaguilar at inescporto.pt wrote:
>> Hi!
>> I have another issue,
>>
>> 6 months ago, in Fedora 11, I have compiled dftb+ without problems (I
>> cannot remember the version of g95 but I guess is 4.3.4). Now with gcc
>> 4.4.2, in other machine, but still Fedora 11, I get an error related
>> with unrecognizing erfc at linking time.
>> I guess that this erfc is not the intrinsic one, right? so, i have
>> played with -fno-underscoring a little bit but still the same results,
>> anyone can help me?
>> If erfc is the intrinsic one, then I have an error of gcc.
>> Libraries Lapack, atlas and blas as well as libgfortran are at the
>> same place "/usr/lib/atlas/"
>>
>>
>> cheers,
>>
>> gerardo
>>
>> Quoting Ben Hourahine <benjamin.hourahine at strath.ac.uk>:
>>
>>
>>> Hello,
>>>
>>> which fortran compiler do you have installed? The options try
>>> to use ifort by default, but cannot find this.
>>>
>>> To compile DFTB+ you need:
>>> 1) A fortran compiler - ifort, gfortran or g95 are all common choices
>>> 2) The lapack and blas libraries - mkl or from www.netlib.org are again
>>>    the usual choices for many people.
>>>
>>> Regards
>>>
>>> Ben
>>>
>>> Duo SONG wrote:
>>>
>>>> Dear all dftb-plus users,
>>>>
>>>> How are you? I am a new user on dftb-plus. When compling dftb-plus, I
>>>> came across a problem. The dftb-plus cannot be complied successfully.
>>>> The error report, which appears after invoking make, is following (Those
>>>> above the red-marked error are exactly the same as the howto says):
>>>>
>>>> make[1]: Entering directory `/para3/dsong/dftb+_1.0.1_src/
>>>> prg_dftb/_obj_i686-linux-ifort'
>>>> echo "" > _dependencies
>>>> for dep in
>>>> /para3/dsong/dftb+_1.0.1_src/prg_dftb/../lib_common/Makefile.dep
>>>> /para3/dsong/dftb+_1.0.1_src/prg_dftb/../lib_dftb/Makefile.dep
>>>> /para3/dsong/dftb+_1.0.1_src/prg_dftb/../lib_geoopt/Makefile.dep
>>>> /para3/dsong/dftb+_1.0.1_src/prg_dftb/../lib_io/Makefile.dep
>>>> /para3/dsong/dftb+_1.0.1_src/prg_dftb/../lib_math/Makefile.dep
>>>> /para3/dsong/dftb+_1.0.1_src/prg_dftb/../lib_md/Makefile.dep
>>>> /para3/dsong/dftb+_1.0.1_src/prg_dftb/../lib_mixer/Makefile.dep
>>>> /para3/dsong/dftb+_1.0.1_src/prg_dftb/../lib_type/Makefile.dep
>>>> /para3/dsong/dftb+_1.0.1_src/prg_dftb/../includes/Makefile.dep
>>>> /para3/dsong/dftb+_1.0.1_src/prg_dftb/../ext_xmlf90/Makefile.dep
>>>> /para3/dsong/dftb+_1.0.1_src/prg_dftb/Makefile.dep
>>>> /para3/dsong/dftb+_1.0.1_src/prg_dftb/../lib_math/Makefile.local; do cpp
>>>> -traditional -DDEBUG=0 $dep >> _dependencies; done
>>>> make[1]: Leaving directory
>>>> `/para3/dsong/dftb+_1.0.1_src/prg_dftb/_obj_i686-linux-ifort'
>>>> make[1]: Entering directory
>>>> `/para3/dsong/dftb+_1.0.1_src/prg_dftb/_obj_i686-linux-ifort'
>>>> cpp -traditional -DDEBUG=0
>>>> -I/para3/dsong/dftb+_1.0.1_src/prg_dftb/../lib_common/
>>>> -I/para3/dsong/dftb+_1.0.1_src/prg_dftb/../includes
>>>> /para3/dsong/dftb+_1.0.1_src/prg_dftb/../lib_common/allocate.F90 |
>>>> /para3/dsong/dftb+_1.0.1_src/prg_dftb/../utils/fpp/fpp.sh nocntln >
>>>> allocate.f90
>>>> ifort -O2 -xW -ip -o allocate.o -c allocate.f90
>>>> *make[1]: ifort: Command not found*
>>>> make[1]: *** [allocate.o] Error 127
>>>> rm allocate.f90
>>>> make[1]: Leaving directory
>>>> `/para3/dsong/dftb+_1.0.1_src/prg_dftb/_obj_i686-linux-ifort'
>>>> *make: *** [_obj_i686-linux-ifort] Error 2*
>>>>
>>>> Here is what I have done to complie dftb-plus:
>>>>
>>>> Firstly, I unpacked the package "dftb-plus_1.0.1_src". After finding
>>>> that make.i686-linux-ifort exists in the sysmakes, I copied
>>>> Makefile.user.template to Makefile.user.
>>>> I modified it as following:
>>>>
>>>> ## Set alternative path for the autotest directory
>>>> #PRGDFTB_TESTDIR = $(ROOT)/../autotest
>>>>
>>>> ## Set alternative file containing the name of the tests to run
>>>> #PRGDFTB_TESTFILE = $(PRGDFTB_TESTDIR)/tests
>>>>
>>>> ## Change directory, where the _obj* directory for the object files is
>>>> created
>>>> #OBJDIR_PARENT =
>>>>
>>>> ## Change suffix after '_obj' for the object directory name
>>>> #OBJDIR_SUFFIX = _i686-linux-ifort
>>>>
>>>> ## Set directory, where binary should be copied when issuing  
>>>> 'make install'
>>>> #INSTALLDIR = .
>>>>
>>>>
>>>> ## Uncomment to keep intermediate files in OBJDIR (for debug only!)
>>>> #.PRECIOUS: %.f90 %.F %.f %.c
>>>>
>>>> Then I entered prg_dftb and typed "make distclean" and "rm -rf
>>>> ./_obj_i686-linux-ifort" shows. Finally, I typed "make", the error
>>>> report presented above appears.
>>>>
>>>> Is there anything wrong I did to compile dftb-plus? And how can I
>>>> compile it successfully? This email may be a liitle long. Thank you very
>>>> much for your time reading it and thank you very much for your great
>>>> help! I am grateful for any answer to it!
>>>>
>>>> Best wishes!
>>>>
>>>> Yours sincerely,
>>>> Duo Song
>>>>
>>>>
>>>> --
>>>> SONG Duo
>>>> Undergraduate Student
>>>>
>>>> Department of Materials Science and Engineering
>>>> University of Science and Technology of China
>>>>
>>>>
>>> --
>>>      Dr. B. Hourahine, SUPA, Department of Physics,
>>>    University of Strathclyde, John Anderson Building,
>>>           107 Rottenrow, Glasgow G4 0NG, UK.
>>>     +44 141 548 2325, benjamin.hourahine at strath.ac.uk
>>>    The University of Strathclyde is a charitable body,
>>> registered in Scotland, with registration number SC015263
>>>
>>> _______________________________________________
>>> DFTB-Plus-User mailing list
>>> DFTB-Plus-User at dftb-plus.info
>>> http://www.dftb-plus.info/mailman/listinfo/dftb-plus-user
>>>
>>>
>>
>>
>>
>> ----------------------------------------------------------------
>> This message was sent using IMP, the Internet Messaging Program.
>> _______________________________________________
>> DFTB-Plus-User mailing list
>> DFTB-Plus-User at dftb-plus.info
>> http://www.dftb-plus.info/mailman/listinfo/dftb-plus-user
>>
>
>
> --
>      Dr. B. Hourahine, SUPA, Department of Physics,
>    University of Strathclyde, John Anderson Building,
>           107 Rottenrow, Glasgow G4 0NG, UK.
>     +44 141 548 2325, benjamin.hourahine at strath.ac.uk
>    The University of Strathclyde is a charitable body,
> registered in Scotland, with registration number SC015263
>
>
> _______________________________________________
> DFTB-Plus-User mailing list
> DFTB-Plus-User at dftb-plus.info
> http://www.dftb-plus.info/mailman/listinfo/dftb-plus-user
>



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


More information about the DFTB-Plus-User mailing list