mirror of
https://github.com/nwchemgit/nwchem.git
synced 2026-07-28 22:25:48 -04:00
Merge pull request #954 from jeffhammond/remove_USE_FCD_new
Remove obsolete USE_FCD and Cray X1 workarounds
This commit is contained in:
commit
973e3e4975
49 changed files with 327 additions and 1451 deletions
|
|
@ -1,29 +1,10 @@
|
|||
/*
|
||||
$Id$
|
||||
*/
|
||||
|
||||
#if defined(CRAY) && !defined(__crayx1)
|
||||
#include <fortran.h>
|
||||
#endif
|
||||
#include "typesf2c.h"
|
||||
|
||||
/* routine to convert a fortran string to a C string: */
|
||||
/* Fortran callable version of f2cstring in global directory */
|
||||
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
void FATR C_CNVT(clen, flen, cfcd, ffcd)
|
||||
Integer *clen, *flen;
|
||||
_fcd cfcd;
|
||||
_fcd ffcd;
|
||||
void c_cnvt_(Integer * clen, Integer * flen, char * cstr, char * fstr)
|
||||
{
|
||||
char *cstr = _fcdtocp(cfcd);
|
||||
char *fstr = _fcdtocp(ffcd);
|
||||
#else
|
||||
void c_cnvt_(clen, flen, cstr, fstr)
|
||||
Integer *clen, *flen;
|
||||
char *cstr;
|
||||
char *fstr;
|
||||
{
|
||||
#endif
|
||||
int flenl, clenl;
|
||||
|
||||
flenl = *flen; clenl = *clen;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
#include <stdlib.h>
|
||||
#include "typesf2c.h"
|
||||
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined(__crayx1) &&!defined(__MINGW32__)
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined(__MINGW32__)
|
||||
#define hcurve_map_ HCURVE_MAP
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ $Id$
|
|||
int hilbert2d(int i, int j, int level);
|
||||
int hilbert_dir(int i, int j, int level, int high, int* start);
|
||||
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined(__crayx1) &&!defined(__MINGW32__)
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined(__MINGW32__)
|
||||
#define pspsolve_ PSPSOLVE
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -30,9 +30,7 @@
|
|||
#include <string.h>
|
||||
#include "typesf2c.h"
|
||||
|
||||
#if !defined(__crayx1)
|
||||
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined(__crayx1) &&!defined(__MINGW32__)
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined(__MINGW32__)
|
||||
#define ascii_cwrite_ ASCII_CWRITE
|
||||
#define ascii_cread_ ASCII_CREAD
|
||||
#define ascii_iwrite_ ASCII_IWRITE
|
||||
|
|
@ -45,8 +43,6 @@
|
|||
#define ascii_closefile_ ASCII_CLOSEFILE
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#define MAX_UNIT 10
|
||||
|
||||
|
|
@ -62,34 +58,16 @@ static FILE* fd[MAX_UNIT]; /* the file descriptor of the pipe */
|
|||
*************************************************************************
|
||||
*/
|
||||
|
||||
void FATR ascii_cwrite_
|
||||
#if defined(USE_FCD)
|
||||
(const Integer *unit, _fcd fcd_c, const Integer *n)
|
||||
void FATR ascii_cwrite_(const Integer *unit, char *c, const Integer *n)
|
||||
{
|
||||
const char *c = _fcdtocp(fcd_c);
|
||||
|
||||
#else
|
||||
(const Integer *unit, char *c, const Integer *n)
|
||||
{
|
||||
#endif
|
||||
|
||||
int j;
|
||||
for (j=0; j<(*n); ++j)
|
||||
(void) fprintf(fd[*unit],"%c ",c[j]);
|
||||
(void) fprintf(fd[*unit],"\n");
|
||||
}
|
||||
|
||||
void FATR ascii_cread_
|
||||
#if defined(USE_FCD)
|
||||
(const Integer *unit, _fcd fcd_c, const Integer *n)
|
||||
void FATR ascii_cread_(const Integer *unit, char *c, const Integer *n)
|
||||
{
|
||||
char *c = _fcdtocp(fcd_c);
|
||||
|
||||
#else
|
||||
(const Integer *unit, char *c, const Integer *n)
|
||||
{
|
||||
#endif
|
||||
|
||||
int j;
|
||||
for (j=0; j<(*n); ++j)
|
||||
(void) fscanf(fd[*unit],"%c ",&c[j]);
|
||||
|
|
@ -155,18 +133,8 @@ void FATR ascii_ishift_fileptr_(const Integer *unit, const Integer *n)
|
|||
|
||||
#define FUDGE_FACTOR (8)
|
||||
|
||||
void FATR ascii_openfile_
|
||||
#if defined(USE_FCD)
|
||||
(const Integer *unit, _fcd fcd_filename, Integer *n1, _fcd fcd_mode, Integer *n2)
|
||||
void FATR ascii_openfile_(const Integer *unit, char *filename, Integer *n1, char *mode, Integer *n2)
|
||||
{
|
||||
const char *filename = _fcdtocp(fcd_filename);
|
||||
const char *mode = _fcdtocp(fcd_mode);
|
||||
|
||||
#else
|
||||
(const Integer *unit, char *filename, Integer *n1, char *mode, Integer *n2)
|
||||
{
|
||||
#endif
|
||||
|
||||
char *file = (char *) malloc(*n1+1);
|
||||
|
||||
(void) strncpy(file, filename, *n1);
|
||||
|
|
|
|||
|
|
@ -32,14 +32,7 @@
|
|||
#include <string.h>
|
||||
#include "typesf2c.h"
|
||||
|
||||
#if !defined(__crayx1)
|
||||
|
||||
#if defined(CRAY) || defined(CRAY_T3D)
|
||||
#include <fortran.h>
|
||||
#define USE_FCD
|
||||
#endif
|
||||
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined(__crayx1) &&!defined(__MINGW32__)
|
||||
#if (defined(WIN32)) && !defined(__MINGW32__)
|
||||
#define cwrite_ CWRITE
|
||||
#define cread_ CREAD
|
||||
#define iwrite_ IWRITE
|
||||
|
|
@ -53,8 +46,6 @@
|
|||
#define closefile_ CLOSEFILE
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#define MAX_UNIT 10
|
||||
|
||||
|
|
@ -72,21 +63,8 @@ static int ascii[MAX_UNIT];
|
|||
*************************************************************************
|
||||
*/
|
||||
|
||||
void FATR cwrite_
|
||||
#if defined(USE_FCD)
|
||||
(const Integer *unit,
|
||||
_fcd fcd_c,
|
||||
const Integer *n)
|
||||
void FATR cwrite_(const Integer *unit, char *c, const Integer *n)
|
||||
{
|
||||
const char *c = _fcdtocp(fcd_c);
|
||||
|
||||
#else
|
||||
(const Integer *unit,
|
||||
char *c,
|
||||
const Integer *n)
|
||||
{
|
||||
#endif
|
||||
|
||||
if (ascii[*unit])
|
||||
{
|
||||
int j;
|
||||
|
|
@ -94,25 +72,13 @@ void FATR cwrite_
|
|||
(void) fprintf(fd[*unit],"%c ",c[j]);
|
||||
(void) fprintf(fd[*unit],"\n");
|
||||
}
|
||||
else
|
||||
else {
|
||||
(void) fwrite(c, sizeof(char), *n, fd[*unit]);
|
||||
}
|
||||
}
|
||||
|
||||
void FATR cread_
|
||||
#if defined(USE_FCD)
|
||||
(const Integer *unit,
|
||||
_fcd fcd_c,
|
||||
const Integer *n)
|
||||
void FATR cread_ (const Integer *unit, char *c, const Integer *n)
|
||||
{
|
||||
char *c = _fcdtocp(fcd_c);
|
||||
|
||||
#else
|
||||
(const Integer *unit,
|
||||
char *c,
|
||||
const Integer *n)
|
||||
{
|
||||
#endif
|
||||
|
||||
if (ascii[*unit])
|
||||
{
|
||||
int j;
|
||||
|
|
@ -209,25 +175,11 @@ void FATR flush_fileptr_(const Integer *unit)
|
|||
|
||||
#define FUDGE_FACTOR (8)
|
||||
|
||||
void FATR openfile_
|
||||
#if defined(USE_FCD)
|
||||
(const Integer *unit,
|
||||
_fcd fcd_filename,
|
||||
Integer *n1,
|
||||
_fcd fcd_mode,
|
||||
Integer *n2)
|
||||
void FATR openfile_(const Integer *unit,
|
||||
char *filename, Integer *n1,
|
||||
char *mode,
|
||||
Integer *n2)
|
||||
{
|
||||
const char *filename = _fcdtocp(fcd_filename);
|
||||
const char *mode = _fcdtocp(fcd_mode);
|
||||
|
||||
#else
|
||||
(const Integer *unit,
|
||||
char *filename, Integer *n1,
|
||||
char *mode,
|
||||
Integer *n2)
|
||||
{
|
||||
#endif
|
||||
|
||||
char *file = (char *) malloc(*n1+1);
|
||||
char *rc, *wc;
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@
|
|||
read(51,*,end=100) gabs(1)
|
||||
end do
|
||||
100 continue
|
||||
#if defined(FUJITSU_SOLARIS) || defined(PSCALE) || defined(__crayx1)|| defined(GCC46)
|
||||
#if defined(FUJITSU_SOLARIS) || defined(PSCALE) || defined(GCC46)
|
||||
backspace 51
|
||||
#endif
|
||||
else
|
||||
|
|
|
|||
|
|
@ -12,14 +12,7 @@
|
|||
#include "pspw_bond.h"
|
||||
#include "pspw_molecule.h"
|
||||
|
||||
#if defined(CRAY) || defined(CRAY_T3D)
|
||||
#include <fortran.h>
|
||||
#if !defined(__crayx1)
|
||||
#define USE_FCD
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined(__crayx1) &&!defined(__MINGW32__)
|
||||
#if (defined(WIN32)) && !defined(__MINGW32__)
|
||||
#define pspw_molecule_read_ PSPW_MOLECULE_READ
|
||||
#define pspw_molecule_data_ PSPW_MOLECULE_DATA
|
||||
#define pspw_molecule_end_ PSPW_MOLECULE_END
|
||||
|
|
@ -252,18 +245,8 @@ void FATR pspw_molecule_end_()
|
|||
* *
|
||||
********************************/
|
||||
|
||||
void FATR pspw_molecule_read_
|
||||
#if defined(USE_FCD)
|
||||
( _fcd fcd_filename, Integer *n1)
|
||||
void FATR pspw_molecule_read_(char *filename, Integer *n1)
|
||||
{
|
||||
const char *filename = _fcdtocp(fcd_filename);
|
||||
|
||||
#else
|
||||
(char *filename, Integer *n1)
|
||||
{
|
||||
#endif
|
||||
|
||||
|
||||
FILE *fp;
|
||||
int value;
|
||||
int j,m,msize;
|
||||
|
|
|
|||
|
|
@ -10,60 +10,25 @@
|
|||
#include "get_word.h"
|
||||
|
||||
|
||||
#if defined(CRAY) || defined(CRAY_T3D)
|
||||
#include <fortran.h>
|
||||
#if !defined(__crayx1)
|
||||
#define USE_FCD
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined(__crayx1) &&!defined(__MINGW32__)
|
||||
#if (defined(WIN32)) && !defined(__MINGW32__)
|
||||
#define carter_parse_ CARTER_PARSE
|
||||
#endif
|
||||
|
||||
void FATR carter_parse_
|
||||
#if defined(USE_FCD)
|
||||
(Integer *debug_ptr,
|
||||
Integer *lmax_ptr,
|
||||
Integer *locp_ptr,
|
||||
double *rlocal_ptr,
|
||||
const _fcd fcd_sdir_name,
|
||||
Integer *n9,
|
||||
const _fcd fcd_dir_name,
|
||||
Integer *n0,
|
||||
const _fcd fcd_in_filename,
|
||||
Integer *n1,
|
||||
const _fcd fcd_out_filename,
|
||||
Integer *n2,
|
||||
const _fcd fcd_atom,
|
||||
Integer *n3)
|
||||
void FATR carter_parse_(Integer *debug_ptr,
|
||||
Integer *lmax_ptr,
|
||||
Integer *locp_ptr,
|
||||
double *rlocal_ptr,
|
||||
char sdir_name[],
|
||||
Integer *n9,
|
||||
char dir_name[],
|
||||
Integer *n0,
|
||||
char in_filename[],
|
||||
Integer *n1,
|
||||
char out_filename[],
|
||||
Integer *n2,
|
||||
char atom[],
|
||||
Integer *n3)
|
||||
{
|
||||
char *sdir_name = _fcdtocp(fcd_sdir_name);
|
||||
char *dir_name = _fcdtocp(fcd_dir_name);
|
||||
char *in_filename = _fcdtocp(fcd_in_filename);
|
||||
char *out_filename = _fcdtocp(fcd_out_filename);
|
||||
char *atom = _fcdtocp(fcd_atom);
|
||||
|
||||
#else
|
||||
(debug_ptr,lmax_ptr,locp_ptr,rlocal_ptr,
|
||||
sdir_name,n9,dir_name,n0,in_filename,n1,out_filename,n2,atom,n3)
|
||||
Integer *debug_ptr;
|
||||
Integer *lmax_ptr;
|
||||
Integer *locp_ptr;
|
||||
double *rlocal_ptr;
|
||||
char sdir_name[];
|
||||
Integer *n9;
|
||||
char dir_name[];
|
||||
Integer *n0;
|
||||
char in_filename[];
|
||||
Integer *n1;
|
||||
char out_filename[];
|
||||
Integer *n2;
|
||||
char atom[];
|
||||
Integer *n3;
|
||||
{
|
||||
|
||||
#endif
|
||||
|
||||
int debug;
|
||||
int lmax_out,locp_out;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
/*
|
||||
$Id$
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
|
@ -13,60 +9,25 @@ extern double cpi_Splint();
|
|||
extern void cpi_Spline();
|
||||
|
||||
|
||||
#if defined(CRAY) || defined(CRAY_T3D)
|
||||
#include <fortran.h>
|
||||
#if !defined(__crayx1)
|
||||
#define USE_FCD
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined(__crayx1) &&!defined(__MINGW32__)
|
||||
#if (defined(WIN32)) && !defined(__MINGW32__)
|
||||
#define cpi_parse_ CPI_PARSE
|
||||
#endif
|
||||
|
||||
void FATR cpi_parse_
|
||||
#if defined(USE_FCD)
|
||||
(Integer *debug_ptr,
|
||||
Integer *lmax_ptr,
|
||||
Integer *locp_ptr,
|
||||
double *rlocal_ptr,
|
||||
const _fcd fcd_sdir_name,
|
||||
Integer *n9,
|
||||
const _fcd fcd_dir_name,
|
||||
Integer *n0,
|
||||
const _fcd fcd_in_filename,
|
||||
Integer *n1,
|
||||
const _fcd fcd_out_filename,
|
||||
Integer *n2,
|
||||
const _fcd fcd_atom,
|
||||
Integer *n3)
|
||||
void FATR cpi_parse_(Integer *debug_ptr,
|
||||
Integer *lmax_ptr,
|
||||
Integer *locp_ptr,
|
||||
double *rlocal_ptr,
|
||||
char sdir_name[],
|
||||
Integer *n9,
|
||||
char dir_name[],
|
||||
Integer *n0,
|
||||
char in_filename[],
|
||||
Integer *n1,
|
||||
char out_filename[],
|
||||
Integer *n2,
|
||||
char atom[],
|
||||
Integer *n3)
|
||||
{
|
||||
char *sdir_name = _fcdtocp(fcd_sdir_name);
|
||||
char *dir_name = _fcdtocp(fcd_dir_name);
|
||||
char *in_filename = _fcdtocp(fcd_in_filename);
|
||||
char *out_filename = _fcdtocp(fcd_out_filename);
|
||||
char *atom = _fcdtocp(fcd_atom);
|
||||
|
||||
#else
|
||||
(debug_ptr,lmax_ptr,locp_ptr,rlocal_ptr,
|
||||
sdir_name,n9,dir_name,n0,in_filename,n1,out_filename,n2,atom,n3)
|
||||
Integer *debug_ptr;
|
||||
Integer *lmax_ptr;
|
||||
Integer *locp_ptr;
|
||||
double *rlocal_ptr;
|
||||
char sdir_name[];
|
||||
Integer *n9;
|
||||
char dir_name[];
|
||||
Integer *n0;
|
||||
char in_filename[];
|
||||
Integer *n1;
|
||||
char out_filename[];
|
||||
Integer *n2;
|
||||
char atom[];
|
||||
Integer *n3;
|
||||
{
|
||||
|
||||
#endif
|
||||
|
||||
int debug;
|
||||
int lmax_out,locp_out;
|
||||
|
|
|
|||
|
|
@ -1,63 +1,26 @@
|
|||
/*
|
||||
$Id$
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "typesf2c.h"
|
||||
#include "get_word.h"
|
||||
|
||||
#if defined(CRAY) || defined(CRAY_T3D)
|
||||
#include <fortran.h>
|
||||
#if !defined(__crayx1)
|
||||
#define USE_FCD
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined(__crayx1) &&!defined(__MINGW32__)
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined(__MINGW32__)
|
||||
#define hgh_parse_ HGH_PARSE
|
||||
#endif
|
||||
|
||||
void FATR hgh_parse_
|
||||
#if defined(USE_FCD)
|
||||
(Integer *debug_ptr,
|
||||
Integer *lmax_ptr,
|
||||
Integer *locp_ptr,
|
||||
double *rlocal_ptr,
|
||||
const _fcd fcd_sdir_name,
|
||||
Integer *n9,
|
||||
const _fcd fcd_dir_name,
|
||||
Integer *n0,
|
||||
const _fcd fcd_in_filename,
|
||||
Integer *n1,
|
||||
const _fcd fcd_out_filename,
|
||||
Integer *n2)
|
||||
void FATR hgh_parse_ (Integer *debug_ptr,
|
||||
Integer *lmax_ptr,
|
||||
Integer *locp_ptr,
|
||||
double *rlocal_ptr,
|
||||
char sdir_name[],
|
||||
Integer *n9,
|
||||
char dir_name[],
|
||||
Integer *n0,
|
||||
char in_filename[],
|
||||
Integer *n1,
|
||||
char out_filename[],
|
||||
Integer *n2)
|
||||
{
|
||||
char *sdir_name = _fcdtocp(fcd_sdir_name);
|
||||
char *dir_name = _fcdtocp(fcd_dir_name);
|
||||
char *in_filename = _fcdtocp(fcd_in_filename);
|
||||
char *out_filename = _fcdtocp(fcd_out_filename);
|
||||
|
||||
#else
|
||||
(debug_ptr,lmax_ptr,locp_ptr,rlocal_ptr,
|
||||
sdir_name,n9,dir_name,n0,in_filename,n1,out_filename,n2)
|
||||
Integer *debug_ptr;
|
||||
Integer *lmax_ptr;
|
||||
Integer *locp_ptr;
|
||||
double *rlocal_ptr;
|
||||
char sdir_name[];
|
||||
Integer *n9;
|
||||
char dir_name[];
|
||||
Integer *n0;
|
||||
char in_filename[];
|
||||
Integer *n1;
|
||||
char out_filename[];
|
||||
Integer *n2;
|
||||
{
|
||||
|
||||
#endif
|
||||
|
||||
int debug,done;
|
||||
int lmax_out,locp_out;
|
||||
double rlocal_out;
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ extern int index_r_LogGrid();
|
|||
|
||||
#endif
|
||||
#include <math.h>
|
||||
#if defined(CRAY) &&!defined(__crayx1)
|
||||
#if defined(CRAY)
|
||||
#include <fp.h>
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
/*
|
||||
$Id$
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
|
@ -16,61 +12,25 @@
|
|||
#include "paw_scattering.h"
|
||||
#include "paw_loggrid.h"
|
||||
|
||||
#if defined(CRAY) || defined(CRAY_T3D)
|
||||
#include <fortran.h>
|
||||
#if !defined(__crayx1)
|
||||
#define USE_FCD
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined(__crayx1) &&!defined(__MINGW32__)
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined(__MINGW32__)
|
||||
#define teter_parse_ PAW_ATOM_DRIVER
|
||||
#endif
|
||||
|
||||
void FATR paw_atom_driver_
|
||||
#if defined(USE_FCD)
|
||||
(Integer *debug_ptr,
|
||||
Integer *lmax_ptr,
|
||||
Integer *locp_ptr,
|
||||
double *rlocal_ptr,
|
||||
const _fcd fcd_sdir_name,
|
||||
Integer *n9,
|
||||
const _fcd fcd_dir_name,
|
||||
Integer *n0,
|
||||
const _fcd fcd_in_filename,
|
||||
Integer *n1,
|
||||
const _fcd fcd_out_filename,
|
||||
Integer *n2,
|
||||
const _fcd fcd_atom,
|
||||
Integer *n3)
|
||||
void FATR paw_atom_driver_(Integer *debug_ptr,
|
||||
Integer *lmax_ptr,
|
||||
Integer *locp_ptr,
|
||||
double *rlocal_ptr,
|
||||
char sdir_name[],
|
||||
Integer *n9,
|
||||
char dir_name[],
|
||||
Integer *n0,
|
||||
char in_filename[],
|
||||
Integer *n1,
|
||||
char out_filename[],
|
||||
Integer *n2,
|
||||
char atom[],
|
||||
Integer *n3)
|
||||
{
|
||||
char *sdir_name = _fcdtocp(fcd_sdir_name);
|
||||
char *dir_name = _fcdtocp(fcd_dir_name);
|
||||
char *in_filename = _fcdtocp(fcd_in_filename);
|
||||
char *out_filename = _fcdtocp(fcd_out_filename);
|
||||
char *atom = _fcdtocp(fcd_atom);
|
||||
|
||||
#else
|
||||
(debug_ptr,lmax_ptr,locp_ptr,rlocal_ptr,
|
||||
sdir_name,n9,dir_name,n0,in_filename,n1,out_filename,n2,atom,n3)
|
||||
Integer *debug_ptr;
|
||||
Integer *lmax_ptr;
|
||||
Integer *locp_ptr;
|
||||
double *rlocal_ptr;
|
||||
char sdir_name[];
|
||||
Integer *n9;
|
||||
char dir_name[];
|
||||
Integer *n0;
|
||||
char in_filename[];
|
||||
Integer *n1;
|
||||
char out_filename[];
|
||||
Integer *n2;
|
||||
char atom[];
|
||||
Integer *n3;
|
||||
{
|
||||
|
||||
#endif
|
||||
|
||||
int debug;
|
||||
int lmax_out,locp_out;
|
||||
double rlocal_out;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,3 @@
|
|||
/*
|
||||
$Id$
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
|
@ -18,59 +15,25 @@
|
|||
**/
|
||||
#include "rpspsolve.c"
|
||||
|
||||
#if defined(CRAY) || defined(CRAY_T3D)
|
||||
#include <fortran.h>
|
||||
#if !defined(__crayx1)
|
||||
#define USE_FCD
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined(__crayx1) &&!defined(__MINGW32__)
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined(__MINGW32__)
|
||||
#define pspsolve_ PSPSOLVE
|
||||
#endif
|
||||
|
||||
void FATR pspsolve_
|
||||
#if defined(USE_FCD)
|
||||
|
||||
(Integer * print_ptr,
|
||||
Integer * debug_ptr,
|
||||
Integer * lmax_ptr,
|
||||
Integer * locp_ptr,
|
||||
double *rlocal_ptr,
|
||||
Integer * efg_ptr,
|
||||
const _fcd fcd_sdir_name,
|
||||
Integer * n9,
|
||||
const _fcd fcd_dir_name,
|
||||
Integer * n0,
|
||||
const _fcd fcd_in_filename,
|
||||
Integer * n1, const _fcd fcd_out_filename, Integer * n2)
|
||||
void FATR pspsolve_(Integer *print_ptr,
|
||||
Integer *debug_ptr,
|
||||
Integer *lmax_ptr,
|
||||
Integer *locp_ptr,
|
||||
double *rlocal_ptr,
|
||||
Integer *efg_ptr,
|
||||
char sdir_name[],
|
||||
Integer *n9,
|
||||
char dir_name[],
|
||||
Integer *n0,
|
||||
char in_filename[],
|
||||
Integer *n1,
|
||||
char out_filename[],
|
||||
Integer *n2)
|
||||
{
|
||||
char *sdir_name = _fcdtocp (fcd_sdir_name);
|
||||
char *dir_name = _fcdtocp (fcd_dir_name);
|
||||
char *in_filename = _fcdtocp (fcd_in_filename);
|
||||
char *out_filename = _fcdtocp (fcd_out_filename);
|
||||
|
||||
#else
|
||||
|
||||
(print_ptr, debug_ptr, lmax_ptr, locp_ptr, rlocal_ptr,efg_ptr,
|
||||
sdir_name, n9, dir_name, n0, in_filename, n1, out_filename, n2)
|
||||
Integer *print_ptr;
|
||||
Integer *debug_ptr;
|
||||
Integer *lmax_ptr;
|
||||
Integer *locp_ptr;
|
||||
double *rlocal_ptr;
|
||||
Integer *efg_ptr;
|
||||
char sdir_name[];
|
||||
Integer *n9;
|
||||
char dir_name[];
|
||||
Integer *n0;
|
||||
char in_filename[];
|
||||
Integer *n1;
|
||||
char out_filename[];
|
||||
Integer *n2;
|
||||
{
|
||||
|
||||
#endif
|
||||
|
||||
int i, j, k, l, p, Nlinear, Nvalence,Ncore,istate,mch,kb_extra;
|
||||
int debug, print;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
/*
|
||||
$Id$
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
|
@ -10,67 +6,30 @@
|
|||
#include "get_word.h"
|
||||
|
||||
|
||||
|
||||
#if defined(CRAY) || defined(CRAY_T3D)
|
||||
#include <fortran.h>
|
||||
#if !defined(__crayx1)
|
||||
#define USE_FCD
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined(__crayx1) &&!defined(__MINGW32__)
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined(__MINGW32__)
|
||||
#define qmmm_parse_ QMMM_PARSE
|
||||
#endif
|
||||
|
||||
void FATR qmmm_parse_
|
||||
#if defined(USE_FCD)
|
||||
(Integer *debug_ptr,
|
||||
Integer *lmax_ptr,
|
||||
Integer *locp_ptr,
|
||||
double *rlocal_ptr,
|
||||
const _fcd fcd_sdir_name,
|
||||
Integer *n9,
|
||||
const _fcd fcd_dir_name,
|
||||
Integer *n0,
|
||||
const _fcd fcd_in_filename,
|
||||
Integer *n1,
|
||||
const _fcd fcd_out_filename,
|
||||
Integer *n2,
|
||||
const _fcd fcd_atom,
|
||||
Integer *n3)
|
||||
void FATR qmmm_parse_(Integer *debug_ptr,
|
||||
Integer *lmax_ptr,
|
||||
Integer *locp_ptr,
|
||||
double *rlocal_ptr,
|
||||
char sdir_name[],
|
||||
Integer *n9,
|
||||
char dir_name[],
|
||||
Integer *n0,
|
||||
char in_filename[],
|
||||
Integer *n1,
|
||||
char out_filename[],
|
||||
Integer *n2,
|
||||
char atom[],
|
||||
Integer *n3)
|
||||
{
|
||||
char *sdir_name = _fcdtocp(fcd_sdir_name);
|
||||
char *dir_name = _fcdtocp(fcd_dir_name);
|
||||
char *in_filename = _fcdtocp(fcd_in_filename);
|
||||
char *out_filename = _fcdtocp(fcd_out_filename);
|
||||
char *atom = _fcdtocp(fcd_atom);
|
||||
int debug;
|
||||
int lmax_out,locp_out;
|
||||
double rlocal_out;
|
||||
|
||||
#else
|
||||
(debug_ptr,lmax_ptr,locp_ptr,rlocal_ptr,
|
||||
sdir_name,n9,dir_name,n0,in_filename,n1,out_filename,n2,atom,n3)
|
||||
Integer *debug_ptr;
|
||||
Integer *lmax_ptr;
|
||||
Integer *locp_ptr;
|
||||
double *rlocal_ptr;
|
||||
char sdir_name[];
|
||||
Integer *n9;
|
||||
char dir_name[];
|
||||
Integer *n0;
|
||||
char in_filename[];
|
||||
Integer *n1;
|
||||
char out_filename[];
|
||||
Integer *n2;
|
||||
char atom[];
|
||||
Integer *n3;
|
||||
{
|
||||
|
||||
#endif
|
||||
|
||||
int debug;
|
||||
int lmax_out,locp_out;
|
||||
double rlocal_out;
|
||||
|
||||
int lmax;
|
||||
int lmax;
|
||||
|
||||
|
||||
double Zion; /* local psp parameters */
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
/*
|
||||
$Id$
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
|
@ -14,55 +10,24 @@
|
|||
#include "rpsp.h"
|
||||
#include "debug.h"
|
||||
|
||||
#if defined(CRAY) || defined(CRAY_T3D)
|
||||
#include <fortran.h>
|
||||
#if !defined(__crayx1)
|
||||
#define USE_FCD
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined(__crayx1) &&!defined(__MINGW32__)
|
||||
#if (defined(WIN32)) && !defined(__MINGW32__)
|
||||
#define rpspsolve_ RPSPSOLVE
|
||||
#endif
|
||||
|
||||
void FATR rpspsolve_
|
||||
#if defined(USE_FCD)
|
||||
(Integer * print_ptr,
|
||||
Integer * debug_ptr,
|
||||
Integer * lmax_ptr,
|
||||
Integer * locp_ptr,
|
||||
double *rlocal_ptr,
|
||||
const _fcd fcd_sdir_name,
|
||||
Integer * n9,
|
||||
const _fcd fcd_dir_name,
|
||||
Integer * n0,
|
||||
const _fcd fcd_in_filename,
|
||||
Integer * n1, const _fcd fcd_out_filename, Integer * n2)
|
||||
void FATR rpspsolve_ (Integer *print_ptr,
|
||||
Integer *debug_ptr,
|
||||
Integer *lmax_ptr,
|
||||
Integer *locp_ptr,
|
||||
double *rlocal_ptr,
|
||||
char sdir_name[],
|
||||
Integer *n9,
|
||||
char dir_name[],
|
||||
Integer *n0,
|
||||
char in_filename[],
|
||||
Integer *n1,
|
||||
char out_filename[],
|
||||
Integer *n2)
|
||||
{
|
||||
char *sdir_name = _fcdtocp (fcd_sdir_name);
|
||||
char *dir_name = _fcdtocp (fcd_dir_name);
|
||||
char *in_filename = _fcdtocp (fcd_in_filename);
|
||||
char *out_filename = _fcdtocp (fcd_out_filename);
|
||||
#else
|
||||
|
||||
(print_ptr, debug_ptr, lmax_ptr, locp_ptr, rlocal_ptr,
|
||||
sdir_name, n9, dir_name, n0, in_filename, n1, out_filename, n2)
|
||||
Integer *print_ptr;
|
||||
Integer *debug_ptr;
|
||||
Integer *lmax_ptr;
|
||||
Integer *locp_ptr;
|
||||
double *rlocal_ptr;
|
||||
char sdir_name[];
|
||||
Integer *n9;
|
||||
char dir_name[];
|
||||
Integer *n0;
|
||||
char in_filename[];
|
||||
Integer *n1;
|
||||
char out_filename[];
|
||||
Integer *n2;
|
||||
{
|
||||
#endif
|
||||
|
||||
int i, j, k, l, p, Nlinear, Nvalence;
|
||||
int debug, print;
|
||||
double *rl, *rhol, **psil, **pspl;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
/*
|
||||
$Id$
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
|
@ -13,62 +9,25 @@ extern double tetercc();
|
|||
extern double cpi_Splint();
|
||||
extern void cpi_Spline();
|
||||
|
||||
|
||||
#if defined(CRAY) || defined(CRAY_T3D)
|
||||
#include <fortran.h>
|
||||
#if !defined(__crayx1)
|
||||
#define USE_FCD
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined(__crayx1) &&!defined(__MINGW32__)
|
||||
#if (defined(WIN32)) && !defined(__MINGW32__)
|
||||
#define teter_parse_ TETER_PARSE
|
||||
#endif
|
||||
|
||||
void FATR teter_parse_
|
||||
#if defined(USE_FCD)
|
||||
(Integer *debug_ptr,
|
||||
Integer *lmax_ptr,
|
||||
Integer *locp_ptr,
|
||||
double *rlocal_ptr,
|
||||
const _fcd fcd_sdir_name,
|
||||
Integer *n9,
|
||||
const _fcd fcd_dir_name,
|
||||
Integer *n0,
|
||||
const _fcd fcd_in_filename,
|
||||
Integer *n1,
|
||||
const _fcd fcd_out_filename,
|
||||
Integer *n2,
|
||||
const _fcd fcd_atom,
|
||||
Integer *n3)
|
||||
void FATR teter_parse_ (Integer *debug_ptr,
|
||||
Integer *lmax_ptr,
|
||||
Integer *locp_ptr,
|
||||
double *rlocal_ptr,
|
||||
char sdir_name[],
|
||||
Integer *n9,
|
||||
char dir_name[],
|
||||
Integer *n0,
|
||||
char in_filename[],
|
||||
Integer *n1,
|
||||
char out_filename[],
|
||||
Integer *n2,
|
||||
char atom[],
|
||||
Integer *n3)
|
||||
{
|
||||
char *sdir_name = _fcdtocp(fcd_sdir_name);
|
||||
char *dir_name = _fcdtocp(fcd_dir_name);
|
||||
char *in_filename = _fcdtocp(fcd_in_filename);
|
||||
char *out_filename = _fcdtocp(fcd_out_filename);
|
||||
char *atom = _fcdtocp(fcd_atom);
|
||||
|
||||
#else
|
||||
(debug_ptr,lmax_ptr,locp_ptr,rlocal_ptr,
|
||||
sdir_name,n9,dir_name,n0,in_filename,n1,out_filename,n2,atom,n3)
|
||||
Integer *debug_ptr;
|
||||
Integer *lmax_ptr;
|
||||
Integer *locp_ptr;
|
||||
double *rlocal_ptr;
|
||||
char sdir_name[];
|
||||
Integer *n9;
|
||||
char dir_name[];
|
||||
Integer *n0;
|
||||
char in_filename[];
|
||||
Integer *n1;
|
||||
char out_filename[];
|
||||
Integer *n2;
|
||||
char atom[];
|
||||
Integer *n3;
|
||||
{
|
||||
|
||||
#endif
|
||||
|
||||
int debug;
|
||||
int lmax_out,locp_out;
|
||||
double rlocal_out;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
/*
|
||||
$Id: nwpw_emachine.c 25745 2014-06-08 07:46:01Z d3y133 $
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
|
@ -22,12 +18,6 @@
|
|||
|
||||
|
||||
|
||||
#if defined(CRAY)
|
||||
#include <fortran.h>
|
||||
#if !defined(__crayx1)
|
||||
#define USE_FCD
|
||||
#endif
|
||||
#endif
|
||||
|
||||
extern void lattice_min_difference_();
|
||||
|
||||
|
|
@ -941,33 +931,17 @@ double nwpw_fmachine(Integer i0, Integer ii0, Integer ln, Integer code[], double
|
|||
* *
|
||||
********************************************************/
|
||||
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined(__crayx1) &&!defined(__MINGW32__)
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined(__MINGW32__)
|
||||
#define nwpw_emachine_parse_ nwpw_emachine_parse
|
||||
#endif
|
||||
|
||||
void FATR nwpw_emachine_parse_
|
||||
#if defined(USE_FCD)
|
||||
( const _fcd fcd_eqn_string,
|
||||
Integer *n1,
|
||||
Integer *nc0,
|
||||
Integer code0[],
|
||||
Integer *nf0,
|
||||
double fconst0[])
|
||||
void FATR nwpw_emachine_parse_ (char eqn_string[],
|
||||
Integer *n1,
|
||||
Integer *nc0,
|
||||
Integer code0[],
|
||||
Integer *nf0,
|
||||
double fconst0[])
|
||||
{
|
||||
char *eqn_string = _fcdtocp(fcd_eqn_string);
|
||||
|
||||
#else
|
||||
(eqn_string,n1,nc0,code0,nf0,fconst0)
|
||||
char eqn_string[];
|
||||
Integer *n1;
|
||||
Integer *nc0;
|
||||
Integer code0[];
|
||||
Integer *nf0;
|
||||
double fconst0[];
|
||||
{
|
||||
|
||||
#endif
|
||||
|
||||
int i;
|
||||
char nstr[500];
|
||||
int ns = *n1;
|
||||
|
|
@ -994,32 +968,17 @@ double fconst0[];
|
|||
* *
|
||||
********************************************************/
|
||||
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined(__crayx1) &&!defined(__MINGW32__)
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined(__MINGW32__)
|
||||
#define nwpw_emachine_f_ nwpw_emachine_f
|
||||
#endif
|
||||
|
||||
double FATR nwpw_emachine_f_
|
||||
#if defined(USE_FCD)
|
||||
(
|
||||
Integer *nc0,
|
||||
Integer code0[],
|
||||
Integer *nf0,
|
||||
double fconst0[],
|
||||
Integer *nion0,
|
||||
double *rion0[])
|
||||
double FATR nwpw_emachine_f_ (Integer *nc0,
|
||||
Integer code0[],
|
||||
Integer *nf0,
|
||||
double fconst0[],
|
||||
Integer *nion0,
|
||||
double rion0[])
|
||||
{
|
||||
|
||||
#else
|
||||
(nc0,code0,nf0,fconst0,nion0,rion0)
|
||||
Integer *nc0;
|
||||
Integer code0[];
|
||||
Integer *nf0;
|
||||
double fconst0[];
|
||||
Integer *nion0;
|
||||
double rion0[];
|
||||
{
|
||||
|
||||
#endif
|
||||
double f;
|
||||
|
||||
f = nwpw_emachine(0,code0,fconst0,*nion0,rion0);
|
||||
|
|
@ -1036,36 +995,19 @@ double rion0[];
|
|||
* *
|
||||
********************************************************/
|
||||
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined(__crayx1) &&!defined(__MINGW32__)
|
||||
#if (defined(WIN32)) && !defined(__MINGW32__)
|
||||
#define nwpw_emachine_df_ nwpw_emachine_df
|
||||
#endif
|
||||
|
||||
double FATR nwpw_emachine_df_
|
||||
#if defined(USE_FCD)
|
||||
(
|
||||
Integer *i0,
|
||||
Integer *ii0,
|
||||
Integer *nc0,
|
||||
Integer code0[],
|
||||
Integer *nf0,
|
||||
double fconst0[],
|
||||
Integer *nion0,
|
||||
double *rion0[])
|
||||
double FATR nwpw_emachine_df_ (Integer *i0,
|
||||
Integer *ii0,
|
||||
Integer *nc0,
|
||||
Integer code0[],
|
||||
Integer *nf0,
|
||||
double fconst0[],
|
||||
Integer *nion0,
|
||||
double rion0[])
|
||||
{
|
||||
|
||||
#else
|
||||
(i0,ii0,nc0,code0,nf0,fconst0,nion0,rion0)
|
||||
Integer *i0;
|
||||
Integer *ii0;
|
||||
Integer *nc0;
|
||||
Integer code0[];
|
||||
Integer *nf0;
|
||||
double fconst0[];
|
||||
Integer *nion0;
|
||||
double rion0[];
|
||||
{
|
||||
|
||||
#endif
|
||||
double df;
|
||||
|
||||
df = nwpw_fmachine(*i0,*ii0,0,code0,fconst0,*nion0,rion0);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
/*
|
||||
$Id$
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
|
@ -19,41 +15,19 @@
|
|||
#include "typesf2c.h"
|
||||
|
||||
|
||||
|
||||
#if defined(CRAY)
|
||||
#include <fortran.h>
|
||||
#if !defined(__crayx1)
|
||||
#define USE_FCD
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (defined(CRAY) || defined(WIN32)) &&!defined(__crayx1) &&!defined(__MINGW32__)
|
||||
#if (defined(WIN32)) && !defined(__MINGW32__)
|
||||
#define nwpw_talker_ nwpw_talker
|
||||
#define nwpw_talker_close_ nwpw_talker_close
|
||||
#define nwpw_talker_write_ nwpw_talker_write
|
||||
#define nwpw_talker_read_ nwpw_talker_read
|
||||
#endif
|
||||
|
||||
void FATR nwpw_talker_
|
||||
#if defined(USE_FCD)
|
||||
( const _fcd fcd_addr_name,
|
||||
Integer *inet,
|
||||
Integer *n1,
|
||||
Integer *portin,
|
||||
Integer *sockout)
|
||||
void FATR nwpw_talker_ (char addr_name[],
|
||||
Integer *inet,
|
||||
Integer *n1,
|
||||
Integer *portin,
|
||||
Integer *sockout)
|
||||
{
|
||||
char *addr_name = _fcdtocp(fcd_addr_name);
|
||||
|
||||
#else
|
||||
(addr_name,inet,n1,portin,sockout)
|
||||
char addr_name[];
|
||||
Integer *inet;
|
||||
Integer *n1;
|
||||
Integer *portin;
|
||||
Integer *sockout;
|
||||
{
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__MINGW32__)
|
||||
perror("nwpw_talker: not coded for this architecture");
|
||||
|
|
@ -120,15 +94,8 @@ Integer *sockout;
|
|||
|
||||
|
||||
|
||||
void FATR nwpw_talker_close_
|
||||
#if defined(USE_FCD)
|
||||
(Integer *socket1)
|
||||
void FATR nwpw_talker_close_ ( Integer *socket1 )
|
||||
{
|
||||
#else
|
||||
(socket1)
|
||||
Integer *socket1;
|
||||
{
|
||||
#endif
|
||||
#if defined(__MINGW32__)
|
||||
perror("nwpw_talker: not coded for this architecture");
|
||||
exit(1);
|
||||
|
|
@ -139,20 +106,10 @@ Integer *socket1;
|
|||
}
|
||||
|
||||
|
||||
void FATR nwpw_talker_write_
|
||||
#if defined(USE_FCD)
|
||||
(Integer *socket1,
|
||||
const _fcd fcd_buffer,
|
||||
Integer *n1)
|
||||
void FATR nwpw_talker_write_ ( Integer *socket1,
|
||||
char buffer[],
|
||||
Integer *n1)
|
||||
{
|
||||
char *buffer = _fcdtocp(fcd_buffer);
|
||||
#else
|
||||
(socket1,buffer,n1)
|
||||
Integer *socket1;
|
||||
char buffer[];
|
||||
Integer *n1;
|
||||
{
|
||||
#endif
|
||||
#if defined(__MINGW32__)
|
||||
perror("nwpw_talker_write: not coded for this architecture");
|
||||
exit(1);
|
||||
|
|
@ -176,20 +133,10 @@ Integer *n1;
|
|||
|
||||
|
||||
|
||||
void FATR nwpw_talker_read_
|
||||
#if defined(USE_FCD)
|
||||
(Integer *socket1,
|
||||
const _fcd fcd_buffer,
|
||||
Integer *n1)
|
||||
{
|
||||
char *buffer = _fcdtocp(fcd_buffer);
|
||||
#else
|
||||
(socket1,buffer,n1)
|
||||
Integer *socket1;
|
||||
char buffer[];
|
||||
Integer *n1;
|
||||
void FATR nwpw_talker_read_ ( Integer *socket1,
|
||||
char buffer[],
|
||||
Integer *n1 )
|
||||
{
|
||||
#endif
|
||||
#if defined(__MINGW32__)
|
||||
perror("nwpw_talker_read: not coded for this architecture");
|
||||
exit(1);
|
||||
|
|
@ -216,7 +163,7 @@ Integer *n1;
|
|||
|
||||
|
||||
|
||||
#if (defined(CRAY) || defined(WIN32)) &&!defined(__crayx1) &&!defined(__MINGW32__)
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined(__MINGW32__)
|
||||
#define nwpw_listener_ nwpw_listener
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -822,7 +822,7 @@ C> @}
|
|||
read(19,*,ERR=30,END=30) ch_tmp
|
||||
end do
|
||||
30 continue
|
||||
#if defined(FUJITSU) || defined(PSCALE) || defined(SOLARIS) || defined(__crayx1) || defined(GCC46)
|
||||
#if defined(FUJITSU) || defined(PSCALE) || defined(SOLARIS) || defined(GCC46)
|
||||
backspace 19
|
||||
#endif
|
||||
write(19,*) " "
|
||||
|
|
|
|||
|
|
@ -62,16 +62,6 @@
|
|||
data DLAMCHU/2.2250738585072013D-308/
|
||||
#endif
|
||||
|
||||
#ifdef __crayx1
|
||||
double precision DLAMCHE, DLAMCHP, DLAMCHS, DLAMCHU, DLAMCHB
|
||||
real SLAMCHE, SLAMCHP, SLAMCHS, SLAMCHU, SLAMCHB
|
||||
data DLAMCHE/1.1102230246251565D-16/
|
||||
data DLAMCHP/1.1102230246251565D-16/
|
||||
data DLAMCHB/2.D0/
|
||||
data DLAMCHS/2.2250738585072014D-308/
|
||||
data DLAMCHU/2.2250738585072014D-308/
|
||||
#endif
|
||||
|
||||
#ifdef PENTIUM
|
||||
double precision DLAMCHE, DLAMCHP, DLAMCHS, DLAMCHU, DLAMCHB
|
||||
real SLAMCHE, SLAMCHP, SLAMCHS, SLAMCHU, SLAMCHB
|
||||
|
|
|
|||
|
|
@ -115,32 +115,6 @@
|
|||
#define DLAMCHU 2.2250738585072014e-308
|
||||
*/
|
||||
|
||||
#endif
|
||||
#ifdef __crayx1
|
||||
#define DLAMCHE 2.2204460492503130e-16
|
||||
#define DLAMCHP 2.2204460492503130e-16
|
||||
#define DLAMCHB 2.0000000000000000e+00
|
||||
#define DLAMCHS 2.2250738585072014e-308
|
||||
#define DLAMCHU 2.2250738585072014e-308
|
||||
|
||||
#define dscal_ sscal_
|
||||
#define ddot_ sdot_
|
||||
#define daxpy_ saxpy_
|
||||
#define dnrm2_ snrm2_
|
||||
#define dasum_ sasum_
|
||||
#define dcopy_ scopy_
|
||||
#define idamax_ isamax_
|
||||
|
||||
/*
|
||||
lapack
|
||||
*/
|
||||
|
||||
#define dlagtf_ slagtf_
|
||||
#define dlagts_ slagts_
|
||||
#define dlamch_ slamch_
|
||||
#define dlarnv_ slarnv_
|
||||
|
||||
|
||||
#endif
|
||||
#ifdef PENTIUM
|
||||
/* wild ass guess; same as sparc */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,3 @@
|
|||
/*
|
||||
$Id$
|
||||
*/
|
||||
#include "ga.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
@ -16,7 +13,7 @@
|
|||
#define util_sgroup_mygroup_ UTIL_SGROUP_MYGROUP
|
||||
#endif
|
||||
|
||||
#if (defined(USE_FCD) || defined(WIN32)) && !defined(__MINGW32__)
|
||||
#if defined(WIN32) && !defined(__MINGW32__)
|
||||
extern Integer FATR nw_inp_from_file_(Integer *rtdb, _fcd filename);
|
||||
#else
|
||||
extern Integer FATR nw_inp_from_file_(Integer *rtdb, char *filename, int flen);
|
||||
|
|
@ -27,7 +24,7 @@ int nw_inp_from_string(Integer rtdb, const char *input)
|
|||
{
|
||||
char filename[30];
|
||||
FILE *file;
|
||||
#if (defined(USE_FCD) || defined(WIN32)) && !defined(__MINGW32__)
|
||||
#if defined(WIN32) && !defined(__MINGW32__)
|
||||
_fcd fstring;
|
||||
#endif
|
||||
int status;
|
||||
|
|
@ -59,8 +56,6 @@ int nw_inp_from_string(Integer rtdb, const char *input)
|
|||
fstring.string = filename;
|
||||
fstring.len = strlen(filename);
|
||||
status = nw_inp_from_file_(&rtdb, fstring);
|
||||
#elif defined(USE_FCD)
|
||||
#error Do something about _fcd
|
||||
#else
|
||||
status = nw_inp_from_file_(&rtdb, filename, strlen(filename));
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,10 +1,6 @@
|
|||
/*$Id$*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#if defined(CRAY) && !defined(__crayx1)
|
||||
#include <fortran.h>
|
||||
#endif
|
||||
#if defined(WIN32) &&!defined(__MINGW32__)
|
||||
#include "typesf2c.h"
|
||||
#endif
|
||||
|
|
@ -20,6 +16,7 @@ typedef long integer; /* Equivalent C type to FORTRAN integer */
|
|||
#else
|
||||
typedef int integer; /* Equivalent C type to FORTRAN integer */
|
||||
#endif
|
||||
|
||||
#define FORTRAN_TRUE ((logical) 1)
|
||||
#define FORTRAN_FALSE ((logical) 0)
|
||||
|
||||
|
|
@ -28,80 +25,28 @@ typedef int integer; /* Equivalent C type to FORTRAN integer */
|
|||
#endif
|
||||
|
||||
#define MAX_CLEN 4096
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
static int fortchar_to_string(_fcd f, int flen, char *buf,
|
||||
const int buflen)
|
||||
#else
|
||||
|
||||
static int fortchar_to_string(const char *f, int flen, char *buf,
|
||||
const int buflen)
|
||||
#endif
|
||||
{
|
||||
#if (defined(CRAY) || defined(USE_FCD))&& !defined(__crayx1)
|
||||
char *fstring = _fcdtocp(f);
|
||||
flen = _fcdlen(f);
|
||||
|
||||
while (flen-- && fstring[flen] == ' ')
|
||||
;
|
||||
|
||||
if ((flen+1) >= buflen)
|
||||
return 0; /* Won't fit */
|
||||
|
||||
while (flen-- && f[flen] == ' ');
|
||||
if ((flen+1) >= buflen) return 0; /* Won't fit */
|
||||
flen++;
|
||||
buf[flen] = 0;
|
||||
while(flen--)
|
||||
buf[flen] = fstring[flen];
|
||||
|
||||
#else
|
||||
|
||||
while (flen-- && f[flen] == ' ')
|
||||
;
|
||||
|
||||
if ((flen+1) >= buflen)
|
||||
return 0; /* Won't fit */
|
||||
|
||||
flen++;
|
||||
buf[flen] = 0;
|
||||
while(flen--)
|
||||
buf[flen] = f[flen];
|
||||
#endif
|
||||
while(flen--) buf[flen] = f[flen];
|
||||
return 1;
|
||||
}
|
||||
static int string_to_fortchar( f, flen, buf)
|
||||
int flen;
|
||||
char *buf;
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
_fcd f;
|
||||
#else
|
||||
char *f;
|
||||
#endif
|
||||
static int string_to_fortchar(char *f, int flen, char *buf)
|
||||
{
|
||||
int len = strlen(buf), i;
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
flen = _fcdlen(f);
|
||||
#endif
|
||||
|
||||
if (len > flen)
|
||||
return 0; /* Won't fit */
|
||||
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
for (i=0; i<len; i++)
|
||||
_fcdtocp(f)[i] = buf[i];
|
||||
for (i=len; i<flen; i++)
|
||||
_fcdtocp(f)[i] = ' ';
|
||||
#else
|
||||
for (i=0; i<len; i++)
|
||||
f[i] = buf[i];
|
||||
for (i=len; i<flen; i++)
|
||||
f[i] = ' ';
|
||||
#endif
|
||||
if (len > flen) return 0; /* Won't fit */
|
||||
for (i=0; i<len; i++) f[i] = buf[i];
|
||||
for (i=len; i<flen; i++) f[i] = ' ';
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
logical context_set_(_fcd string, int len)
|
||||
#else
|
||||
logical context_set_(const char *string, int len)
|
||||
#endif
|
||||
{
|
||||
char buf[MAX_CLEN];
|
||||
|
||||
|
|
@ -110,52 +55,45 @@ logical context_set_(const char *string, int len)
|
|||
fflush(stderr);
|
||||
return 0;
|
||||
}
|
||||
if (context_set(buf))
|
||||
if (context_set(buf)) {
|
||||
return FORTRAN_TRUE;
|
||||
else
|
||||
} else {
|
||||
return FORTRAN_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
logical FATR context_get_(_fcd string, int len)
|
||||
#else
|
||||
logical context_get_(const char *string, int len)
|
||||
#endif
|
||||
{
|
||||
char *tmp = context_get();
|
||||
int status = string_to_fortchar(string, len, tmp);
|
||||
|
||||
free(tmp);
|
||||
if (status)
|
||||
if (status) {
|
||||
return FORTRAN_TRUE;
|
||||
else
|
||||
} else {
|
||||
return FORTRAN_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
logical context_rtdb_store_(integer *prtdb)
|
||||
{
|
||||
if (context_rtdb_store((int) *prtdb))
|
||||
if (context_rtdb_store((int) *prtdb)) {
|
||||
return FORTRAN_TRUE;
|
||||
else
|
||||
} else {
|
||||
return FORTRAN_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
logical context_rtdb_load_(integer *prtdb)
|
||||
{
|
||||
if (context_rtdb_load((int) *prtdb))
|
||||
if (context_rtdb_load((int) *prtdb)) {
|
||||
return FORTRAN_TRUE;
|
||||
else
|
||||
} else {
|
||||
return FORTRAN_FALSE;
|
||||
}
|
||||
}
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
logical FATR context_push_(_fcd string)
|
||||
#else
|
||||
logical context_push_(const char *string, int len)
|
||||
#endif
|
||||
{
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
int len = _fcdlen(string);
|
||||
#endif
|
||||
char buf[MAX_CLEN];
|
||||
|
||||
if (!fortchar_to_string(string, len, buf, sizeof buf)) {
|
||||
|
|
@ -163,20 +101,14 @@ logical context_push_(const char *string, int len)
|
|||
fflush(stderr);
|
||||
return 0;
|
||||
}
|
||||
if (context_push(buf))
|
||||
if (context_push(buf)) {
|
||||
return FORTRAN_TRUE;
|
||||
else
|
||||
} else {
|
||||
return FORTRAN_FALSE;
|
||||
}
|
||||
}
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
logical FATR context_pop_(_fcd string)
|
||||
#else
|
||||
logical context_pop_(const char *string, int len)
|
||||
#endif
|
||||
{
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
int len = _fcdlen(string);
|
||||
#endif
|
||||
char buf[MAX_CLEN];
|
||||
|
||||
if (!fortchar_to_string(string, len, buf, sizeof buf)) {
|
||||
|
|
@ -184,47 +116,33 @@ logical context_pop_(const char *string, int len)
|
|||
fflush(stderr);
|
||||
return 0;
|
||||
}
|
||||
if (context_pop(buf))
|
||||
if (context_pop(buf)) {
|
||||
return FORTRAN_TRUE;
|
||||
else
|
||||
} else {
|
||||
return FORTRAN_FALSE;
|
||||
}
|
||||
}
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
logical FATR context_prefix_(_fcd name, _fcd result)
|
||||
#else
|
||||
logical context_prefix_(const char *name, char *result, int nlen, int rlen)
|
||||
#endif
|
||||
{
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
int nlen = _fcdlen(name);
|
||||
int rlen = _fcdlen(result);
|
||||
#endif
|
||||
char buf[MAX_CLEN], rbuf[MAX_CLEN];
|
||||
|
||||
if (!fortchar_to_string(name, nlen, buf, sizeof(buf))) {
|
||||
fprintf(stderr,"context_rtdb_match: buffer too small\n");
|
||||
return FORTRAN_FALSE;
|
||||
}
|
||||
if (!context_prefix(buf, rbuf, sizeof rbuf))
|
||||
if (!context_prefix(buf, rbuf, sizeof rbuf)) {
|
||||
return FORTRAN_FALSE;
|
||||
}
|
||||
if (!string_to_fortchar(result, rlen, rbuf)) {
|
||||
fprintf(stderr,"context_prefix: result too small\n");
|
||||
return FORTRAN_FALSE;
|
||||
}
|
||||
|
||||
return FORTRAN_TRUE;
|
||||
return FORTRAN_TRUE;
|
||||
}
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
logical FATR context_rtdb_match_(integer *prtdb, _fcd name, _fcd result)
|
||||
#else
|
||||
logical context_rtdb_match_(integer *prtdb, const char *name, char *result,
|
||||
int nlen, int rlen)
|
||||
#endif
|
||||
{
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
int nlen = _fcdlen(name);
|
||||
int rlen = _fcdlen(result);
|
||||
#endif
|
||||
char buf[MAX_CLEN], rbuf[MAX_CLEN];
|
||||
|
||||
if (!fortchar_to_string(name, nlen, buf, sizeof(buf))) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*$Id$*/
|
||||
#if (defined(CRAY) || defined(WIN32)) &&!defined(__crayx1) &&!defined(__MINGW32__)
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined(__MINGW32__)
|
||||
#define context_pop_ CONTEXT_POP
|
||||
#define context_prefix_ CONTEXT_PREFIX
|
||||
#define context_push_ CONTEXT_PUSH
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ extern int rtdb_seq_delete(const int, const char *);
|
|||
#define RTDB_SEQ_MODE 0 //* Sequential mode
|
||||
#define RTDB_PAR_MODE 1 //* Parallel mode
|
||||
|
||||
#if (defined(CRAY) || defined(WIN32)) &&!defined(__crayx1) &&!defined(__MINGW32__)
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined(__MINGW32__)
|
||||
#include "rtdb.cray.h"
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,91 +1,44 @@
|
|||
/*$Id$*/
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "rtdb.h"
|
||||
#include "macdecls.h"
|
||||
#ifdef CRAY
|
||||
#include <fortran.h>
|
||||
#endif
|
||||
#define FATR
|
||||
#define MXLGTH 32768
|
||||
|
||||
#define FORTRAN_TRUE ((Logical) 1)
|
||||
#define FORTRAN_FALSE ((Logical) 0)
|
||||
|
||||
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
int fortchar_to_string(_fcd f, int flen, char *buf, const int buflen)
|
||||
#else
|
||||
int fortchar_to_string(const char *f, int flen, char *buf, const int buflen)
|
||||
#endif
|
||||
{
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
char *fstring;
|
||||
fstring = _fcdtocp(f);
|
||||
flen = _fcdlen(f);
|
||||
|
||||
while (flen-- && fstring[flen] == ' ')
|
||||
;
|
||||
while (flen-- && f[flen] == ' ');
|
||||
|
||||
if (flen < 0) flen=0; /* Empty strings break use of strtok
|
||||
since consecutive separators are
|
||||
treated as one */
|
||||
if ((flen+1) >= buflen)
|
||||
return 0; /* Won't fit */
|
||||
|
||||
if ((flen+1) >= buflen) return 0; /* Won't fit */
|
||||
|
||||
flen++;
|
||||
buf[flen] = 0;
|
||||
while(flen--)
|
||||
buf[flen] = fstring[flen];
|
||||
#else
|
||||
while (flen-- && f[flen] == ' ')
|
||||
;
|
||||
|
||||
if (flen < 0) flen=0; /* Empty strings break use of strtok
|
||||
since consecutive separators are
|
||||
treated as one */
|
||||
if ((flen+1) >= buflen)
|
||||
return 0; /* Won't fit */
|
||||
|
||||
flen++;
|
||||
buf[flen] = 0;
|
||||
while(flen--)
|
||||
buf[flen] = f[flen];
|
||||
#endif
|
||||
while(flen--) buf[flen] = f[flen];
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
int string_to_fortchar(_fcd f, int flen, char *buf)
|
||||
#else
|
||||
int string_to_fortchar(char *f, int flen, char *buf)
|
||||
#endif
|
||||
{
|
||||
int len = (int) strlen(buf), i;
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
flen = _fcdlen(f);
|
||||
#endif
|
||||
|
||||
if (len > flen) {
|
||||
return 0; /* Won't fit */
|
||||
}
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
for (i=0; i<len; i++)
|
||||
_fcdtocp(f)[i] = buf[i];
|
||||
for (i=len; i<flen; i++)
|
||||
_fcdtocp(f)[i] = ' ';
|
||||
#else
|
||||
for (i=0; i<len; i++)
|
||||
f[i] = buf[i];
|
||||
for (i=len; i<flen; i++)
|
||||
f[i] = ' ';
|
||||
#endif
|
||||
if (len > flen) return 0; /* Won't fit */
|
||||
|
||||
for (i=0; i<len; i++) f[i] = buf[i];
|
||||
for (i=len; i<flen; i++) f[i] = ' ';
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Logical FATR rtdb_parallel_(const Logical *mode)
|
||||
Logical rtdb_parallel_(const Logical *mode)
|
||||
{
|
||||
/* This causes problems on machines where true != 1 (i.e. intel)
|
||||
* so it is better just to pass what we are given
|
||||
|
|
@ -95,22 +48,16 @@ Logical FATR rtdb_parallel_(const Logical *mode)
|
|||
int new = *mode;
|
||||
int old = rtdb_parallel(new);
|
||||
|
||||
if (old)
|
||||
if (old) {
|
||||
return FORTRAN_TRUE;
|
||||
else
|
||||
} else {
|
||||
return FORTRAN_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
Logical FATR rtdb_open_(_fcd filename, _fcd mode, Integer *handle)
|
||||
{
|
||||
int flen = _fcdlen(filename);
|
||||
int mlen = _fcdlen(mode);
|
||||
#else
|
||||
Logical FATR rtdb_open_(const char *filename, const char *mode, Integer *handle,
|
||||
Logical rtdb_open_(const char *filename, const char *mode, Integer *handle,
|
||||
const Integer flen, const Integer mlen)
|
||||
{
|
||||
#endif
|
||||
char fbuf[256], mbuf[256];
|
||||
int hbuf;
|
||||
|
||||
|
|
@ -129,19 +76,13 @@ Logical FATR rtdb_open_(const char *filename, const char *mode, Integer *handle,
|
|||
if (rtdb_open(fbuf, mbuf, &hbuf)) {
|
||||
*handle = (Integer) hbuf;
|
||||
return FORTRAN_TRUE;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return FORTRAN_FALSE;
|
||||
}
|
||||
}
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
Logical FATR rtdb_clone_(const Integer *handle, _fcd suffix)
|
||||
|
||||
Logical rtdb_clone_(const Integer *handle, const char *suffix, const int mlen)
|
||||
{
|
||||
int mlen = _fcdlen(suffix);
|
||||
#else
|
||||
Logical FATR rtdb_clone_(const Integer *handle, const char *suffix, const int mlen)
|
||||
{
|
||||
#endif
|
||||
char mbuf[256];
|
||||
int hbuf = (int) *handle;
|
||||
|
||||
|
|
@ -154,14 +95,9 @@ Logical FATR rtdb_clone_(const Integer *handle, const char *suffix, const int ml
|
|||
else
|
||||
return FORTRAN_FALSE;
|
||||
}
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
Logical FATR rtdb_getfname_(const Integer *handle, _fcd fname)
|
||||
|
||||
Logical rtdb_getfname_(const Integer *handle, char *fname, const int mlen)
|
||||
{
|
||||
int mlen = _fcdlen(fname);
|
||||
#else
|
||||
Logical FATR rtdb_getfname_(const Integer *handle, char *fname, const int mlen)
|
||||
{
|
||||
#endif
|
||||
char mbuf[256];
|
||||
int hbuf = (int) *handle;
|
||||
|
||||
|
|
@ -175,14 +111,9 @@ Logical FATR rtdb_getfname_(const Integer *handle, char *fname, const int mlen)
|
|||
else
|
||||
return FORTRAN_FALSE;
|
||||
}
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
Logical FATR rtdb_close_(const Integer *handle, _fcd mode)
|
||||
|
||||
Logical rtdb_close_(const Integer *handle, const char *mode, const int mlen)
|
||||
{
|
||||
int mlen = _fcdlen(mode);
|
||||
#else
|
||||
Logical FATR rtdb_close_(const Integer *handle, const char *mode, const int mlen)
|
||||
{
|
||||
#endif
|
||||
char mbuf[256];
|
||||
int hbuf = (int) *handle;
|
||||
|
||||
|
|
@ -195,18 +126,11 @@ Logical FATR rtdb_close_(const Integer *handle, const char *mode, const int mlen
|
|||
else
|
||||
return FORTRAN_FALSE;
|
||||
}
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
Logical FATR rtdb_get_info_(const Integer *handle, _fcd name,
|
||||
Integer *ma_type, Integer *nelem, _fcd date)
|
||||
{
|
||||
int nlen = _fcdlen(name);
|
||||
int dlen = _fcdlen(date);
|
||||
#else
|
||||
Logical FATR rtdb_get_info_(const Integer *handle, const char *name,
|
||||
|
||||
Logical rtdb_get_info_(const Integer *handle, const char *name,
|
||||
Integer *ma_type, Integer *nelem, char *date,
|
||||
const int nlen, const int dlen)
|
||||
{
|
||||
#endif
|
||||
|
||||
int hbuf = (int) *handle;
|
||||
char dbuf[26], nbuf[256];
|
||||
|
|
@ -242,16 +166,10 @@ Logical FATR rtdb_get_info_(const Integer *handle, const char *name,
|
|||
return FORTRAN_FALSE;
|
||||
}
|
||||
}
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
Logical FATR rtdb_put_(const Integer *handle, _fcd name, const Integer *ma_type,
|
||||
const Integer *nelem, const void *array)
|
||||
{
|
||||
int nlen = _fcdlen(name);
|
||||
#else
|
||||
Logical FATR rtdb_put_(const Integer *handle, const char *name, const Integer *ma_type,
|
||||
|
||||
Logical rtdb_put_(const Integer *handle, const char *name, const Integer *ma_type,
|
||||
const Integer *nelem, const void *array, const int nlen)
|
||||
{
|
||||
#endif
|
||||
int hbuf = (int) *handle;
|
||||
char nbuf[256];
|
||||
int nelbuf;
|
||||
|
|
@ -276,18 +194,11 @@ Logical FATR rtdb_put_(const Integer *handle, const char *name, const Integer *m
|
|||
else
|
||||
return FORTRAN_FALSE;
|
||||
}
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
Logical FATR rtdb_get_(const Integer *handle, _fcd name,
|
||||
const Integer *ma_type, const Integer *nelem,
|
||||
void *array)
|
||||
{
|
||||
int nlen = _fcdlen(name);
|
||||
#else
|
||||
Logical FATR rtdb_get_(const Integer *handle, const char *name,
|
||||
|
||||
Logical rtdb_get_(const Integer *handle, const char *name,
|
||||
const Integer *ma_type, const Integer *nelem,
|
||||
void *array, const int nlen)
|
||||
{
|
||||
#endif
|
||||
int hbuf = (int) *handle;
|
||||
char nbuf[256];
|
||||
int nelbuf;
|
||||
|
|
@ -313,16 +224,10 @@ Logical FATR rtdb_get_(const Integer *handle, const char *name,
|
|||
else
|
||||
return FORTRAN_FALSE;
|
||||
}
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
Logical FATR rtdb_ma_get_(const Integer *handle, _fcd name, Integer *ma_type,
|
||||
Integer *nelem, Integer *ma_handle)
|
||||
{
|
||||
int nlen = _fcdlen(name);
|
||||
#else
|
||||
Logical FATR rtdb_ma_get_(const Integer *handle, const char *name, Integer *ma_type,
|
||||
|
||||
Logical rtdb_ma_get_(const Integer *handle, const char *name, Integer *ma_type,
|
||||
Integer *nelem, Integer *ma_handle, const int nlen)
|
||||
{
|
||||
#endif
|
||||
int hbuf = (int) *handle;
|
||||
char nbuf[256];
|
||||
int nelbuf;
|
||||
|
|
@ -341,12 +246,12 @@ Logical FATR rtdb_ma_get_(const Integer *handle, const char *name, Integer *ma_t
|
|||
*nelem = (Integer) nelbuf;
|
||||
|
||||
return FORTRAN_TRUE;
|
||||
}
|
||||
else
|
||||
} else {
|
||||
return FORTRAN_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
Logical FATR rtdb_print_(const Integer *handle, const Logical *print_values)
|
||||
Logical rtdb_print_(const Integer *handle, const Logical *print_values)
|
||||
{
|
||||
int hbuf = (int) *handle;
|
||||
int pbuf = (int) *print_values;
|
||||
|
|
@ -374,20 +279,11 @@ Logical FATR rtdb_print_(const Integer *handle, const Logical *print_values)
|
|||
|
||||
\return Return FORTRAN_TRUE if successfull, and FORTRAN_FALSE otherwise.
|
||||
*/
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
Logical FATR rtdb_cput_(const Integer *handle, _fcd name,
|
||||
const Integer *nelem,
|
||||
_fcd farray)
|
||||
{
|
||||
int nlen = _fcdlen(name);
|
||||
int alen = _fcdlen(farray);
|
||||
char *array = _fcdtocp(farray);
|
||||
#else
|
||||
Logical FATR rtdb_cput_(const Integer *handle, const char *name,
|
||||
|
||||
Logical rtdb_cput_(const Integer *handle, const char *name,
|
||||
const Integer *nelem,
|
||||
const char *array, const int nlen, const int alen)
|
||||
{
|
||||
#endif
|
||||
/*
|
||||
Insert an array of Fortran character variables into the data base.
|
||||
Each array element is striped of trailing blanks, terminated with CR,
|
||||
|
|
@ -405,17 +301,7 @@ Logical FATR rtdb_cput_(const Integer *handle, const char *name,
|
|||
for (i=0, left=sizeof(abuf), next=abuf;
|
||||
i<*nelem;
|
||||
i++, array+=alen) {
|
||||
#if defined(CRAY) && !defined(__crayx1)
|
||||
_fcd element = _cptofcd(array, alen);
|
||||
#elif defined(WIN32) &&! defined(__MINGW32__)
|
||||
_fcd element;
|
||||
element.string = array;
|
||||
element.len = alen;
|
||||
#elif defined(USE_FCD)
|
||||
#error Do something about _fcd
|
||||
#else
|
||||
const char *element = array;
|
||||
#endif
|
||||
|
||||
if (!fortchar_to_string(element, alen, next, left)) {
|
||||
(void) fprintf(stderr, "rtdb_cput: abuf is too small, increase MXLGTH to=%d\n",
|
||||
|
|
@ -465,18 +351,11 @@ Logical FATR rtdb_cput_(const Integer *handle, const char *name,
|
|||
|
||||
\return Return FORTRAN_TRUE if successfull, and FORTRAN_FALSE otherwise.
|
||||
*/
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
Logical FATR rtdb_cget_size_(const Integer *handle, _fcd name,
|
||||
const Integer *nelem)
|
||||
{
|
||||
int nlen = _fcdlen(name);
|
||||
int alen = _fcdlen(farray);
|
||||
#else
|
||||
Logical FATR rtdb_cget_size_(const Integer *handle, const char *name,
|
||||
|
||||
Logical rtdb_cget_size_(const Integer *handle, const char *name,
|
||||
Integer *nelem,
|
||||
const int nlen, const int alen)
|
||||
{
|
||||
#endif
|
||||
|
||||
/*
|
||||
Read an array of Fortran character variables from the data base.
|
||||
|
|
@ -535,20 +414,11 @@ Logical FATR rtdb_cget_size_(const Integer *handle, const char *name,
|
|||
|
||||
\return Return FORTRAN_TRUE if successfull, and FORTRAN_FALSE otherwise.
|
||||
*/
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
Logical FATR rtdb_cget_(const Integer *handle, _fcd name,
|
||||
const Integer *nelem,
|
||||
_fcd farray)
|
||||
{
|
||||
int nlen = _fcdlen(name);
|
||||
int alen = _fcdlen(farray);
|
||||
char *array = _fcdtocp(farray);
|
||||
#else
|
||||
Logical FATR rtdb_cget_(const Integer *handle, const char *name,
|
||||
|
||||
Logical rtdb_cget_(const Integer *handle, const char *name,
|
||||
const Integer *nelem,
|
||||
char *array, const int nlen, const int alen)
|
||||
{
|
||||
#endif
|
||||
/*
|
||||
Read an array of Fortran character variables from the data base.
|
||||
|
||||
|
|
@ -579,23 +449,14 @@ Logical FATR rtdb_cget_(const Integer *handle, const char *name,
|
|||
fflush(stdout);
|
||||
#endif
|
||||
|
||||
if (!rtdb_get(hbuf, nbuf, typebuf, nelbuf, abuf))
|
||||
if (!rtdb_get(hbuf, nbuf, typebuf, nelbuf, abuf)) {
|
||||
return FORTRAN_FALSE; /* Not there */
|
||||
}
|
||||
|
||||
for (i=0, next=strtok(abuf, "\n");
|
||||
next;
|
||||
i++, array+=alen, next=strtok((char *) 0, "\n")) {
|
||||
#if defined(CRAY) && !defined(__crayx1)
|
||||
_fcd element = _cptofcd(array, alen);
|
||||
#elif defined(WIN32) &&! defined(__MINGW32__)
|
||||
_fcd element;
|
||||
element.string = array;
|
||||
element.len = alen;
|
||||
#elif defined(USE_FCD)
|
||||
#error Do something about _fcd
|
||||
#else
|
||||
char *element = array;
|
||||
#endif
|
||||
char *element = array;
|
||||
|
||||
if (i == *nelem) {
|
||||
(void) fprintf(stderr, "rtdb_cget: array has too few elements\n");
|
||||
|
|
@ -616,16 +477,8 @@ Logical FATR rtdb_cget_(const Integer *handle, const char *name,
|
|||
@}
|
||||
*/
|
||||
|
||||
#if (defined(_CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
Logical FATR rtdb_first_(const Integer *handle, _fcd name)
|
||||
#else
|
||||
Logical FATR rtdb_first_(const Integer *handle, char *name, int nlen)
|
||||
#endif
|
||||
Logical rtdb_first_(const Integer *handle, char *name, int nlen)
|
||||
{
|
||||
#if (defined(_CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
// dummy arg, value reassigned by string_to_fortchar in this case
|
||||
int nlen = _fcdlen(name);
|
||||
#endif
|
||||
char nbuf[256];
|
||||
|
||||
if (rtdb_first((int) *handle, (int) sizeof(nbuf), nbuf) &&
|
||||
|
|
@ -635,32 +488,20 @@ Logical FATR rtdb_first_(const Integer *handle, char *name, int nlen)
|
|||
return FORTRAN_FALSE;
|
||||
}
|
||||
|
||||
#if (defined(_CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
Logical FATR rtdb_next_(const Integer *handle, _fcd name)
|
||||
#else
|
||||
Logical FATR rtdb_next_(const Integer *handle, char *name, int nlen)
|
||||
#endif
|
||||
Logical rtdb_next_(const Integer *handle, char *name, int nlen)
|
||||
{
|
||||
#if (defined(_CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
// dummy arg, value reassigned by string_to_fortchar in this case
|
||||
int nlen = _fcdlen(name);
|
||||
#endif
|
||||
char nbuf[256];
|
||||
|
||||
if (rtdb_next((int) *handle, (int) sizeof(nbuf), nbuf) &&
|
||||
string_to_fortchar(name, nlen, nbuf))
|
||||
string_to_fortchar(name, nlen, nbuf)) {
|
||||
return FORTRAN_TRUE;
|
||||
else
|
||||
} else {
|
||||
return FORTRAN_FALSE;
|
||||
}
|
||||
}
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
Logical FATR rtdb_delete_(const Integer *handle, _fcd name)
|
||||
|
||||
Logical rtdb_delete_(const Integer *handle, const char *name, const int nlen)
|
||||
{
|
||||
int nlen = _fcdlen(name);
|
||||
#else
|
||||
Logical FATR rtdb_delete_(const Integer *handle, const char *name, const int nlen)
|
||||
{
|
||||
#endif
|
||||
int hbuf = (int) *handle;
|
||||
char nbuf[256];
|
||||
|
||||
|
|
@ -670,15 +511,16 @@ Logical FATR rtdb_delete_(const Integer *handle, const char *name, const int nle
|
|||
return FORTRAN_FALSE;
|
||||
}
|
||||
|
||||
if (rtdb_delete(hbuf, nbuf))
|
||||
if (rtdb_delete(hbuf, nbuf)) {
|
||||
return FORTRAN_TRUE;
|
||||
else
|
||||
} else {
|
||||
return FORTRAN_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
extern void rtdb_print_usage(void);
|
||||
|
||||
void FATR rtdb_print_usage_()
|
||||
void rtdb_print_usage_()
|
||||
{
|
||||
rtdb_print_usage();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -546,7 +546,7 @@ static void ReadArguments(argc, argv, ns, multi, print)
|
|||
*/
|
||||
#endif
|
||||
|
||||
#if (defined(CRAY) ||defined(WIN32))&& !defined(__crayx1) && !defined(__MINGW32__)
|
||||
#if (defined(CRAY) ||defined(WIN32)) && !defined(__MINGW32__)
|
||||
void FATR SELCI_COUPLE(Integer *pmulti, Integer *pns, Integer *pprint, char *pfilename, int flen)
|
||||
#else
|
||||
void FATR selci_couple_(Integer *pmulti, Integer *pns, Integer *pprint, char *pfilename, int flen)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#endif
|
||||
|
||||
|
||||
#if (defined(CRAY) || defined(WIN32))&& !defined(__crayx1) && !defined (__MINGW32__)
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined (__MINGW32__)
|
||||
#ifndef WIN32
|
||||
#define FATR
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#if defined(CRAY) && !defined(__crayx1)
|
||||
#if defined(CRAY)
|
||||
#include <fortran.h>
|
||||
#endif
|
||||
#ifdef WIN32
|
||||
|
|
@ -24,7 +24,7 @@ typedef int integer; /* Equivalent C type to FORTRAN integer */
|
|||
#endif
|
||||
|
||||
#define MAX_CLEN 4096
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
#if (defined(CRAY) || defined(USE_FCD))
|
||||
static int fortchar_to_string(_fcd f, int flen, char *buf,
|
||||
const int buflen)
|
||||
#else
|
||||
|
|
@ -32,7 +32,7 @@ static int fortchar_to_string(const char *f, int flen, char *buf,
|
|||
const int buflen)
|
||||
#endif
|
||||
{
|
||||
#if (defined(CRAY) || defined(USE_FCD))&& !defined(__crayx1)
|
||||
#if (defined(CRAY) || defined(USE_FCD))
|
||||
char *fstring = _fcdtocp(f);
|
||||
flen = _fcdlen(f);
|
||||
|
||||
|
|
@ -65,21 +65,21 @@ static int fortchar_to_string(const char *f, int flen, char *buf,
|
|||
static int string_to_fortchar( f, flen, buf)
|
||||
int flen;
|
||||
char *buf;
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
#if (defined(CRAY) || defined(USE_FCD))
|
||||
_fcd f;
|
||||
#else
|
||||
char *f;
|
||||
#endif
|
||||
{
|
||||
int len = strlen(buf), i;
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
#if (defined(CRAY) || defined(USE_FCD))
|
||||
flen = _fcdlen(f);
|
||||
#endif
|
||||
|
||||
if (len > flen)
|
||||
return 0; /* Won't fit */
|
||||
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
#if (defined(CRAY) || defined(USE_FCD))
|
||||
for (i=0; i<len; i++)
|
||||
_fcdtocp(f)[i] = buf[i];
|
||||
for (i=len; i<flen; i++)
|
||||
|
|
@ -93,7 +93,7 @@ static int string_to_fortchar( f, flen, buf)
|
|||
return 1;
|
||||
}
|
||||
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
#if (defined(CRAY) || defined(USE_FCD))
|
||||
logical context_set_(_fcd string, int len)
|
||||
#else
|
||||
logical context_set_(const char *string, int len)
|
||||
|
|
@ -112,7 +112,7 @@ logical context_set_(const char *string, int len)
|
|||
return FORTRAN_FALSE;
|
||||
}
|
||||
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
#if (defined(CRAY) || defined(USE_FCD))
|
||||
logical FATR context_get_(_fcd string, int len)
|
||||
#else
|
||||
logical context_get_(const char *string, int len)
|
||||
|
|
@ -143,13 +143,13 @@ logical context_srtdb_load_(integer *prtdb)
|
|||
else
|
||||
return FORTRAN_FALSE;
|
||||
}
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
#if (defined(CRAY) || defined(USE_FCD))
|
||||
logical FATR context_push_(_fcd string)
|
||||
#else
|
||||
logical context_push_(const char *string, int len)
|
||||
#endif
|
||||
{
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
#if (defined(CRAY) || defined(USE_FCD))
|
||||
int len = _fcdlen(string);
|
||||
#endif
|
||||
char buf[MAX_CLEN];
|
||||
|
|
@ -164,13 +164,13 @@ logical context_push_(const char *string, int len)
|
|||
else
|
||||
return FORTRAN_FALSE;
|
||||
}
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
#if (defined(CRAY) || defined(USE_FCD))
|
||||
logical FATR context_pop_(_fcd string)
|
||||
#else
|
||||
logical context_pop_(const char *string, int len)
|
||||
#endif
|
||||
{
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
#if (defined(CRAY) || defined(USE_FCD))
|
||||
int len = _fcdlen(string);
|
||||
#endif
|
||||
char buf[MAX_CLEN];
|
||||
|
|
@ -185,13 +185,13 @@ logical context_pop_(const char *string, int len)
|
|||
else
|
||||
return FORTRAN_FALSE;
|
||||
}
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
#if (defined(CRAY) || defined(USE_FCD))
|
||||
logical FATR context_prefix_(_fcd name, _fcd result)
|
||||
#else
|
||||
logical context_prefix_(const char *name, char *result, int nlen, int rlen)
|
||||
#endif
|
||||
{
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
#if (defined(CRAY) || defined(USE_FCD))
|
||||
int nlen = _fcdlen(name);
|
||||
int rlen = _fcdlen(result);
|
||||
#endif
|
||||
|
|
@ -210,14 +210,14 @@ logical context_prefix_(const char *name, char *result, int nlen, int rlen)
|
|||
|
||||
return FORTRAN_TRUE;
|
||||
}
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
#if (defined(CRAY) || defined(USE_FCD))
|
||||
logical FATR context_srtdb_match_(integer *prtdb, _fcd name, _fcd result)
|
||||
#else
|
||||
logical context_srtdb_match_(integer *prtdb, const char *name, char *result,
|
||||
int nlen, int rlen)
|
||||
#endif
|
||||
{
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
#if (defined(CRAY) || defined(USE_FCD))
|
||||
int nlen = _fcdlen(name);
|
||||
int rlen = _fcdlen(result);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*$Id$*/
|
||||
#if (defined(CRAY) || defined(WIN32)) &&!defined(__crayx1)
|
||||
#if (defined(CRAY) || defined(WIN32))
|
||||
#define context_pop_ CONTEXT_POP
|
||||
#define context_prefix_ CONTEXT_PREFIX
|
||||
#define context_push_ CONTEXT_PUSH
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#define FORTRAN_FALSE ((Logical) 0)
|
||||
|
||||
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
#if (defined(CRAY) || defined(USE_FCD))
|
||||
Logical FATR srtdb_open_(_fcd filename, _fcd mode, Integer *handle)
|
||||
{
|
||||
int flen = _fcdlen(filename);
|
||||
|
|
@ -46,7 +46,7 @@ Logical FATR srtdb_open_(const char *filename, const char *mode, Integer *handle
|
|||
}
|
||||
|
||||
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
#if (defined(CRAY) || defined(USE_FCD))
|
||||
Logical FATR srtdb_close_(const Integer *handle, _fcd mode)
|
||||
{
|
||||
int mlen = _fcdlen(mode);
|
||||
|
|
@ -66,7 +66,7 @@ Logical FATR srtdb_close_(const Integer *handle, const char *mode, const int mle
|
|||
else
|
||||
return FORTRAN_FALSE;
|
||||
}
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
#if (defined(CRAY) || defined(USE_FCD))
|
||||
Logical FATR srtdb_get_info_(const Integer *handle, _fcd name,
|
||||
Integer *ma_type, Integer *nelem, _fcd date)
|
||||
{
|
||||
|
|
@ -113,7 +113,7 @@ Logical FATR srtdb_get_info_(const Integer *handle, const char *name,
|
|||
return FORTRAN_FALSE;
|
||||
}
|
||||
}
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
#if (defined(CRAY) || defined(USE_FCD))
|
||||
Logical FATR srtdb_put_(const Integer *handle, _fcd name, const Integer *ma_type,
|
||||
const Integer *nelem, const void *array)
|
||||
{
|
||||
|
|
@ -147,7 +147,7 @@ Logical FATR srtdb_put_(const Integer *handle, const char *name, const Integer *
|
|||
else
|
||||
return FORTRAN_FALSE;
|
||||
}
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
#if (defined(CRAY) || defined(USE_FCD))
|
||||
Logical FATR srtdb_get_(const Integer *handle, _fcd name,
|
||||
const Integer *ma_type, const Integer *nelem,
|
||||
void *array)
|
||||
|
|
@ -197,7 +197,7 @@ Logical FATR srtdb_print_(const Integer *handle, const Logical *print_values)
|
|||
return FORTRAN_FALSE;
|
||||
}
|
||||
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
#if (defined(CRAY) || defined(USE_FCD))
|
||||
Logical FATR srtdb_cput_(const Integer *handle, _fcd name,
|
||||
const Integer *nelem,
|
||||
_fcd farray)
|
||||
|
|
@ -227,7 +227,7 @@ Logical FATR srtdb_cput_(const Integer *handle, const char *name,
|
|||
for (i=0, left=sizeof(abuf), next=abuf;
|
||||
i<*nelem;
|
||||
i++, array+=alen) {
|
||||
#if defined(CRAY) && !defined(__crayx1)
|
||||
#if defined(CRAY)
|
||||
_fcd element = _cptofcd(array, alen);
|
||||
#elif defined(WIN32)
|
||||
_fcd element;
|
||||
|
|
@ -271,7 +271,7 @@ Logical FATR srtdb_cput_(const Integer *handle, const char *name,
|
|||
}
|
||||
|
||||
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
#if (defined(CRAY) || defined(USE_FCD))
|
||||
Logical FATR srtdb_cget_(const Integer *handle, _fcd name,
|
||||
const Integer *nelem,
|
||||
_fcd farray)
|
||||
|
|
@ -322,7 +322,7 @@ Logical FATR srtdb_cget_(const Integer *handle, const char *name,
|
|||
for (i=0, next=strtok(abuf, "\n");
|
||||
next;
|
||||
i++, array+=alen, next=strtok((char *) 0, "\n")) {
|
||||
#if defined(CRAY) && !defined(__crayx1)
|
||||
#if defined(CRAY)
|
||||
_fcd element = _cptofcd(array, alen);
|
||||
#elif defined(WIN32)
|
||||
_fcd element;
|
||||
|
|
@ -350,13 +350,13 @@ Logical FATR srtdb_cget_(const Integer *handle, const char *name,
|
|||
}
|
||||
|
||||
|
||||
#if (defined(_CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
#if (defined(_CRAY) || defined(USE_FCD))
|
||||
Logical FATR srtdb_first_(const Integer *handle, _fcd name)
|
||||
#else
|
||||
Logical FATR srtdb_first_(const Integer *handle, char *name, int nlen)
|
||||
#endif
|
||||
{
|
||||
#if (defined(_CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
#if (defined(_CRAY) || defined(USE_FCD))
|
||||
// dummy arg, value reassigned by string_to_fortchar in this case
|
||||
int nlen = _fcdlen(name);
|
||||
#endif
|
||||
|
|
@ -369,13 +369,13 @@ Logical FATR srtdb_first_(const Integer *handle, char *name, int nlen)
|
|||
return FORTRAN_FALSE;
|
||||
}
|
||||
|
||||
#if (defined(_CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
#if (defined(_CRAY) || defined(USE_FCD))
|
||||
Logical FATR srtdb_next_(const Integer *handle, _fcd name)
|
||||
#else
|
||||
Logical FATR srtdb_next_(const Integer *handle, char *name, int nlen)
|
||||
#endif
|
||||
{
|
||||
#if (defined(_CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
#if (defined(_CRAY) || defined(USE_FCD))
|
||||
// dummy arg, value reassigned by string_to_fortchar in this case
|
||||
int nlen = _fcdlen(name);
|
||||
#endif
|
||||
|
|
@ -387,7 +387,7 @@ Logical FATR srtdb_next_(const Integer *handle, char *name, int nlen)
|
|||
else
|
||||
return FORTRAN_FALSE;
|
||||
}
|
||||
#if (defined(CRAY) || defined(USE_FCD)) && !defined(__crayx1)
|
||||
#if (defined(CRAY) || defined(USE_FCD))
|
||||
Logical FATR srtdb_delete_(const Integer *handle, _fcd name)
|
||||
{
|
||||
int nlen = _fcdlen(name);
|
||||
|
|
|
|||
|
|
@ -79,11 +79,7 @@ extern int ARMCI_AccS( /* strided accumulate */
|
|||
);
|
||||
|
||||
|
||||
#ifdef __crayx1__
|
||||
#define ARMCI_Get(_s,_d,_b,_p) memcpy(_d,_s,_b), 0
|
||||
#else
|
||||
extern int ARMCI_Get(void *src, void* dst, int bytes, int proc);
|
||||
#endif
|
||||
|
||||
extern int ARMCI_GetS( /* strided get */
|
||||
void *src_ptr, /* pointer to 1st segment at source*/
|
||||
|
|
|
|||
|
|
@ -1,14 +1,6 @@
|
|||
/*
|
||||
$Id$
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#if defined(CRAY) && !defined(__crayx1)
|
||||
#define FATR
|
||||
#include <fortran.h>
|
||||
#endif
|
||||
#include "typesf2c.h"
|
||||
#include "ecce_print.h"
|
||||
#include "macommon.h"
|
||||
|
|
@ -347,31 +339,8 @@ static int fortchar_to_string(const char *f, int flen, char *buf,
|
|||
return 1;
|
||||
}
|
||||
|
||||
#if defined(USE_FCD)
|
||||
#define ecce_print_file_open_ ECCE_PRINT_FILE_OPEN
|
||||
#define ecce_print_file_close_ ECCE_PRINT_FILE_CLOSE
|
||||
#define ecce_print_control_ ECCE_PRINT_CONTROL
|
||||
#define ecce_print1_ ECCE_PRINT1
|
||||
#define ecce_print2_ ECCE_PRINT2
|
||||
#define ecce_print2_dbl_tol_ ECCE_PRINT2_DBL_TOL
|
||||
#define ecce_print1_char_ ECCE_PRINT1_CHAR
|
||||
#define ecce_print_module_entry_ ECCE_PRINT_MODULE_ENTRY
|
||||
#define ecce_print_module_exit_ ECCE_PRINT_MODULE_EXIT
|
||||
#define ecce_print_echo_input_ ECCE_PRINT_ECHO_INPUT
|
||||
#define ecce_print_echo_string_ ECCE_PRINT_ECHO_STRING
|
||||
#define ecce_print_version_ ECCE_PRINT_VERSION
|
||||
#define is_ecce_print_on_ IS_ECCE_PRINT_ON
|
||||
#endif
|
||||
|
||||
#if defined(USE_FCD)
|
||||
void FATR ecce_print_file_open_(_fcd f)
|
||||
{
|
||||
const char *filename = _fcdtocp(f);
|
||||
int flen = _fcdlen(f);
|
||||
#else
|
||||
void FATR ecce_print_file_open_(const char *filename, int flen)
|
||||
{
|
||||
#endif
|
||||
char buf[1024];
|
||||
|
||||
if (!fortchar_to_string(filename, flen, buf, sizeof(buf))) {
|
||||
|
|
@ -388,15 +357,8 @@ void FATR ecce_print_file_close_(void)
|
|||
ecce_print_file_close();
|
||||
}
|
||||
|
||||
#if defined(USE_FCD)
|
||||
void FATR ecce_print_echo_input_(_fcd f)
|
||||
{
|
||||
const char *filename = _fcdtocp(f);
|
||||
int flen = _fcdlen(f);
|
||||
#else
|
||||
void FATR ecce_print_echo_input_(const char *filename, int flen)
|
||||
{
|
||||
#endif
|
||||
char buf[1024];
|
||||
|
||||
if (!fortchar_to_string(filename, flen, buf, sizeof(buf))) {
|
||||
|
|
@ -415,18 +377,10 @@ void FATR ecce_print_control_(Integer *pnew, Integer *pold)
|
|||
*pold = (Integer) old;
|
||||
}
|
||||
|
||||
#if defined(USE_FCD)
|
||||
void FATR ecce_print2_(_fcd f, Integer *ma_type,
|
||||
const void *data, Integer *ld1, Integer *dim1, Integer *dim2)
|
||||
{
|
||||
const char *key = _fcdtocp(f);
|
||||
int keylen = _fcdlen(f);
|
||||
#else
|
||||
void FATR ecce_print2_(const char *key, Integer *ma_type,
|
||||
const void *data, Integer *ld1, Integer *dim1, Integer *dim2,
|
||||
int keylen)
|
||||
{
|
||||
#endif
|
||||
char buf[1024];
|
||||
|
||||
if (!fortchar_to_string(key, keylen, buf, sizeof(buf))) {
|
||||
|
|
@ -439,21 +393,11 @@ void FATR ecce_print2_(const char *key, Integer *ma_type,
|
|||
(int) *dim2);
|
||||
}
|
||||
|
||||
#if defined(USE_FCD)
|
||||
void FATR ecce_print2_dbl_tol_(_fcd f,
|
||||
const double *data, Integer *ld1,
|
||||
Integer *dim1, Integer *dim2,
|
||||
const double *tol)
|
||||
{
|
||||
const char *key = _fcdtocp(f);
|
||||
int keylen = _fcdlen(f);
|
||||
#else
|
||||
void FATR ecce_print2_dbl_tol_(const char *key,
|
||||
const double *data,
|
||||
Integer *ld1, Integer *dim1, Integer *dim2,
|
||||
const double *tol, int keylen)
|
||||
{
|
||||
#endif
|
||||
char buf[1024];
|
||||
|
||||
if (!fortchar_to_string(key, keylen, buf, sizeof(buf))) {
|
||||
|
|
@ -466,16 +410,9 @@ void FATR ecce_print2_dbl_tol_(const char *key,
|
|||
(int) *dim2, *tol);
|
||||
}
|
||||
|
||||
#if defined(USE_FCD)
|
||||
void FATR ecce_print1_( _fcd f, Integer *ma_type, const void *data, Integer *dim1)
|
||||
{
|
||||
const char *key = _fcdtocp(f);
|
||||
int keylen = _fcdlen(f);
|
||||
#else
|
||||
void FATR ecce_print1_(const char *key, Integer *ma_type,
|
||||
const void *data, Integer *dim1, int keylen)
|
||||
{
|
||||
#endif
|
||||
char buf[1024];
|
||||
if (!ecce_print_enabled) return;
|
||||
if (!fortchar_to_string(key, keylen, buf, sizeof(buf))) {
|
||||
|
|
@ -487,15 +424,8 @@ void FATR ecce_print1_(const char *key, Integer *ma_type,
|
|||
ecce_print1(buf, (int) *ma_type, data, (int) *dim1);
|
||||
}
|
||||
|
||||
#if defined(USE_FCD)
|
||||
void FATR ecce_print_module_entry_(_fcd f)
|
||||
{
|
||||
const char *module = _fcdtocp(f);
|
||||
int modlen = _fcdlen(f);
|
||||
#else
|
||||
void FATR ecce_print_module_entry_(const char *module, int modlen)
|
||||
{
|
||||
#endif
|
||||
char buf[1024];
|
||||
if (!ecce_print_enabled) return;
|
||||
if (!fortchar_to_string(module, modlen, buf, sizeof(buf))) {
|
||||
|
|
@ -507,18 +437,9 @@ void FATR ecce_print_module_entry_(const char *module, int modlen)
|
|||
ecce_print_module_entry(buf);
|
||||
}
|
||||
|
||||
#if defined(USE_FCD)
|
||||
void FATR ecce_print_module_exit_(_fcd f, _fcd g)
|
||||
{
|
||||
const char *module = _fcdtocp(f);
|
||||
int modlen = _fcdlen(f);
|
||||
const char *status = _fcdtocp(g);
|
||||
int statlen = _fcdlen(g);
|
||||
#else
|
||||
void FATR ecce_print_module_exit_(const char *module, const char *status,
|
||||
int modlen, int statlen)
|
||||
{
|
||||
#endif
|
||||
char buf[1024], buf1[1024];
|
||||
if (!ecce_print_enabled) return;
|
||||
if (!fortchar_to_string(module, modlen, buf, sizeof(buf))) {
|
||||
|
|
@ -536,18 +457,9 @@ void FATR ecce_print_module_exit_(const char *module, const char *status,
|
|||
ecce_print_module_exit(buf, buf1);
|
||||
}
|
||||
|
||||
#if defined(USE_FCD)
|
||||
void FATR ecce_print1_char_( _fcd f, _fcd g, Integer *dim1)
|
||||
{
|
||||
const char *key = _fcdtocp(f);
|
||||
const char *data = _fcdtocp(g);
|
||||
int keylen = _fcdlen(f);
|
||||
int dlen = _fcdlen(g);
|
||||
#else
|
||||
void FATR ecce_print1_char_(const char *key, const char *data, Integer *dim1,
|
||||
int keylen, int dlen)
|
||||
{
|
||||
#endif
|
||||
char buf[1024], buf1[1024];
|
||||
int i;
|
||||
if (!ecce_print_enabled) return;
|
||||
|
|
@ -570,15 +482,8 @@ void FATR ecce_print1_char_(const char *key, const char *data, Integer *dim1,
|
|||
fflush(ecce_file);
|
||||
}
|
||||
|
||||
#if defined(USE_FCD)
|
||||
void FATR ecce_print_echo_string_(_fcd f)
|
||||
{
|
||||
const char *filename = _fcdtocp(f);
|
||||
int flen = _fcdlen(f);
|
||||
#else
|
||||
void FATR ecce_print_echo_string_(const char *filename, int flen)
|
||||
{
|
||||
#endif
|
||||
char buf[1024];
|
||||
|
||||
if (!fortchar_to_string(filename, flen, buf, sizeof(buf))) {
|
||||
|
|
@ -590,15 +495,8 @@ void FATR ecce_print_echo_string_(const char *filename, int flen)
|
|||
ecce_print_echo_string(buf);
|
||||
}
|
||||
|
||||
#if defined(USE_FCD)
|
||||
void FATR ecce_print_version_(_fcd f)
|
||||
{
|
||||
const char *filename = _fcdtocp(f);
|
||||
int flen = _fcdlen(f);
|
||||
#else
|
||||
void FATR ecce_print_version_(const char *filename, int flen)
|
||||
{
|
||||
#endif
|
||||
char buf[1024];
|
||||
|
||||
if (!fortchar_to_string(filename, flen, buf, sizeof(buf))) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*$Id$*/
|
||||
/* Name munging to handle the various conventions for Fortran-C interfacing */
|
||||
#if (defined(CRAY) || defined(ARDENT) || defined(WIN32)) && !defined(__crayx1)&&!defined(__MINGW32__)
|
||||
#if (defined(ARDENT) || defined(WIN32)) && !defined(__MINGW32__)
|
||||
# define FCSND_ FCSND
|
||||
# define FCRCV_ FCRCV
|
||||
#else
|
||||
|
|
@ -18,10 +18,6 @@
|
|||
|
||||
#include <tcgmsg.h>
|
||||
#include <string.h>
|
||||
#if defined(CRAY) && !defined(__crayx1)
|
||||
#define FATR
|
||||
#include <fortran.h> /* Required for Fortran-C string interface on Crays */
|
||||
#endif /* CRAY */
|
||||
#ifdef WIN32
|
||||
#include "typesf2c.h"
|
||||
#endif
|
||||
|
|
@ -35,30 +31,11 @@
|
|||
**/
|
||||
|
||||
|
||||
#if defined(USE_FCD)
|
||||
void FATR FCSND_(type, fcd, node, sync)
|
||||
long *type;
|
||||
_fcd fcd;
|
||||
long *node;
|
||||
long *sync;
|
||||
#else /* CRAY */
|
||||
void FCSND_(type, fstring, node, sync, flength)
|
||||
long *type;
|
||||
long *node;
|
||||
long *sync;
|
||||
char *fstring;
|
||||
long flength; /* Length of fstring, implicitly passed by FORTRAN */
|
||||
#endif /* CRAY */
|
||||
void FCSND_(long *type, char *fstring, long *node, long *sync,
|
||||
long flength) /* Length of fstring, implicitly passed by FORTRAN */
|
||||
{
|
||||
char cstring[FC_MAXLEN];
|
||||
long fpos, clength, lenbuf=sizeof cstring;
|
||||
#if defined(USE_FCD)
|
||||
char *fstring; /* FORTRAN string */
|
||||
long flength; /* length of fstring */
|
||||
|
||||
fstring = _fcdtocp(fcd);
|
||||
flength = _fcdlen(fcd);
|
||||
#endif /* CRAY */
|
||||
long fpos, clength, lenbuf=sizeof(cstring);
|
||||
|
||||
/* If the Fortran string is too long it is sent in chunks */
|
||||
fpos = 0;
|
||||
|
|
@ -84,34 +61,12 @@ void FCSND_(type, fstring, node, sync, flength)
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(USE_FCD)
|
||||
void FATR FCRCV_(type, fcd, flength, nodeselect, nodefrom, sync)
|
||||
long *type;
|
||||
_fcd fcd;
|
||||
long *flength;
|
||||
long *nodeselect;
|
||||
long *nodefrom;
|
||||
long *sync;
|
||||
#else /* CRAY */
|
||||
void FCRCV_(type, fstring, flength, nodeselect, nodefrom, sync, fsize)
|
||||
long *type;
|
||||
char *fstring;
|
||||
long *flength;
|
||||
long *nodeselect;
|
||||
long *nodefrom;
|
||||
long *sync;
|
||||
long fsize; /* Length of fstring, implicitly passed by FORTRAN */
|
||||
#endif
|
||||
void FCRCV_( long *type, char *fstring, long *flength,
|
||||
long *nodeselect, long *nodefrom, long *sync,
|
||||
long fsize) /* Length of fstring, implicitly passed by FORTRAN */
|
||||
{
|
||||
char cstring[FC_MAXLEN];
|
||||
long i, clength, lenbuf=sizeof cstring;
|
||||
#if defined(USE_FCD)
|
||||
char *fstring; /* FORTRAN string */
|
||||
long fsize; /* length of fstring */
|
||||
|
||||
fstring = _fcdtocp(fcd);
|
||||
fsize = _fcdlen(fcd);
|
||||
#endif /* CRAY */
|
||||
long i, clength, lenbuf=sizeof(cstring);
|
||||
|
||||
/* Collect the text, which may be broken into multiple messages */
|
||||
*flength = 0;
|
||||
|
|
|
|||
|
|
@ -1,13 +1,9 @@
|
|||
#if (defined(CRAY) || defined(ARDENT) || defined(WIN32))&& !defined(__crayx1)&&!defined(__MINGW32__)
|
||||
#if (defined(ARDENT) || defined(WIN32)) && !defined(__MINGW32__)
|
||||
# define ga_access_callback_release_ GA_ACCESS_CALLBACK_RELEASE
|
||||
#endif
|
||||
|
||||
#include "ga.h"
|
||||
#include "macdecls.h"
|
||||
#if defined(CRAY)&& !defined(__crayx1)
|
||||
#define FATR
|
||||
#include <fortran.h> /* Required for Fortran-C string interface on Crays */
|
||||
#endif /* CRAY */
|
||||
#ifdef WIN32
|
||||
#include "typesf2c.h"
|
||||
#endif
|
||||
|
|
@ -44,9 +40,9 @@
|
|||
|
||||
/*\ PROVIDE ACCESS TO A PATCH OF A GLOBAL ARRAY WITH CALLBACK AND RELEASE
|
||||
\*/
|
||||
void FATR ga_access_callback_release_(g_a, ilo, ihi, jlo, jhi,
|
||||
callback,
|
||||
arg1, arg2, arg3, arg4, arg5, arg6, arg7)
|
||||
void ga_access_callback_release_(g_a, ilo, ihi, jlo, jhi,
|
||||
callback,
|
||||
arg1, arg2, arg3, arg4, arg5, arg6, arg7)
|
||||
Integer *g_a, *ilo, *ihi, *jlo, *jhi;
|
||||
Integer (*callback)(Integer *,Integer *,Integer *,Integer *,Integer *,
|
||||
void *, Integer*,
|
||||
|
|
@ -79,7 +75,7 @@ void FATR ga_access_callback_release_(g_a, ilo, ihi, jlo, jhi,
|
|||
}
|
||||
}
|
||||
|
||||
void FATR nga_access_callback_release_(g_a, ilo, ihi,
|
||||
void nga_access_callback_release_(g_a, ilo, ihi,
|
||||
callback,
|
||||
arg1, arg2, arg3, arg4, arg5, arg6, arg7)
|
||||
Integer *g_a, ilo[], ihi[];
|
||||
|
|
|
|||
|
|
@ -2,22 +2,15 @@
|
|||
#include <stdlib.h>
|
||||
#include "mdglobal.h"
|
||||
#include "md5.h"
|
||||
#if defined(CRAY)&& !defined(__crayx1)
|
||||
#include <fortran.h>
|
||||
#endif
|
||||
#include "typesf2c.h"
|
||||
|
||||
/*
|
||||
$Id$
|
||||
*/
|
||||
|
||||
#if defined(USE_FCD)
|
||||
extern int string_to_fortchar(_fcd f, int flen, char *buf);
|
||||
#else
|
||||
extern int string_to_fortchar(char *f, int flen, char *buf);
|
||||
#endif
|
||||
|
||||
#if (defined(CRAY) || defined(WIN32))&& !defined(__crayx1) &&!defined(__MINGW32__)
|
||||
#if (defined(WIN32)) && !defined(__MINGW32__)
|
||||
#define checksum_simple_ CHECKSUM_SIMPLE
|
||||
#define checksum_init_ CHECKSUM_INIT
|
||||
#define checksum_update_ CHECKSUM_UPDATE
|
||||
|
|
@ -169,17 +162,10 @@ requires a special interface for Fortran.
|
|||
\param len [Input] The number of characters in the string
|
||||
*/
|
||||
|
||||
#if defined(USE_FCD)
|
||||
void FATR checksum_char_update_(_fcd f)
|
||||
{
|
||||
checksum_update(_fcdlen(f), _fcdtocp(f));
|
||||
}
|
||||
#else
|
||||
void FATR checksum_char_update_(const char *buf, int len)
|
||||
{
|
||||
checksum_update(len, buf);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
\brief Fortran binding for `checksum_final`
|
||||
|
|
@ -189,14 +175,8 @@ void FATR checksum_char_update_(const char *buf, int len)
|
|||
|
||||
*/
|
||||
|
||||
#if defined(USE_FCD)
|
||||
void FATR checksum_final_(_fcd f)
|
||||
{
|
||||
int flen = _fcdlen(f);
|
||||
#else
|
||||
void FATR checksum_final_(char *f, int flen)
|
||||
{
|
||||
#endif
|
||||
char tmp[33];
|
||||
|
||||
checksum_final(tmp);
|
||||
|
|
@ -218,21 +198,12 @@ Fortran compared to C. Hence a special function is needed for that data type.
|
|||
\param f [Output] The checksum
|
||||
*/
|
||||
|
||||
#if defined(USE_FCD)
|
||||
void checksum_simple_(integer *len, const void *buf, _fcd f)
|
||||
{
|
||||
checksum_init();
|
||||
checksum_update((int) *len, buf);
|
||||
checksum_final_(f);
|
||||
}
|
||||
#else
|
||||
void checksum_simple_(integer *len, const void *buf, char *f, int flen)
|
||||
{
|
||||
checksum_init();
|
||||
checksum_update((int) *len, buf);
|
||||
checksum_final_(f, flen);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
\brief The Fortran binding for `checksum_simple` for character strings
|
||||
|
|
@ -245,21 +216,12 @@ Fortran compared to C. Hence a special function is needed for that data type.
|
|||
\param f [Output] The checksum
|
||||
*/
|
||||
|
||||
#if defined(USE_FCD)
|
||||
void checksum_char_simple_(_fcd b, _fcd f)
|
||||
{
|
||||
checksum_init();
|
||||
checksum_char_update_(b);
|
||||
checksum_final_(f);
|
||||
}
|
||||
#else
|
||||
void checksum_char_simple_(const char *buf, char *sum, int blen, int slen)
|
||||
{
|
||||
checksum_init();
|
||||
checksum_char_update_(buf, blen);
|
||||
checksum_final_(sum, slen);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MD5TEST
|
||||
int cmain()
|
||||
|
|
@ -279,31 +241,15 @@ int cmain()
|
|||
|
||||
/* Normally defined by NWChem */
|
||||
|
||||
#if defined(USE_FCD)
|
||||
static int string_to_fortchar(_fcd f, int flen, char *buf)
|
||||
#else
|
||||
static int string_to_fortchar(char *f, int flen, char *buf)
|
||||
#endif
|
||||
{
|
||||
int len = (int) strlen(buf), i;
|
||||
#if defined(USE_FCD)
|
||||
flen = _fcdlen(f);
|
||||
#endif
|
||||
|
||||
if (len > flen)
|
||||
return 0; /* Won't fit */
|
||||
if (len > flen) return 0; /* Won't fit */
|
||||
|
||||
for (i=0; i<len; i++) f[i] = buf[i];
|
||||
for (i=len; i<flen; i++) f[i] = ' ';
|
||||
|
||||
#if defined(USE_FCD)
|
||||
for (i=0; i<len; i++)
|
||||
_fcdtocp(f)[i] = buf[i];
|
||||
for (i=len; i<flen; i++)
|
||||
_fcdtocp(f)[i] = ' ';
|
||||
#else
|
||||
for (i=0; i<len; i++)
|
||||
f[i] = buf[i];
|
||||
for (i=len; i<flen; i++)
|
||||
f[i] = ' ';
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#if (defined(CRAY) || defined(WIN32) || defined(HITACHI))&&!defined(__crayx1)&&!defined(__MINGW32__)
|
||||
#if (defined(CRAY) || defined(WIN32) || defined(HITACHI)) && !defined(__MINGW32__)
|
||||
|
||||
#define print_range_ PRINT_RANGE
|
||||
#define copy_range_ COPY_RANGE
|
||||
|
|
|
|||
|
|
@ -1,25 +1,15 @@
|
|||
/*$Id$*/
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
#if !defined(IPSC) && !defined(WIN32)
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#if defined(CRAY) && !defined(__crayx1)
|
||||
#define util_date_ UTIL_DATE
|
||||
#include <fortran.h>
|
||||
#define FATR
|
||||
#endif
|
||||
#if defined(WIN32) &&!defined(__MINGW32__)
|
||||
#define util_date_ UTIL_DATE
|
||||
#include "typesf2c.h"
|
||||
#endif
|
||||
|
||||
#if defined(USE_FCD)
|
||||
int string_to_fortchar(_fcd, int, const char *);
|
||||
#else
|
||||
int string_to_fortchar(char *, int, const char *);
|
||||
#endif
|
||||
|
||||
/*
|
||||
Routine to return to FORTRAN the current date in
|
||||
|
|
@ -30,14 +20,8 @@ int string_to_fortchar(char *, int, const char *);
|
|||
*/
|
||||
|
||||
|
||||
#if defined(USE_FCD)
|
||||
void FATR util_date_(_fcd date)
|
||||
{
|
||||
int nlen = _fcdlen(date);
|
||||
#else
|
||||
void util_date_(char *date, int nlen)
|
||||
{
|
||||
#endif
|
||||
time_t t = time((time_t *) 0);
|
||||
char *tmp = ctime(&t);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
#include "ga.h"
|
||||
#if (defined(CRAY) || defined(WIN32) || defined(CATAMOUNT))&& !defined(__crayx1)
|
||||
#if (defined(CRAY) || defined(WIN32) || defined(CATAMOUNT))
|
||||
|
||||
#include "typesf2c.h"
|
||||
|
||||
#if defined(CRAY) && !defined(__crayx1)
|
||||
#if defined(CRAY)
|
||||
#define util_debug_ UTIL_DEBUG
|
||||
#include <fortran.h>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,21 +1,9 @@
|
|||
/*
|
||||
$Id$
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#if defined(CRAY) && !defined(__crayx1)
|
||||
#include <fortran.h>
|
||||
#define FATR
|
||||
#endif
|
||||
#include "ga.h"
|
||||
#include "typesf2c.h"
|
||||
|
||||
#if defined(USE_FCD)
|
||||
int fortchar_to_string(_fcd, int, char *, const int);
|
||||
#else
|
||||
Integer fortchar_to_string(const char *, Integer, char *, const Integer);
|
||||
#endif
|
||||
|
||||
void util_file_copy(const char *input, const char *output)
|
||||
/*
|
||||
|
|
@ -111,15 +99,8 @@ void util_file_parallel_copy(const char *input, const char *output)
|
|||
if (fout) (void) fclose(fout);
|
||||
}
|
||||
|
||||
#if defined(USE_FCD)
|
||||
void FATR UTIL_FILE_COPY(_fcd input, _fcd output)
|
||||
{
|
||||
int lin = _fcdlen(input);
|
||||
int lout = _fcdlen(output);
|
||||
#else
|
||||
void util_file_copy_(const char *input, const char *output, Integer lin, Integer lout)
|
||||
{
|
||||
#endif
|
||||
char in[255], out[255];
|
||||
if (!fortchar_to_string(input, lin, in, sizeof(in)))
|
||||
GA_Error("util_file_copy: fortchar_to_string failed for in",0);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
/*
|
||||
$Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
Try to route all sequential file operations thru eaf/elio
|
||||
so that can handle extents correctly
|
||||
|
|
@ -16,18 +12,11 @@
|
|||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#if defined(CRAY) && !defined(__crayx1)
|
||||
#include <fortran.h>
|
||||
#define FATR
|
||||
#endif
|
||||
|
||||
#include "eaf.h"
|
||||
#include "ga.h"
|
||||
|
||||
#if defined(USE_FCD)
|
||||
int fortchar_to_string(_fcd, int, char *, const int);
|
||||
#else
|
||||
int fortchar_to_string(const char *, int, char *, const int);
|
||||
#endif
|
||||
|
||||
void util_file_unlink(const char *filename)
|
||||
/*
|
||||
|
|
@ -48,14 +37,8 @@ void util_file_unlink(const char *filename)
|
|||
GA_Error("util_file_unlink",0);
|
||||
}
|
||||
|
||||
#if defined(USE_FCD)
|
||||
void FATR UTIL_FILE_UNLINK(_fcd input)
|
||||
{
|
||||
int lin = _fcdlen(input);
|
||||
#else
|
||||
void util_file_unlink_(const char *input, int lin)
|
||||
{
|
||||
#endif
|
||||
char in[255];
|
||||
if (!fortchar_to_string(input, lin, in, sizeof(in)))
|
||||
GA_Error("util_file_unlink: fortchar_to_string failed for in",0);
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
/*$Id$*/
|
||||
#include <stdio.h>
|
||||
#if defined(CRAY) && !defined(__crayx1)
|
||||
#include <fortran.h>
|
||||
#define FATR
|
||||
#endif
|
||||
|
||||
#if defined(WIN32) && !defined(__MINGW32__)
|
||||
#include "typesf2c.h"
|
||||
extern int FATR gethostname(char *, int);
|
||||
|
|
@ -13,17 +9,9 @@ extern int FATR gethostname(char *, int);
|
|||
extern int gethostname(char *, int);
|
||||
#endif
|
||||
|
||||
#if defined(USE_FCD)
|
||||
extern int string_to_fortchar(_fcd, int, const char *);
|
||||
void FATR UTIL_HOSTNAME(name)
|
||||
_fcd name;
|
||||
{
|
||||
int namelen = _fcdlen(name);
|
||||
#else
|
||||
extern int string_to_fortchar(char *, int, const char *);
|
||||
void util_hostname_(char *name, int namelen)
|
||||
{
|
||||
#endif
|
||||
/*
|
||||
Utility routine to return hostname to FORTRAN
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#if defined(CRAY) && !defined(__crayx1)
|
||||
#if defined(CRAY)
|
||||
#define create_server_socket_ CREATE_SERVER_SOCKET
|
||||
#define create_client_socket_ CREATE_CLIENT_SOCKET
|
||||
#define client_socket_write_ CLIENT_SOCKET_WRITE
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
everything is correctly aligned. So you cannot copy common
|
||||
blocks or packed buffers, without doing the right thing */
|
||||
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined(__crayx1) &&!defined(__MINGW32__)
|
||||
#if (defined(CRAY) || defined(WIN32)) && !defined(__MINGW32__)
|
||||
#define util_memcpy_ UTIL_MEMCPY
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -868,7 +868,7 @@ C>
|
|||
read(LuOut,*,ERR=30,END=30) ch_tmp
|
||||
end do
|
||||
30 continue
|
||||
#if defined(FUJITSU) || defined(PSCALE) || defined(__crayx1)
|
||||
#if defined(FUJITSU) || defined(PSCALE)
|
||||
backspace LuOut
|
||||
#endif
|
||||
* **** FILE does not exist ****
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
$Id$
|
||||
*/
|
||||
|
||||
#if defined(CRAY) &&!defined(__crayx1)
|
||||
#if defined(CRAY)
|
||||
|
||||
void UTIL_SLEEP(long *t)
|
||||
{}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
/*
|
||||
$Id$
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifdef WIN32
|
||||
|
|
@ -45,12 +41,7 @@ void util_speak(const char *string)
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef CRAY
|
||||
#define FATR
|
||||
void UTIL_SPEAK(const char *string, int len)
|
||||
#else
|
||||
void util_speak_(const char *string, int len)
|
||||
#endif
|
||||
{
|
||||
#ifdef SPEECH
|
||||
char buf[256];
|
||||
|
|
@ -62,11 +53,7 @@ void util_speak_(const char *string, int len)
|
|||
#endif
|
||||
}
|
||||
|
||||
#if defined(USE_FCD)
|
||||
void FATR UTIL_SPEAK_INIT(const char *host, integer *fp, int len)
|
||||
#else
|
||||
void util_speak_init_(const char *host, integer *fp, int len)
|
||||
#endif
|
||||
{
|
||||
#ifdef SPEECH
|
||||
char buf[256];
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
/*
|
||||
$Id$
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#ifndef WIN32
|
||||
#include <unistd.h>
|
||||
|
|
@ -9,10 +5,6 @@
|
|||
|
||||
extern int system(const char *);
|
||||
|
||||
#if defined(CRAY) && !defined(__crayx1)
|
||||
#include <fortran.h>
|
||||
#define FATR
|
||||
#endif
|
||||
#if defined(WIN32) && !defined(__MINGW32__)
|
||||
#include "typesf2c.h"
|
||||
#endif
|
||||
|
|
@ -21,23 +13,13 @@ void GA_Error(char *str, int code);
|
|||
|
||||
typedef long Integer; /* FORTRAN integer */
|
||||
|
||||
#if defined(USE_FCD)
|
||||
int fortchar_to_string(_fcd, int, char *, const int);
|
||||
#else
|
||||
int fortchar_to_string(const char *, int, char *, const int);
|
||||
#endif
|
||||
|
||||
#if defined(USE_FCD)
|
||||
Integer FATR UTIL_SYSTEM(_fcd input)
|
||||
{
|
||||
int lin = _fcdlen(input);
|
||||
#else
|
||||
Integer util_system_(const char *input, int lin)
|
||||
{
|
||||
#endif
|
||||
#if defined(LINUX) && !defined(__x86_64__)
|
||||
int i;
|
||||
void (*Siginit)();
|
||||
void (*Siginit)();
|
||||
#endif
|
||||
char in[1024];
|
||||
if (!fortchar_to_string(input, lin, in, sizeof(in)))
|
||||
|
|
|
|||
|
|
@ -1,14 +1,7 @@
|
|||
/*
|
||||
$Id$
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "typesf2c.h"
|
||||
|
||||
#if defined(USE_FCD)
|
||||
#define util_batch_job_time_remaining_ UTIL_BATCH_JOB_TIME_REMAINING
|
||||
#endif
|
||||
|
||||
#define NOT_AVAILABLE -1
|
||||
|
||||
/* util_batch_job_time_remaining returns the wall time (>=0) in seconds
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue