Commit 62846b89 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

grid update

parent 584bba0a
......@@ -761,9 +761,10 @@ int main(int argc, char *argv[])
char jobname[1024];
char jobfilename[1024];
FILE *jobfilep;
int ftpget(const char *target, const char *source);
commandline[0] = 0;
strcat(commandline, "/pf/m/m214003/cdt/work/cdo/src/cdo ");
strcat(commandline, "/pf/m/m214003/cdt/work/cdo/build/GRID_AMD64/src/cdo ");
for ( i = 1; i < argc; i++ )
{
strcat(commandline, argv[i]);
......@@ -786,10 +787,12 @@ int main(int argc, char *argv[])
fprintf(jobfilep, "#! /bin/bash\n");
fprintf(jobfilep, "uname -s\n");
fprintf(jobfilep, "pwd\n");
fprintf(jobfilep, "cd tmp\n");
fprintf(jobfilep, "ls -l /pf/m/m214003/tmp\n");
fprintf(jobfilep, "cd /scratch/small/m214/m214003/tmp\n");
fprintf(jobfilep, "cd /pf/m/m214003/tmp\n");
fprintf(jobfilep, "rm -f %s\n", cdojobfiles);
fprintf(jobfilep, "echo $LD_LIBRARY_PATH\n");
fprintf(jobfilep, "setenv LD_LIBRARY_PATH /opt/gridware/sge/lib/lx24-x86:$LD_LIBRARY_PATH\n");
fprintf(jobfilep, "setenv LD_LIBRARY_PATH /opt/gridware/sge/lib/lx24-amd64:$LD_LIBRARY_PATH\n");
fprintf(jobfilep, "%s\n", commandline);
fclose(jobfilep);
......@@ -800,6 +803,8 @@ int main(int argc, char *argv[])
sprintf(commandline, "rm -r %s\n", jobfilename);
system(commandline);
ftpget(cdojobfiles, cdojobfiles);
}
else
{
......
......@@ -1506,17 +1506,17 @@ int gridFromName(const char *gridname)
}
#if defined (HAVE_LIBNETCDF)
static void nce(int istat)
{
/*
This routine provides a simple interface to netCDF error message routine.
*/
#if defined (HAVE_LIBNETCDF)
if ( istat != NC_NOERR ) cdoAbort(nc_strerror(istat));
#endif
}
#endif
int gridFromNCfile(const char *gridfile)
{
......
......@@ -234,7 +234,7 @@ void job_submit(const char *expname, const char *jobfilename, const char *jobnam
#endif
struct FtpFile {
char *filename;
const char *filename;
FILE *stream;
};
......@@ -250,15 +250,20 @@ int my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream)
}
int ftpput()
int ftpget(const char *target, const char *source)
{
#if defined (HAVE_LIBCURL)
CURL *curl;
CURLcode res;
struct FtpFile ftpfile={
"b_eff.c", /* name to store the file as if succesful */
NULL, /* name to store the file as if succesful */
NULL
};
char filename[8196] = "ftp://qftps.zmaw.de/pf/m/m214003/tmp/";
strcat(filename, source);
ftpfile.filename = target;
curl_global_init(CURL_GLOBAL_DEFAULT);
......@@ -277,8 +282,7 @@ int ftpput()
curl_easy_setopt(curl, CURLOPT_SSLKEYPASSWD, "");
curl_easy_setopt(curl, CURLOPT_URL,
"ftp://qftps.zmaw.de/small/m214/m214089/benchmark/b_eff.c");
curl_easy_setopt(curl, CURLOPT_URL, filename);
/* define callback */
......
......@@ -719,9 +719,15 @@ void pstreamClose(int pstreamID)
{
if ( pstreamptr->mode == 'w' )
{
extern const char *cdojobfiles;
FILE *fp = fopen(cdojobfiles, "a");
fprintf(fp, "%s\n", pstreamptr->name);
fclose(fp);
/*
fprintf(stderr, "start data transfer of %s\n", pstreamptr->name);
fprintf(stderr, "finish data transfer of %s\n", pstreamptr->name);
fprintf(stderr, "remove remote file %s\n", pstreamptr->name);
*/
}
}
......
......@@ -14,10 +14,6 @@
#define RESTRICT_LATLON 2
#define DEG2RAD (PI/180.) /* conversion for deg to rad */
#define RAD2DEG (180./PI) /* conversion for rad to deg */
typedef struct {
int pinit; /* TRUE if the pointers are initialized */
int gridID1;
......
......@@ -71,7 +71,7 @@
#define QUART 0.25
#define BIGNUM 1.e+20
#define TINY 1.e-14
#define PI 3.14159265359
#define PI M_PI
#define PI2 TWO*PI
#define PIH HALF*PI
......@@ -5182,17 +5182,16 @@ void reorder_links(REMAPVARS *rv)
#endif
#if defined (HAVE_LIBNETCDF)
static void nce(int istat)
{
/*
This routine provides a simple interface to netCDF error message routine.
*/
#if defined (HAVE_LIBNETCDF)
if ( istat != NC_NOERR ) cdoAbort(nc_strerror(istat));
#endif
}
#endif
void write_remap_scrip(const char *interp_file, int map_type, REMAPGRID rg, REMAPVARS rv)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment