[CPMD-list] Compilation of cpmd2cube

Axel Kohlmeyer axel.kohlmeyer at theochem.ruhr-uni-bochum.de
Tue May 25 11:01:02 CEST 2004


On Tue, 25 May 2004 kohsj at ihpc.a-star.edu.sg wrote:

AK> Dear all,
AK> 
AK> Thank you very much for all your helpful replies.  I'm using IBM p690
AK> AIX 5L v.5.1 (Dr. Kohlmeyer is right).  I've followed your
AK> instructions to delete and replace the necessary flags, and the
AK> "object files".  What was left with is this:

noooooo. you should delete the .o files in your compile directory not
in the makesfile. hrmph, i always forget to word my replies carefully...

please try the attached makefile. this is for a newer version of
cpmd2cube, but it should work nevertheless

axel.

AK> 
AK> .SUFFIXES: .o .F90
AK> 
AK> ## IBM / AIX
AK> FC	= xlf90 
AK> FFLAGS	= -WF,"-D__AIX,-DFFT_ESSL" -qsuffix=cpp=F90 -O3 -qarch=pwr2 -qtune=pwr2
                                                                ^^^^^^^
                                              this is the main culprit. 
    you have a power4 cpu in your machine, yet you tell the compiler to 
    compiler for power2 (exclusively)

AK> LFLAGS	= -O2 -qtune=pwr2 -bmaxdata:1500000000 -bmaxstack:1500000000
                      ^^^^^^^^^^ 
                       this is wrong but not
AK> LIBS	=  -L/rzu/aix/lib -lessl
AK> #LIBS	= -L${HOME}/lib/fftw/lib -lfftw-double
AK> 
AK> ##############
AK> 
AK> EXE	= cpmd2cube
AK> 
AK> #############################
AK> 
AK> $(EXE):	
AK> 	$(FC) -o $(EXE) $(LFLAGS) $(LIBS)
AK> 
AK> .F90.o:
AK> 	$(FC) -c $(FFLAGS) $*.F90
AK> 
AK> clean: 
AK> 	rm -f *.o *.mod
AK> 
AK> 
AK> I've removed the ones for CRAY, HITACHI etc...  upon recompiling, the following message came out:
AK> 
AK> 
AK> xlf90  -o cpmd2cube -O2 -qtune=pwr2 -bmaxdata:1500000000 -bmaxstack:1500000000 l
AK> ld: 0711-317 ERROR: Undefined symbol: .main                                     
AK> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.  
AK> make: *** [cpmd2cube] Error 8                                                   
AK> 
AK> 
AK> 
AK> What was wrong?  Thanks again :).
AK> 
AK> 
AK> Adrian.
AK> 
AK> 
AK> 
AK> 
AK> 
AK> ----- Original Message -----
AK> From: Axel Kohlmeyer <axel.kohlmeyer at theochem.ruhr-uni-bochum.de>
AK> Date: Tuesday, May 25, 2004 3:06 pm
AK> Subject: Re: [CPMD-list] Compilation of cpmd2cube
AK> 
AK>  
AK>  On Tue, 25 May 2004 kohsj at ihpc.a-star.edu.sg wrote:
AK>  
AK>  AK> Dear Sir,
AK>  AK> 
AK>  AK> Thanks a lot for clarifying on the compilation part.  I managed to
AK>  AK> compile the cpmd2cube by simply typing "make" within the
AK>  AK> "cpmd2cube-v0.1.1" folder (with no changes made to the cpmd2cube
AK>  AK> "Makefile").
AK>  AK> 
AK>  AK> Afterwhich, I've tried to convert the binary DENSITY file generated
AK>  AK> from the h2o exercise (this is in order to display the Kohn-Sham
AK>  AK> Orbitals), using the following command:
AK>  AK> 
AK>  AK> > ./cpmd2cube DENSITY
AK>  AK> 
AK>  AK> The following error message came out:
AK>  AK> 
AK>  AK> Illegal instruction (core dumped)
AK>  
AK>  that usually means you have compiled for the wrong platform.
AK>  my guess is, you are running on an AIX machine, right?
AK>  
AK>  if yes, please remove the -qarch=pwr2 flags,
AK>  replace -lesslp2 with -lessl, delete all object files,
AK>  and recompile.
AK>  
AK>  oh and olegs comment about havin to use -dens or -rho 
AK>  applies as well.
AK>  
AK>  axel.
AK>  
AK>  AK> 
AK>  AK> Why is this so?  The manual (S. 10.1.2) mentioned the conversion of
AK>  AK> WANNIER files only, am I missing or misinterpreting anything?  
AK>  ThanksAK> for your attention.
AK>  AK> 
AK>  AK> 
AK>  AK> Adrian
AK>  AK> 
AK>  
AK>  -- 
AK>  
AK>  
AK>  =======================================================================
AK>  Dr. Axel Kohlmeyer                        e-mail: axel.kohlmeyer at rub.de
AK>  Lehrstuhl fuer Theoretische Chemie          Phone: ++49 (0)234/32-26673
AK>  Ruhr-Universitaet Bochum - NC 03/53         Fax:   ++49 (0)234/32-14045
AK>  D-44780 Bochum  http://www.theochem.ruhr-uni-bochum.de/~axel.kohlmeyer/
AK>  =======================================================================
AK>  
AK>  
AK>  _______________________________________________
AK>  CPMD-list mailing list
AK>  CPMD-list at cpmd.org
AK>  http://www.cpmd.org/mailman/listinfo/cpmd-list
AK>  
AK> 

