-
Dilawar Singh authored
891f2f8 Removed trailing spaces from code by pre-commit hook utility. 0ed2535 Cherry-pick "Added connectionList field to SparseMsg to allow direct control over connection matrix. Some sanity checks in SparseMatrix to go with this" d62d10d The bug on travis is still not bypassed. If this does not work, disable DOQCS tests on OSX. 618b4d6 Install moose on osx as well. Prerequisite to test DOQCS. f717f82 Merge branch 'master' of github.com:BhallaLab/moose-core 908820e Lets see if this is a good workaround travis issue travis-ci/travis-ci#6522. e251f53 Lets see if is a workaround fixes the OSX bug. 4ff7cff Hopefully this will fix issue on travis-osx build failure. Related to travis-ci/travis-ci#6522. 590c09e Don't use timeout in script. So that we can run on macosx as well. Removed timeout command from script. Now it can run on OSX as well. e2f8afd Only test doqcs on LinuxOS, not on MacOSX. dc7b55a Fix to travis-ci/travis-ci#6307. 54b8471 Merge branch 'master' of github.com:BhallaLab/moose-core 18c8759 Test docqs agains gsl version/python2 moose-core. d6ca9cc Fixes by pre-commit hooks. - Removed trailing whitespaces automatically. - insert * coding - utf8 * line on top of each python script automatically. d4a6939 Using version v0.8 now. f944afe Added pre-commit pip install pre-commit --user to activate it. 030bfe0 Merge pull request #195 from dilawar/master d00a5d1 All tests are passing and new code is protected by appropriate macros. 1959771 Merge branch 'async' of github.com:dilawar/moose-core 0f6aba0 Merge branch 'master' of github.com:BhallaLab/moose-core ac0a4cd Added note on what to do. b3bf54e Slower version but results are same. 6bc71c9 Async version is slower (80sec vs 70 sec). d838267 asyncing clock is not producing great results. eeaafbf Implemented first parallel version. 166f84e Equivalent serial code which can easily be called from std::async now. e09a0c1 Merge pull request #194 from dilawar/master d2d1097 Added MACRO to integrate serial and parallel version. e68acd6 This is good but do parallelism at Clock.cpp 4cebbca Rdesigneur has python3 default import : absolute_import. f431cca Merge branch 'master' of github.com:BhallaLab/moose-core 85afa6d Some changes to Ksolve. Still seg-faults. 47e023e Time to test the Gsolve performance when threads are enabled. 2bbfd4f Commented out code appropriately. 91c2da6 moose.test( ) is added not cmake but not enabled. Enable them once all scripts are fixed in moose-examples. a1699fc Optimized GSolve with default 2 threads. 00a9d9e Removed the debug message. Lets check it now. By default it should be not slower than the default version. 7700c07 Fast Ksolve with 2 default threads. d154eb3 Parallel ksolve. git-subtree-dir: moose-core git-subtree-split: 891f2f8bf7359d61f186c3792c6f12b61d8c0afb
750df413
ShellThreads.cpp 2.07 KiB
/**********************************************************************
** This program is part of 'MOOSE', the
** Messaging Object Oriented Simulation Environment.
** Copyright (C) 2003-2010 Upinder S. Bhalla. and NCBS
** It is made available under the terms of the
** GNU Lesser General Public License version 2.1
** See the file COPYING.LIB for the full notice.
**********************************************************************/
/**
* This file contains the MPI-handling functions in Shell.
*/
#ifdef USE_MPI
#include <mpi.h>
#endif
#include "header.h"
#include "Shell.h"
#include "Dinfo.h"
#define USE_NODES 1
///////////////////////////////////////////////////////////////////
/**
* Launches Parser. Blocking when the parser blocks.
*/
void Shell::launchParser()
{
Id shellId;
Shell* s = reinterpret_cast< Shell* >( shellId.eref().data() );
bool quit = 0;
cout << "moose : " << flush;
while ( !quit ) {
string temp;
cin >> temp;
if ( temp == "quit" || temp == "q" ) {
s->doQuit();
quit = 1;
}
}
cout << "\nQuitting Moose\n" << flush;
}
// Function to assign hardware availability
void Shell::setHardware( unsigned int numCores, unsigned int numNodes,
unsigned int myNode )
{
numCores_ = numCores;
numNodes_ = numNodes;
myNode_ = myNode;
acked_.resize( numNodes, 0 );
}
/**
* Regular shell function that requires that the information about the
* hardware have been loaded in. For now the function just assigns SimGroups
*/
void Shell::loadBalance()
{
// Need more info here on how to set up groups distributed over
// nodes. In fact this will have to be computed _after_ the
// simulation is loaded. Will also need quite a bit of juggling between
// nodes when things get really scaled up.
//
// Note that the messages have to be rebuilt after this call.
// Note that this function is called independently on each node.
}
unsigned int Shell::numCores()
{
return numCores_;
}
unsigned int Shell::numNodes()
{
return numNodes_;
}
unsigned int Shell::myNode()
{
return myNode_;
}
bool Shell::inBlockingParserCall()
{
return isBlockedOnParser_;
}