[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ESPResSo-devel] Re: gnu autotools
From: |
Yang Ye |
Subject: |
Re: [ESPResSo-devel] Re: gnu autotools |
Date: |
Sun, 04 Nov 2007 01:43:25 +0800 |
User-agent: |
Thunderbird 2.0.0.6 (Windows/20070728) |
Hi,
I finally found out that the reason. It's my mistake that I have put a
wrong source filename into the Makefile-am.am.
Running autogen.sh could be omitted if you are confidently changing
Makefile-am.am and Makefile-am.in following the pattern of other source
files.
Regards,
Yang Ye
On 11/4/2007 12:30 AM, Yang Ye wrote:
Hi, Olaf
I have added the two files e.g., foo.c and foo.h to the
Espresso_bin_SOURCES in Makefile-am.am and runned ./autogen.
make has then notified me about unable to make target for foo.o
because it tries to call
gcc foo.o -o foo.o
The first foo.o shall be foo.c. Is there anything else that I need to
change for it to work?
Regards,
Yang Ye
On 11/3/2007 4:43 AM, Olaf Lenz wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
Hello!
I would like know how the developers have generated the configure and
makefile with GNU autotools.
I have included additional commands into the program and hope the
makefile could include additional C source file.
For the future, please use one of ESPResSo's mailing lists for this kind
of questions:
https://fias.uni-frankfurt.de/mailman/listinfo/espresso
https://fias.uni-frankfurt.de/mailman/listinfo/espresso-devel
The build system is sparsely documented in the developer's guide, which
you can find in the subdirectory doc/dg/ of the CVS version or any
recent ESPResSo distribution.
The short answer is: You will have to add your file to "Makefile-am.am"
and run "autogen.sh". Afterwards, you can use configure and make as
usual.
Cheers
Olaf
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
iD8DBQFHK4uftQ3riQ3oo/oRAxBCAJ4pFDs9Ztw0bmw91mTKZmwbBgVojQCcDy/a
ap7li2VwDCF1BPltWPjyxtI=
=DHMQ
-----END PGP SIGNATURE-----
_______________________________________________
ESPResSo-devel mailing list
address@hidden
https://fias.uni-frankfurt.de/mailman/listinfo/espresso-devel
#include "stdio.h"
#include "stdlib.h"
#ifdef HAVE_CONFIG_H
#undef HAVE_CONFIG_H
#include "xtcio.h"
#define HAVE_CONFIG_H
#else
#include "xtcio.h"
#endif
#include "grid.h"
#include "particle_data.h"
#include "integrate.h"
#include "communication.h"
#include "xtc_writer.h"
int xfile = -1;
char *xfilename = NULL;
long step = -1;
#define CONV_UNIT_L(x) (x/10.0); /*from A to nm*/
int xtc_init(ClientData data, Tcl_Interp *interp, int argc, char **argv)
{
if (argc>1) {
xfilename=argv[1];
}
else {
xfilename="traj.xtc";
}
if (xfile!=-1) {
close_xtc(xfile);
}
xfile = open_xtc(xfilename, "w");
step = 0;
Tcl_AppendResult(interp, "XTC: New file opened", (char *)NULL);
return TCL_OK;
}
int xtc_write(ClientData data, Tcl_Interp *interp, int argc, char **argv) {
matrix mat;
int i;
rvec *x_data;
double ppos[3];
int img[3];
int pnode;
Particle p_data;
char buffer[50 + TCL_DOUBLE_SPACE + TCL_INTEGER_SPACE];
if (xfile==-1) {
Tcl_AppendResult(interp, "XTC: Did you initialize xtc with a file?",
(char *)NULL);
return TCL_ERROR;
}
if (n_total_particles<1) {
Tcl_AppendResult(interp, "XTC: Insufficient particle number", (char
*)NULL);
return TCL_ERROR;
}
mat[0][0] = CONV_UNIT_L(box_l[0]);
mat[0][1] = 0.0;
mat[0][2] = 0.0;
mat[1][0] = 0.0;
mat[1][1] = CONV_UNIT_L(box_l[1]);
mat[1][2] = 0.0;
mat[2][0] = 0.0;
mat[2][1] = 0.0;
mat[2][2] = CONV_UNIT_L(box_l[2]);
x_data = (rvec *)malloc(sizeof(rvec)*(max_seen_particle+1));
if (!particle_node) {
build_particle_node();
}
Tcl_AppendResult(interp, "XTC: Extracting Data\n", (char *)NULL);
for (i = 0; i < max_seen_particle+1; i++) {
pnode = particle_node[i];
if (pnode == -1) {
Tcl_PrintDouble(interp, i, buffer);
Tcl_AppendResult(interp, "XTC: skipping atom #", buffer, "\n", (char
*)NULL);
x_data[i][0] = x_data[i][1] = x_data[i][2] = 0.0;
continue;
}
mpi_recv_part(pnode, i, &p_data);
memcpy(ppos, p_data.r.p, 3*sizeof(double));
memcpy(img, p_data.l.i, 3*sizeof(int));
unfold_position(ppos, img);
x_data[i][0] = CONV_UNIT_L(ppos[0]);
x_data[i][1] = CONV_UNIT_L(ppos[1]);
x_data[i][2] = CONV_UNIT_L(ppos[2]);
}
write_xtc(xfile, max_seen_particle+1, step, sim_time, mat, x_data, 1000);
step++;
Tcl_PrintDouble(interp, max_seen_particle+1, buffer);
Tcl_AppendResult(interp, "XTC: Wrote ", buffer, (char *)NULL);
Tcl_PrintDouble(interp, step, buffer);
Tcl_AppendResult(interp, " atoms for frame #", buffer, (char *)NULL);
Tcl_PrintDouble(interp, sim_time, buffer);
Tcl_AppendResult(interp, " @ time ", buffer, "\n", (char *)NULL);
free(x_data);
return TCL_OK;
}
int xtc_close(ClientData data, Tcl_Interp *interp, int argc, char **argv) {
if (xfile!=-1) {
close_xtc(xfile);
xfile = -1;
Tcl_AppendResult(interp, "XTC: File closed", (char *)NULL);
return TCL_OK;
} else {
Tcl_AppendResult(interp, "XTC: No File is closed", (char *)NULL);
return TCL_ERROR;
}
}
#ifndef XTC_WRITER_H
#define XTC_WRITER_H
#include <tcl.h>
int xtc_init(ClientData data, Tcl_Interp *interp, int argc, char **argv);
int xtc_write(ClientData data, Tcl_Interp *interp, int argc, char **argv);
int xtc_close(ClientData data, Tcl_Interp *interp, int argc, char **argv);
#endif
- [ESPResSo-devel] Re: gnu autotools, Yang Ye, 2007/11/03
- Re: [ESPResSo-devel] Re: gnu autotools,
Yang Ye <=
- Re: [ESPResSo-devel] Re: gnu autotools, Olaf Lenz, 2007/11/03
- Re: [ESPResSo-devel] Re: gnu autotools, Yang Ye, 2007/11/03
- Re: [ESPResSo-devel] Re: gnu autotools, Olaf Lenz, 2007/11/03
- Re: [ESPResSo-devel] Re: gnu autotools, Yang Ye, 2007/11/03
- Re: [ESPResSo-devel] Re: gnu autotools, Olaf Lenz, 2007/11/06
- Re: [ESPResSo-devel] Re: gnu autotools, Yang Ye, 2007/11/06