[CPMD-list] cpmd2cube installation on linux (ubuntu)
Claudio Saracini
edta12001 at yahoo.it
Mon Sep 10 10:42:00 CET 2007
Thank you very much for your help. The problem is that there isn't a version of cpmd2cube program in cpmd.org which is adequate (PC-GFORTRAN) for my compile. Sorry but I'm new in this forum: how can I notify
cpmd at cpmd.org that the current cvs version of cpmd2cube should be
made available? I'm going to try to send an email to cpmd at cpmd.org, I don't know if it's the correct way to solve this problem. Otherwise, please tell me what I have to to. Thank you Axel.
Claudio
Axel Kohlmeyer <akohlmey at cmm.chem.upenn.edu> ha scritto:
On Fri, 7 Sep 2007, Claudio Saracini wrote:
hi claudio,
CS> I'm trying to install cpmd2cube program now. I compiled cpmd2cube
CS> using a Linux-Alpha configuration (I don't know if it's the correct
CS> one for my system) and I created the corrispondent Makefile. It
CS> looks like this:
no. alpha is _bad_, as it assumes a DEC/Compaq/HP alpha RISC cpu
which is a 64-bit cpu running on the TRUE64 operating system,
while you obviously have installed a 32-bit version of linux.
please check out the latest version of cpmd2cube on www.cpmd.org.
it should already contain a configuration for Linux-PC-GFORTRAN
which would be adequate for your compile. if not, please notify
cpmd at cpmd.org that the current cvs version of cpmd2cube should be
made available.
in case it is up-to-date, here is what worked for me on a
fedora 6 machine.
#--------------- Configuration
FC = gfortran
LD = $(CC)
CC = gcc
CFLAGS = -O2
FFLAGS = -D__GFORTRAN -DFFT_DEFAULT -O2 -Wall -W -ffree-form -std=gnu
LFLAGS =
LIBS = -Wl,-Bstatic -lgfortranbegin -lgfortran -Wl,-Bdynamic -lm
#--------------- End of Configuration
CS> #--------------- Configuration
CS> FC = fort
CS> FFLAGS = -O -D__alpha -DFFT_DEFAULT -free
CS> LFLAGS = -O
CS> LIBS =
CS> # uncomment and set only if needed
CS> #CC = cc
CS> #CFLAGS =
CS> #--------------- End of Configuration
CS> #############################
CS>
CS> I known that I had to change FFLAGS and LFLAGS parts in a way
CS> similar to the Makefile of CPMD program installation and so I copied
CS> the corrispondent lines from Makefile of the CPMD program to the
CS> Makefile of the cpmd2cube program. Anyway, when I digited "sudo
CS> make" from the shell I recived an error:
AAARRRRRRGGGGGHHHH!!!
another victim of an overly user-friendly(?) operating system.
please never _ever_ run "sudo make" unless you really, really
have to. there is no need at all to compile _any_ software as
superuser. application programs are usually not written as careful
as system software and compilation 'scripts' much less so,
particularly, if you consider, that many programmers of scientific
software are actually not very good at this kind of software management
and that compilation scripts and installation instructions are
easily misleading and assuming a specific build environment.
just consider what would happen, if the makefile contains a cleanup
rule like this: rm -rf $(build_root)/
... and you forgot to set build root?
with "sudo make", you would have destroyed your installation,
with plain "make" you'd just have gotten lots of permission denieds
and in the worst case removed only your home directory.
CS> make: fort: Command not found
CS> make: *** [kinds.o] Error 127
CS>
CS>
CS>
CS> I know that Makefile of the CPMD program is in fortran 77 while
CS> Makefile of cpmd2cube program is in fortran 90, so there are some
CS> differences to take in to account to modify the second Makefile
CS> using the first one, but I don't know the languages. Somebody could
CS> help me to solve this problem? Thank you.
as ari already pointed out, it is not a problem of the programming
languages but of the commands that you use to compile (and as such
not a CPMD/cpmd2cube problem but a general problem of know what
is your compiler and how do you call it). yet furthermore, cpmd2cube
needs to be explicitely ported to gfortran and you need to have
a version of the source code that supports gfortran (see above).
(the port is rather easy, though if you know a little bit about
fortran compilers).
ciao,
axel.
CS>
CS> Claudio
CS>
CS>
CS>
CS>
CS> ---------------------------------
CS>
CS> ---------------------------------
CS> L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail
--
=======================================================================
Axel Kohlmeyer akohlmey at cmm.chem.upenn.edu http://www.cmm.upenn.edu
Center for Molecular Modeling -- University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582, fax: 1-215-573-6233, office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.
---------------------------------
---------------------------------
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cpmd.org/pipermail/cpmd-list/attachments/20070910/cb2ab828/attachment.html
More information about the CPMD-list
mailing list