Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test MCNP with Parallel universe #4

Open
makeclean opened this issue Mar 18, 2013 · 7 comments
Open

Test MCNP with Parallel universe #4

makeclean opened this issue Mar 18, 2013 · 7 comments

Comments

@makeclean
Copy link
Contributor

Test simple hello world program in the Parallel universe, then extend to full MCNP5 calculation.

@makeclean
Copy link
Contributor Author

#include <iostream>
#include "mpi.h"

void print_id(int id_number, int num_proc);

int main(int argc, char* argv[])
  {

  int id; // cpu id
  int p; // number of procs

  MPI::Init (argc,argv);

  id = MPI::COMM_WORLD.Get_rank( );
  p = MPI::COMM_WORLD.Get_size( );

  if ( id == 0 )
    {
      std::cout << " I am the master " << id << std::endl;
    }

  MPI::COMM_WORLD.Barrier( );

  print_id(id,p);

  MPI::COMM_WORLD.Barrier( );
  MPI::Finalize( );

  return 0;
}


void print_id(int id,int p)  
{
  std::cout << "I am processor " << id << " of " << p << std::endl;
  return;
}

@makeclean
Copy link
Contributor Author

Simple hello world mpi program, compile as

mpicxx mpitest.cpp -o mpitest

@gonuke
Copy link
Member

gonuke commented Mar 18, 2013

You should just add these as files in the repo, with a makefile. Rather than as comments here.

@makeclean
Copy link
Contributor Author

This is done, 36d54ed

@gonuke
Copy link
Member

gonuke commented Apr 9, 2013

A hello world test is done, right. Do you want to make another issue (or a few more) towards the goal of testing MCNP?

@makeclean
Copy link
Contributor Author

Currently parallel universe is non-responsive awaiting assistance from CHTC, the condor parallel examples in the manual work as expected, however MPI parallel programs do not.

@makeclean
Copy link
Contributor Author

Parallel universe still unresponsive, however can now run MPI programs on the same node as long we do not exceed 32 core, see commit 60fbbf7 or #22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants