Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Am a newbie to PARALLEL VERSION USING MPI , I need to convert the code below to parallel version using mpi.

Am a newbie to PARALLEL VERSION USING MPI , I need to convert the code below to parallel version using mpi.

Scheduled Pinned Locked Moved C / C++ / MFC
databasehelpannouncement
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 11208828
    wrote on last edited by
    #1

    /* TEST WITH THE FOLLOWING PROBLEM 1 inputs: infinity:999 no. of cities: 4 no. of paths:6 PROBLEM 2 inputs: infinity:999 no. of cities: 5 no. of paths:10 */ #include #define ALL -1 #define MAXCITIES 10 enum BOOL{FALSE,TRUE}; long*visited;//visited nodes set here long*min_circuit;//min inner circuit for given node as start node at position indexed 0 long*ham_circuit;//optimal circuit with length stored at position indexed 0 long min_circuit_length;//min circuit lenth for given start node int n;//city count long matrix[MAXCITIES][MAXCITIES];//nondirectional nXn symmetric matrix //to store path distances as sourceXdestination long INFI;// INFINITY value to be defined by user // function resets minimum circuit for a given start node //with setting its id at index 0 and setting furthr node ids to -1 void reset_min_circuit(int s_v_id) { min_circuit[0]=s_v_id; for(int i=1;i

    L 1 Reply Last reply
    0
    • U User 11208828

      /* TEST WITH THE FOLLOWING PROBLEM 1 inputs: infinity:999 no. of cities: 4 no. of paths:6 PROBLEM 2 inputs: infinity:999 no. of cities: 5 no. of paths:10 */ #include #define ALL -1 #define MAXCITIES 10 enum BOOL{FALSE,TRUE}; long*visited;//visited nodes set here long*min_circuit;//min inner circuit for given node as start node at position indexed 0 long*ham_circuit;//optimal circuit with length stored at position indexed 0 long min_circuit_length;//min circuit lenth for given start node int n;//city count long matrix[MAXCITIES][MAXCITIES];//nondirectional nXn symmetric matrix //to store path distances as sourceXdestination long INFI;// INFINITY value to be defined by user // function resets minimum circuit for a given start node //with setting its id at index 0 and setting furthr node ids to -1 void reset_min_circuit(int s_v_id) { min_circuit[0]=s_v_id; for(int i=1;i

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      What is your question? Note: I have deleted your duplicate of this post.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups