亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? main_mpi.c

?? 用于2維的射線追蹤
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* * Ray2mesh : software for geophysicists. * Compute various scores attached to the mesh cells, based on geometric   information that rays bring when they traverse cells. * * Copyright (C) 2003, St閜hane Genaud and Marc Grunberg * * This tool is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */#include <stdio.h>#include <stddef.h>		/* for offsetof */#include "util.h"		/* get_date_stamp() */#ifdef USE_MPILB#include <mpilb/tag.h>#endif#include "r2mfile.h"#include "merge.h"#include "save_to_disk.h"#define  ROOT 0			/* the MPI rank of sender */#define MPI_MSG_DATA       1001#define MAX_LENGTH_RANK 10/*----------------------------------------------------------------------*//* send_or_recv_raydata : given a raydata_t array, give each MPI process *//* a part this array. The root process sends a sizeperproc element part *//* of raydata to each process, and each slave process receives this part*//* that it stores in the recv buffer                                    *//*----------------------------------------------------------------------*/struct raydata_t *send_or_recv_raydata (struct raydata_t *raydata, int sizeperproc, int root){  struct raydata_t *rbuff;	/* receive buffer */  MPI_Datatype mpi_raydata;  int blen[10];			/* length in bytes of each field */  MPI_Datatype oldtypes[10];	/* type of each field */  MPI_Aint indices[10];		/* offset in bytes of each field */  /* every process receives data (root as well) */#ifndef USE_MPILB  rbuff = (struct raydata_t *)    malloc (sizeperproc * sizeof (struct raydata_t));#else  rbuff = malloc (tag_spp[rank] * sizeof *rbuff);#endif  if (rbuff == NULL)    {      MPI_Abort (MPI_COMM_WORLD, 1);      exit (1);    }  /* now, root and slaves cast data as MPI types for send/reveive */  blen[0] = 1;  blen[1] = 1;  blen[2] = 1;  blen[3] = 1;  blen[4] = 1;  blen[5] = 1;  blen[6] = 1;  blen[7] = RAYCODE_MAX_STRING_LENGTH + 1;  blen[8] = 1;  blen[9] = 1;  oldtypes[0] = MPI_LONG;  oldtypes[1] = MPI_DOUBLE;  oldtypes[2] = MPI_DOUBLE;  oldtypes[3] = MPI_DOUBLE;  oldtypes[4] = MPI_DOUBLE;  oldtypes[5] = MPI_DOUBLE;  oldtypes[6] = MPI_DOUBLE;  oldtypes[7] = MPI_CHAR;  oldtypes[8] = MPI_DOUBLE;  oldtypes[9] = MPI_UB;  indices[0] = offsetof (struct raydata_t, event_id);  indices[1] =    offsetof (struct raydata_t, src) + offsetof (struct coord_geo_t, prof);  indices[2] =    offsetof (struct raydata_t, src) + offsetof (struct coord_geo_t, lon);  indices[3] =    offsetof (struct raydata_t, src) + offsetof (struct coord_geo_t, lat);  indices[4] =    offsetof (struct raydata_t, dest) + offsetof (struct coord_geo_t, prof);  indices[5] =    offsetof (struct raydata_t, dest) + offsetof (struct coord_geo_t, lon);  indices[6] =    offsetof (struct raydata_t, dest) + offsetof (struct coord_geo_t, lat);  indices[7] = offsetof (struct raydata_t, phase);  indices[8] = offsetof (struct raydata_t, ray_travel_time);  indices[9] = sizeof (struct raydata_t);  MPI_Type_struct (10, blen, indices, oldtypes, &mpi_raydata);  MPI_Type_commit (&mpi_raydata);#ifndef USE_MPILB  MPI_Scatter (raydata, sizeperproc, mpi_raydata,	       rbuff, sizeperproc, mpi_raydata, root, MPI_COMM_WORLD);#else  MPI_Scatterv (raydata,		tag_spp,		tag_spp_sum,		mpi_raydata,		rbuff, tag_spp[rank], mpi_raydata, root, MPI_COMM_WORLD);#endif  MPI_Type_free (&mpi_raydata);  return (rbuff);}/*----------------------------------------------------------------------*//* main                                                                 *//*----------------------------------------------------------------------*/intmain (int argc, char **argv){				/* return the nb of ray computed */  /*struct coord_geo_t source;     struct coord_geo_t dest; */  struct ray_config_t ray_config;  struct ray_filter_t ray_filter;  char *meshfile = NULL;  char *inputdatafile = NULL;  char *rayfilter_filename = NULL;  char *tmpdir = NULL;  float limit = -1;  int nb_ray_computed = 0;  int nb_ray_rejected = 0;  int nb_ray_total = 0;  int nbread = 0;  int nberr = 0;		/* nb of line with error */  /* res & sparse files */  FILE *sparse_fd = NULL;  FILE *res_fd = NULL;  FILE *event_fd = NULL;  FILE *filter_fd = NULL;  /*---------------- MPI related --------------------*/  int nbprocs;			/* number of processes in the group */  int size;			/* offset of remainder of raydata not treated */  int xml_buffer_size;		/* number of bytes of the xml file */  int sizeperproc;		/* number of raydata for each process to compute */  long int offset;  char *xml_buffer = NULL;  struct raydata_t *recv_data;	/* transmitted ray data buffer */  struct raydata_t *raydata = NULL;#ifndef USE_MPILB  struct raydata_t *ray_remainder = NULL;	/* some rays may remain */#endif  double start_time;  double comm_time;  double *merge_times;		/* 9 counters */  double score_time;  double ray_time_start;  double ray_time_end;  char *date_stamp;  /* catch Ctrl-C signal */  /* do not cast 2nd arg to __sighandler_t : fatal make error wit irix cc */  signal (SIGINT, emergency_halt);  /* MPI initialization */  MPI_Init (&argc, &argv);  MPI_Comm_rank (MPI_COMM_WORLD, &rank);  MPI_Comm_size (MPI_COMM_WORLD, &nbprocs);  /* cmd line */  memset (&ray_filter, 0, sizeof (struct ray_filter_t));  parse_command_line (argc, argv,		      &ray_config, &ray_filter,		      &meshfile,		      &celldatafilename,		      &inputdatafile,		      &rayfilter_filename, &limit, &output_format, &tmpdir);#ifdef DEBUG  if (rank == ROOT)    {      fprintf (stderr, "%s:main():%d  command line parsing done.\n",	       __FILE__, __LINE__);    }#endif  if (limit > 0 && rank == ROOT)    {      if (strchr (output_format, 's'))	{	  fprintf (stderr,		   "[ROOT] can not use *sco* output format with -L option\n");	  MPI_Abort (MPI_COMM_WORLD, 1);	  exit (1);	}      fprintf (stderr, "[ROOT] info, limit memory usage to %.1fM\n", limit);    }  /* checks if the basename for files is provided */  if (!celldatafilename)    {      fprintf (stderr, "No output file specified. Exiting.\n");      MPI_Abort (MPI_COMM_WORLD, 1);      exit (1);    }  start_time = MPI_Wtime ();    /*************************************************************/  /* first check that files are accessible (on root side only) */    /*************************************************************/  if (rank == ROOT)    {	/********/      /* ROOT */	/********/      fprintf (stdout, "*** [root] MPI process started (MPI_Init).\n");      fprintf (stdout, "*** [root] %s running on %d processors.\n",	       PACKAGE, nbprocs);      ray2mesh_info (&ray_config);      check_file_access (meshfile);      check_file_access (inputdatafile);#ifdef RAYTRACING_ONLY      fprintf (stdout,	       "%s : only ray-tracing executed (compiled with -DRAYTRACING_ONLY)\n",	       PACKAGE);#endif#ifdef DEBUG      fprintf (stderr, "%s:main():%d [root] after check access .\n",	       __FILE__, __LINE__);#endif      /* init of the mesh->parameters struct  */      if ((xml_buffer =	   load_file_to_memory (meshfile, &xml_buffer_size)) == NULL)	{	  fprintf (stderr,		   "%s : could not load %s to memory (%d bytes). Exiting.\n",		   PACKAGE, meshfile, xml_buffer_size);	  MPI_Abort (MPI_COMM_WORLD, 1);	  exit (1);	}      /* open the file containing the rays */      if ((fdinput = fopen (inputdatafile, "r")) == NULL)	{	  fprintf (stderr,		   "Can not open input datafile '%s' for reading. Exiting.\n",		   inputdatafile);	  MPI_Abort (MPI_COMM_WORLD, 1);	  exit (1);	}    }  else    {	/**********/      /* SLAVES */	/**********/      date_stamp = get_date_stamp ();      fprintf (stdout,	       "*** [process %d] MPI process started (MPI_Init) as process %d (%s)\n",	       rank, getpid (), date_stamp);      free (date_stamp);      /* open the filter file if needed */      if (rayfilter_filename)	{	  char *filename;	  char *ext = "sei";	  filename =	    (char *) malloc (sizeof (char) *			     (strlen (rayfilter_filename) + strlen ("-p") +			      RANK_SIZE + strlen (".") + strlen ("sei") + 1));	  assert (filename);	  sprintf (filename, "%s-p%.3d.%s", rayfilter_filename, rank, ext);	  if ((filter_fd = fopen (filename, "w")) == NULL)	    {	      fprintf (stderr, "Cannot open %s for writing ray filtered.\n",		       filename);	      MPI_Abort (MPI_COMM_WORLD, 1);	      exit (1);	    }	  free (filename);	}    }    /**************/  /* XML buffer */    /**************/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99re这里只有精品首页| 日韩精品中文字幕一区二区三区| 色噜噜偷拍精品综合在线| 欧美精品123区| 国产精品久久一级| 久久精品国产一区二区三区免费看| 不卡一卡二卡三乱码免费网站| 欧美高清视频一二三区 | 欧美变态凌虐bdsm| 欧美α欧美αv大片| 亚洲精品写真福利| 国产激情91久久精品导航| 欧美日韩精品是欧美日韩精品| 欧美激情一区二区在线| 日本一道高清亚洲日美韩| 色老头久久综合| 国产精品色一区二区三区| 狠狠色丁香久久婷婷综合丁香| 欧美日韩高清一区二区三区| 亚洲精品视频免费观看| 成人va在线观看| 国产亚洲欧美激情| 国产精品亚洲第一区在线暖暖韩国| 日韩一区二区三区四区| 日本色综合中文字幕| 国产成人亚洲精品青草天美| 欧美一区二区免费视频| 爽好久久久欧美精品| 欧美三级资源在线| 亚洲妇熟xx妇色黄| 欧美视频第二页| 亚欧色一区w666天堂| 欧美无乱码久久久免费午夜一区| 伊人夜夜躁av伊人久久| 色菇凉天天综合网| 一区二区三区在线免费| 欧洲精品一区二区| 亚洲高清免费一级二级三级| 制服丝袜激情欧洲亚洲| 青青草伊人久久| 精品美女一区二区三区| 激情欧美一区二区三区在线观看| 精品久久久久99| 国产精品主播直播| 国产精品入口麻豆九色| 91免费国产在线观看| 一区二区三区资源| 欧美三级中文字| 蜜臀精品一区二区三区在线观看| 亚洲bt欧美bt精品777| 欧美日韩一区二区三区四区五区 | 亚洲一区二区美女| 欧美在线视频你懂得| 亚洲一区精品在线| 日韩一区二区影院| 国产成人综合亚洲网站| 亚洲欧洲成人精品av97| 91久久国产综合久久| 日韩精品三区四区| 久久婷婷综合激情| 色综合久久中文综合久久97| 婷婷成人激情在线网| 久久久国产精品午夜一区ai换脸| www.欧美亚洲| 奇米亚洲午夜久久精品| 成人精品视频一区二区三区尤物| 国产欧美一区二区三区在线看蜜臀| 91网站最新地址| 天天色天天操综合| 欧美激情综合五月色丁香小说| 91麻豆国产香蕉久久精品| 免费久久99精品国产| 成人欧美一区二区三区视频网页| 欧美综合色免费| 国产一区二区三区在线观看免费| 亚洲综合小说图片| 欧美国产精品一区二区三区| 欧美日韩国产精品自在自线| 国产91高潮流白浆在线麻豆| 午夜激情一区二区| 国产精品久久久久aaaa| 欧美va亚洲va香蕉在线| 91一区二区三区在线观看| 久久99精品一区二区三区| 一区二区三区在线观看欧美| 国产肉丝袜一区二区| 555www色欧美视频| 日本韩国精品在线| 韩国成人精品a∨在线观看| 亚洲国产精品久久不卡毛片| 亚洲人一二三区| 久久品道一品道久久精品| 欧美日韩一区视频| 色菇凉天天综合网| 不卡av免费在线观看| 国产伦理精品不卡| 久久av中文字幕片| 免费高清视频精品| 五月天视频一区| 亚洲影视在线观看| 亚洲精品国产一区二区三区四区在线| 国产欧美精品国产国产专区| 久久久一区二区| 久久亚洲免费视频| 欧美亚洲精品一区| 99re8在线精品视频免费播放| 久久精品国产免费| 麻豆91免费观看| 免费在线观看日韩欧美| 五月天久久比比资源色| 偷拍一区二区三区| 一区二区国产视频| 亚洲国产精品视频| 日韩在线卡一卡二| 日日摸夜夜添夜夜添精品视频 | 中文字幕国产一区| 欧美精品一区二区在线播放| 日韩一级二级三级精品视频| 欧美一卡2卡3卡4卡| 欧美一二三区精品| 精品国产乱码久久| 欧美高清在线一区| 亚洲欧美日韩久久精品| 亚洲精品乱码久久久久久黑人 | 国产综合成人久久大片91| 久久精品99久久久| 国产一区二区三区四| 成人免费视频国产在线观看| 不卡av在线免费观看| 在线视频一区二区三| 欧美三级三级三级爽爽爽| 欧美老人xxxx18| 精品国产不卡一区二区三区| 国产欧美综合在线观看第十页| 国产精品免费aⅴ片在线观看| 亚洲欧美日韩在线| 午夜精品福利久久久| 久久国产精品免费| 成人丝袜18视频在线观看| 色婷婷综合激情| 日韩欧美久久久| 国产精品久久一级| 五月天激情综合| 国产另类ts人妖一区二区| 99re热视频这里只精品| 欧美一区二区三区在线| 久久午夜色播影院免费高清| 亚洲激情图片一区| 老司机午夜精品| 99精品黄色片免费大全| 日韩一区二区免费高清| 国产精品久久久久久久久免费丝袜| 一区二区三区在线观看国产| 视频一区中文字幕国产| 国产乱人伦偷精品视频免下载| 99国产精品一区| 欧美不卡一区二区三区| 亚洲特黄一级片| 韩国成人福利片在线播放| 在线一区二区视频| 久久欧美一区二区| 午夜伦理一区二区| 国产91丝袜在线18| 欧美日韩亚洲不卡| 亚洲视频 欧洲视频| 狠狠网亚洲精品| 欧美日韩国产精选| 亚洲丝袜另类动漫二区| 国产一区二区中文字幕| 91麻豆精品国产自产在线 | 午夜视频一区在线观看| 成人国产一区二区三区精品| 欧美福利电影网| 亚洲免费在线播放| 国产福利精品一区| 精品日韩成人av| 日韩国产在线观看一区| 91丝袜国产在线播放| 国产亚洲福利社区一区| 久久99精品久久久久久动态图| 欧美日韩在线电影| 亚洲自拍偷拍综合| 色婷婷综合久久| 亚洲欧美另类综合偷拍| 成人精品gif动图一区| 久久精品一二三| 精品一区二区三区不卡 | 欧美日韩在线综合| 亚洲欧洲综合另类| 91欧美一区二区| 综合婷婷亚洲小说| av在线综合网| 亚洲同性同志一二三专区| www.亚洲免费av| 亚洲欧美偷拍卡通变态| 一本大道久久a久久精品综合| 亚洲欧洲三级电影| av一区二区三区黑人| 亚洲日本va在线观看| 91久久久免费一区二区|