-- 


=======================================================================
Dr. Axel Kohlmeyer                        e-mail: axel.kohlmeyer at rub.de
Lehrstuhl fuer Theoretische Chemie          Phone: ++49 (0)234/32-26673
Ruhr-Universitaet Bochum - NC 03/53         Fax:   ++49 (0)234/32-14045
D-44780 Bochum  http://www.theochem.ruhr-uni-bochum.de/~axel.kohlmeyer/
=======================================================================

-------------- next part --------------
#-----------------------------------------------------------------------------#
# Makefile for cpmd2cube.x
# Configuration: IBM-AIX
# Creation of Makefile: May 25 2004
# on Linux monteverdi.theochem.ruhr-uni-bochum.de 2.4.20-20.7 #1 Mon Aug 18 15:05:54 EDT 2003 i686 unknown
# Author: monteverdi.theochem.ruhr-uni-bochum.de!akohlmey
#----------------------------------------------------------------------------
#
SHELL = /bin/sh
#
#--------------- Configuration
FC	= xlf90
FFLAGS	= -WF,"-D__AIX,-DFFT_ESSL" -qsuffix=cpp=F -O -qmaxmem=32768 
LFLAGS	= -O -bmaxdata:32768000000 -bmaxstack:1500000000
LIBS	=  -lessl
#--------------- End of Configuration
##############

EXE	= cpmd2cube.x

OBJECTS	= \
    kinds.o periodic_table.o util.o grids.o cpmd2cube.o \
    main.o grid_types.o atom_types.o readwrites.o       \
    fftsg_lib.o fft_tools.o fftsg.o

CFGDEST = .
CFGMACH = IBM-AIX
SRC=.
VPATH = $(SRC)

#############################

$(EXE): $(OBJECTS)
	 $(FC) -o $(EXE) $(LFLAGS) $(OBJECTS) $(LIBS)

#############################
clean:
	rm -f *.o *.mod *.L *~

# Create a new makefile with new dependencies but retain the configuration.
reconfig:
	( cd $(SRC) ; ./Configure -r -m -SRC=$(SRC) -DEST=$(CFGDEST) $(CFGMACH) ; cd $(CFGDEST) )

#############################
atom_types.o:  atom_types.F
	$(FC) -c $(FFLAGS) $*.F

cpmd2cube.o:   cpmd2cube.F
	$(FC) -c $(FFLAGS) $*.F

fft_tools.o:   fft_tools.F
	$(FC) -c $(FFLAGS) $*.F

grid_types.o:  grid_types.F
	$(FC) -c $(FFLAGS) $*.F

grids.o:       grids.F
	$(FC) -c $(FFLAGS) $*.F

main.o:        main.F
	$(FC) -c $(FFLAGS) $*.F

periodic_table.o: periodic_table.F
	$(FC) -c $(FFLAGS) $*.F

readwrites.o:  readwrites.F
	$(FC) -c $(FFLAGS) $*.F

util.o:       util.F
	$(FC) -c $(FFLAGS) $*.F

kinds.o:      kinds.F
	$(FC) -c $(FFLAGS) $*.F

fftsg.o:      fftsg.F
	$(FC) -c $(FFLAGS) $*.F

fftsg_lib.o:  fftsg_lib.F
	$(FC) -c $(FFLAGS) $*.F

# Dependencies
atom_types.o:  kinds.o \
		periodic_table.o

cpmd2cube.o:   atom_types.o \
		fft_tools.o \
		grid_types.o \
		grids.o \
		kinds.o \
		periodic_table.o \
		readwrites.o \
		util.o

fft_tools.o:   grid_types.o \
		fftsg_lib.o \
		kinds.o

grid_types.o:  kinds.o

grids.o:       grid_types.o \
		kinds.o \
		util.o

main.o:        cpmd2cube.o

periodic_table.o: kinds.o

readwrites.o:  atom_types.o \
		grid_types.o \
		kinds.o

util.o:       kinds.o



More information about the CPMD-list mailing list