[CPMD-list] Help on compiling parallel executable cpmd.x!
Axel Kohlmeyer
akohlmey at vitae.cmm.upenn.edu
Sun Nov 6 18:36:26 CET 2005
On Mon, 7 Nov 2005, [gb2312] Shangyi Ma wrote:
SM> Dear cpmd user:
SM> I meet an tricky problem when I compile the cpmd3.9.2 paralle
SM> executable cpmd.x program and need your help! My PC computer is
SM> intel p4 2.4G with Redhat9.0 system. The detail step that I complied
SM> follows:
SM> Firstly, I install the pgi5.2 compiler, when I type pgf90, it display
SM> "pgf90-Warning-No files to process"
SM> so I think I install it successfully!
please take note, that the pgi v5.2 pgf90 compiler miscompiles some
parts of cpmd (it does not seem to affect 'normal' CP-MD with
norm-conserving pseudopotentials, but the ultra-soft psp code is
definitely affected). pgi-v6.0 seems to cure that. using pgf77 instead
of pgf90 might also help (they are almost two different compilers), but
for that you have to remove -D__pgf90 from the CPPFLAGS definition.
nevertheless, this does not affect the compilation problem,
you are reporting.
SM>
SM> Secondly, I compile lam-mpi-7.1.1 with pgi compiler like this:
SM> "# export FC=pgf90
SM> # export CC=pgcc
SM> #export CXX=pgCC", and then "configure ....make...make install" it. I verify the installation with typing
SM> "# mpif77
SM> # pgf90-Warning-No files to process "
that proves only, that your mpif77 calls pgf90. can you compile
and run any of the MPI test examples that ship with lam?
SM> And then I make the Makefile with PC-PGI-MPI. The head of the Make file like this:
SM>
SM> FFLAGS = -Mr8 -pc=64 -tp p7
SM> LFLAGS = -llapack -lblas $(QMMM_LIBS)
please don't use -llapack -lblas unless you want
to actively waste cpu time.
[...]
SM> "..............................................
SM> ...........................................
SM> t_kpoint_p.o dnlpdk_p.o rnl_dk_p.o kpert_potential_p.o up3_p.o friesner_c_p.o matrix_p.o ks_ener_p.o kpert_util_p.o fukui_p.o mdfile.o kdp_diag.o kdp_prep.o kdp_rho.o kdp_stress_kin.o kdpoints.o rhoofr_kdp.o mm_detsp.o mm_init.o mm_dim.o mm_qmmm_forcedr.o mm_mdmain.o mm_coninp.o mm_cpmd_add_MM_forces_f77.o mm_cpmd_esp_charges_f77.o mm_cpmd_ext_pot_f77.o mm_mddiag.o mm_forces_diag.o mm_rho_forcedr.o vdwin.o vdw.o bs_forces_diag.o bswfo.o lsforce.o setbsstate.o
SM> wrccfl.o sysdepend.o -L. -latlas
hmmm. there is some inconsistency. your makefile snippet from above
had -llapack -lblas, where this one uses -L. -latlas. is there
something else you changed??
SM> my_para.o(.text+0x20): In function `my_start_':
SM> : undefined reference to `mpi_init_'
SM> my_para.o(.text+0x134f): In function `my_end_':
SM> : undefined reference to `mpi_finalize_'
this looks as if you are linking to an mpi library that
was compiled for g77 and thus has mpi_comm_group__ instead
for mpi_comm_group_ and so on. you should check whether
you have actually _two_ installations of lam, or whether
there was an old installation, that was not completely
removed. since you are on a redhat installation, you
should not needlessly compile package manually, but
use (and if needed re-build) and install rpm packages.
this way you can avoid these overlaps and inconsistencies.
i have posted cpmd compatible lam/mpi rpms (for several years now) at
http://www.theochem.ruhr-uni-bochum.de/~axel.kohlmeyer/cpmd-linux.html#mpi
to use them with pgi you just use mpipgf77 or mpipgf90 instead of mpif77.
SM> So what's wrong with my compilation? I had compiled the parallel
SM> executable cpmd.x successfully half year ago as the same the step
SM> above. So there must be some step or option I missed this time!
SM> Could anyone help me check out my steps and solve the problem?
SM> Any comments is appreciated!
if you don't want to change your installation, you can try using
the -Msecond_underscore flag that will make pgf77/pgf90 use g77/f2c
compatible underscoring semantics. note that you have to do
a 'make clean' to remove all objects after making a change to
the makefile.
regards,
axel.
SM> Best regards!
SM> shyma
--
=======================================================================
Axel Kohlmeyer e-mail: akohlmey at cmm.upenn.edu, web: 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.
More information about the CPMD-list
mailing list