Quickly building CP2K under Ubuntu 11.10.
Milky Way
tobias... at googlemail.com
Tue Mar 27 21:04:26 UTC 2012
Hi,
I reinstalled Ubuntu once again today. Your description really works
well for dummies :D
Besides the packages listed I had to install the packages byacc,
bison, flex and of course subversion...
Greetings :D
On 27 Mrz., 10:49, Urban Borštnik <urban.b... at gmail.com> wrote:
> Hi,
>
> CP2K 2.2, without HFX for Ubuntu (11.10). I just tested this. It's not
> the fastest possible but it quickly gets you something to work with.
>
> 1. Install the required packages (this will also pull in some
> dependencies):
> sudo aptitude install gfortran libatlas-base-dev libscalapack-mpi-dev libfftw3-dev
>
> 2. Check out CP2K from SVN
> svn cohttps://cp2k.svn.sourceforge.net/svnroot/cp2kcp2k
>
> 3. Go to the proper directory (e.g., for 2.2):
> cd cp2k/branches/cp2k-2_2-branch/cp2k/arch
>
> 4. For pre-trunk builds (i.e., 2.2) take the __FILE__ out
> of ../src/cp_common_uses; this is fixed in the the SVN trunk. Simply
> remove the __FILE__// from ~ line 25 to read
> #define CPSourceFileRef ' line '//cp_to_string(__LINE__)
>
> 5. Build! (For faster builds, change 4 to reflect number of cores.)
> make -j 4 -f ../makefiles/Makefile ARCH=Linux-x86-64-gfortran.sopt VERSION=sopt
>
> 6. For a parallel version use the following Linux-x86-64-gfortran.popt
> arch file:
>
> #--- cut ---#
> CC = cc
> CPP =
> FC = mpif90
> LD = mpif90
> AR = ar -r
> DFLAGS = -D__GFORTRAN -D__FFTSG -D__parallel -D__BLACS -D__SCALAPACK -D__FFTW3
> CPPFLAGS =
> FCFLAGS = $(DFLAGS) -ffree-form -O2 -ffast-math -funroll-loops -ftree-vectorize -march=native -g
> LDFLAGS = $(FCFLAGS)
> LIBS = -lscalapack-openmpi \
> -lblacsF77init-openmpi -lblacs-openmpi \
> -lfftw3 \
> -llapack \
> -lblas
>
> OBJECTS_ARCHITECTURE = machine_gfortran.o
> #--- cut ---#
>
> 7. Build!
> make -j 4 -f ../makefiles/Makefile ARCH=Linux-x86-64-gfortran.opt VERSION=popt
>
> I just tested this. I see some issues with OpenMPI taking a lot of
> system time so using only 2 cores on my 4-core desktop seems to be
> fastest.
>
> If you want faster executables then I suggest you rebuild ATLAS from
> scratch (as you already have--you can just use that) and then build
> libsmm (please look at the INSTALL file for hints; it's built on top of
> BLAS so you should have a nice BLAS first). You might also look into
> installing other BLAS/Lapack libraries such as OpenBLAS, Intel MKL,
> ACML, ... .
>
> Cheers,
> Urban.
>
>
>
>
>
>
>
> On Mon, 2012-03-26 at 10:47 -0700, Milky Way wrote:
> > Hi,
>
> > my lecturer came up with some examples running cp2k some time ago in
> > my classes. I liked it, so I decieded to give it a try. I removed
> > Windows from my disk and installed Ubuntu 12.04 on my disk and I like
> > it quite a bit, though I am not an expert.
>
> > Unfortunately I get errors while compiling.
>
> > I follow these instructions:http://billbrouwer.wordpress.com/2009/04/08/cp2k-install-howto/
>
> > I managed the first four steps
>
> > In step 5 I renamed and edited the Linux-x86-64-g95.sopt file into
> > foo.sopt. It now looks like:
>
> > CC = cc
> > CPP =
> > FC = gfortran
> > LD = gfortran
> > AR = ar -r
>
> > DFLAGS = -D__G95 -D__FFTSG -D__FFTW3 -D__LIBINT
> > CPPFLAGS =
> > FCFLAGS = $(DFLAGS) -I$(G95_INC) -ffree-form -O2 -ffast-math -
> > march=opteron -cpp -g
> > LDFLAGS = $(FCFLAGS)
> > LIBS = /usr/local/atlas/lib/liblapack.a \
> > /usr/local/atlas/lib/libf77blas.a \
> > /usr/local/atlas/lib/libcblas.a \
> > /usr/local/atlas/lib/libatlas.a \
> > $/usr/local/lib/libfftw3.a \
> > -lstdc++ -lpthread
>
> > OBJECTS_ARCHITECTURE = machine_g95.o
>
> > Then I run make ARCH=foo VERSION=sopt and get the following output:
>
> > tobias at brutus:~/cp2k-2_2-branch/cp2k/makefiles$ make ARCH=foo
> > VERSION=sopt
> > tail: cannot open `/home/tobias/cp2k-2_2-branch/cp2k/makefiles/../src/
> > CVS/Entries' for reading: No such file or directory
> > make LDFLAGS= -C /home/tobias/cp2k-2_2-branch/cp2k/makefiles/../obj/
> > foo/tools -f /home/tobias/cp2k-2_2-branch/cp2k/makefiles/../makefiles/
> > Makefile makedepf90
> > tail: cannot open `/home/tobias/cp2k-2_2-branch/cp2k/makefiles/../src/
> > CVS/Entries' for reading: No such file or directory
> > make[1]: Entering directory `/home/tobias/cp2k-2_2-branch/cp2k/obj/foo/
> > tools'
> > test -d /home/tobias/cp2k-2_2-branch/cp2k/makefiles/../obj/foo/tools/
> > makedepf90-build || cp -r /home/tobias/cp2k-2_2-branch/cp2k/
> > makefiles/../tools/makedepf90 makedepf90-build
> > { cd makedepf90-build ; ./configure --prefix=/home/tobias/cp2k-2_2-
> > branch/cp2k/makefiles/../obj/foo/tools --bindir=/home/tobias/cp2k-2_2-
> > branch/cp2k/makefiles/../obj/foo/tools ; make VERSION="2.8.8cp2k" ;
> > make install ; }
> > checking for gcc... gcc
> > checking for C compiler default output file name... a.out
> > checking whether the C compiler works... yes
> > checking whether we are cross compiling... no
> > checking for suffix of executables...
> > checking for suffix of object files... o
> > checking whether we are using the GNU C compiler... yes
> > checking whether gcc accepts -g... yes
> > checking for gcc option to accept ANSI C... none needed
> > checking for flex... flex
> > checking for yywrap in -lfl... yes
> > checking lex output file root... lex.yy
> > checking whether yytext is a pointer... yes
> > checking for bison... bison -y
> > checking for a BSD-compatible install... /usr/bin/install -c
> > checking how to run the C preprocessor... gcc -E
> > checking for egrep... grep -E
> > checking for working alloca.h... yes
> > checking for alloca... yes
> > checking for strcasecmp... yes
> > configure: creating ./config.status
> > config.status: creating Makefile
> > config.status: creating config.h
> > config.status: config.h is unchanged
> > make[2]: Entering directory `/home/tobias/cp2k-2_2-branch/cp2k/obj/foo/
> > tools/makedepf90-build'
> > gcc -c -g -O2 -DVERSION=\"2.8.8cp2k\" errormesg.c
> > gcc -c -g -O2 -DVERSION=\"2.8.8cp2k\" list.c
> > gcc -c -g -O2 -DVERSION=\"2.8.8cp2k\" macro.c
> > gcc -c -g -O2 -DVERSION=\"2.8.8cp2k\" main.c
> > gcc -c -g -O2 -DVERSION=\"2.8.8cp2k\" modfile_name.c
> > gcc -c -g -O2 -DVERSION=\"2.8.8cp2k\" utils.c
> > gcc -c -g -O2 -DVERSION=\"2.8.8cp2k\" xmalloc.c
> > bison -y find_dep.y
> > mv -f y.tab.c find_dep.c
> > gcc -c -g -O2 -DVERSION=\"2.8.8cp2k\" find_dep.c
> > flex -i -B -t lexer.l > lexer.c
> > lexer.l:143: warning, rule cannot be matched
> > gcc -c -g -O2 -DVERSION=\"2.8.8cp2k\" lexer.c
> > gcc -o makedepf90 -DVERSION=\"2.8.8cp2k\" -g -O2 errormesg.o list.o
> > macro.o main.o modfile_name.o utils.o xmalloc.o find_dep.o lexer.o
> > make[2]: Leaving directory `/home/tobias/cp2k-2_2-branch/cp2k/obj/foo/
> > tools/makedepf90-build'
> > make[2]: Entering directory `/home/tobias/cp2k-2_2-branch/cp2k/obj/foo/
> > tools/makedepf90-build'
> > /usr/bin/install -c -d /home/tobias/cp2k-2_2-branch/cp2k/makefiles/../
> > obj/foo/tools
> > /usr/bin/install -c makedepf90 /home/tobias/cp2k-2_2-branch/cp2k/
> > makefiles/../obj/foo/tools
> > /usr/bin/install -c -d /home/tobias/cp2k-2_2-branch/cp2k/makefiles/../
> > obj/foo/tools/man/man1
> > /usr/bin/install -c -m 644 makedepf90.1 /home/tobias/cp2k-2_2-branch/
> > cp2k/makefiles/../obj/foo/tools/man/man1
> > make[2]: Leaving directory `/home/tobias/cp2k-2_2-branch/cp2k/obj/foo/
> > tools/makedepf90-build'
> > make[1]: Leaving directory `/home/tobias/cp2k-2_2-branch/cp2k/obj/foo/
> > tools'
> > make -C /home/tobias/cp2k-2_2-branch/cp2k/makefiles/../src -f /home/
> > tobias/cp2k-2_2-branch/cp2k/makefiles/../makefiles/Makefile all.dep
> > tail: cannot open `/home/tobias/cp2k-2_2-branch/cp2k/makefiles/../src/
> > CVS/Entries' for reading: No such file or directory
> > make[1]: Entering directory `/home/tobias/cp2k-2_2-branch/cp2k/src'
> > /home/tobias/cp2k-2_2-branch/cp2k/makefiles/../obj/foo/tools/
> > makedepf90 -m "%m.mod" -free admm_methods.F admm_types.F ai_angmom.F
> > ai_coulomb.F ai_coulomb_test.F ai_derivatives.F ai_elec_field.F
> > ai_eri_debug.F ai_fermi_contact.F ai_geminals.F ai_geminals_debug.F
> > ai_geminals_utils.F ai_kinetic.F ai_moments.F ai_onecenter.F
> > ai_oneelectron.F ai_os_rr.F ai_overlap_new.F ai_overlap_ppl.F
> > ai_spin_orbit.F ai_verfc.F atom.F atom_basis.F
> > atom_electronic_structure.F atom_energy.F atom_fit.F
> > atom_kind_orbitals.F atom_operators.F atom_optimization.F
> > atom_output.F atom_pseudo.F atom_types.F atom_utils.F atom_xc.F
> > atomic_charges.F atomic_kind_list_types.F atomic_kind_types.F
> > atoms_input.F atprop_types.F averages_types.F barostat_types.F
> > barostat_utils.F basis_set_types.F bessel_lib.F beta_gamma_psi.F
> > bfgs_optimizer.F bibliography.F block_p_types.F bsse.F c_mpi_calls.F
> > cell_opt.F cell_opt_types.F cell_opt_utils.F cell_types.F
> > cg_optimizer.F cg_test.F cg_utils.F cluster_buffers.F
> > cluster_methods.F cluster_types.F colvar_methods.F colvar_types.F
> > colvar_utils.F constraint.F constraint_3x3.F constraint_4x6.F
> > constraint_clv.F constraint_fxd.F constraint_util.F constraint_vsite.F
> > core_ae.F core_ppl.F core_ppnl.F cp2k_debug.F cp2k_info.F cp2k_runs.F
> > cp_array_i_utils.F cp_array_logical_utils.F cp_array_r_utils.F
> > cp_array_utils.F cp_blacs_calls.F cp_blacs_env.F cp_cfm_basic_linalg.F
> > cp_cfm_diag.F cp_cfm_types.F cp_control_types.F cp_control_utils.F
> > cp_dbcsr_cholesky.F cp_dbcsr_diag.F cp_dbcsr_interface.F
> > cp_dbcsr_methods.F cp_dbcsr_operations.F cp_dbcsr_output.F
> > cp_dbcsr_types.F cp_dbcsr_xlat.F cp_ddapc.F cp_ddapc_forces.F
> > cp_ddapc_methods.F cp_ddapc_types.F cp_ddapc_util.F
> > cp_error_handling.F cp_external_control.F cp_files.F
> > cp_fm_basic_linalg.F cp_fm_cholesky.F cp_fm_diag.F cp_fm_pool_types.F
> > cp_fm_struct.F cp_fm_types.F cp_fm_vect.F cp_iter_types.F cp_lbfgs.F
> > cp_lbfgs_geo.F cp_lbfgs_optimizer_gopt.F cp_linked_list_3d_r.F
> > cp_linked_list_char.F cp_linked_list_fm.F cp_linked_list_int.F
> > cp_linked_list_logical.F cp_linked_list_pw.F cp_linked_list_real.F
> > cp_linked_list_rs.F cp_linked_list_val.F cp_linked_list_xc_deriv.F
> > cp_log_handling.F cp_ma_interface.F cp_output_handling.F cp_para_env.F
> > cp_para_types.F cp_parser_buffer_types.F cp_parser_ilist_methods.F
> > cp_parser_ilist_types.F cp_parser_inpp_methods.F
> > cp_parser_inpp_types.F cp_parser_methods.F cp_parser_status_types.F
> > cp_parser_types.F cp_result_methods.F cp_result_types.F
> > cp_subsys_methods.F cp_subsys_types.F cp_symmetry.F cp_units.F
> > cpot_types.F csvr_system_dynamics.F csvr_system_init.F
> > csvr_system_mapping.F csvr_system_types.F
>
> ...
>
> Erfahren Sie mehr »
More information about the CP2K-user
mailing list