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

Fixed documentation link (dev-mpi) #82

Merged
merged 2 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To get started with NEST GPU, please see the [NEST GPU Documentation](https://ne
NEST GPU is an open source software licensed under the [GNU General Public Lincese version 2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html).

## Installing NEST GPU
To install NEST GPU see the [NEST GPU Installation Intructions](https://nest-gpu.readthedocs.io/en/latest/installation/installation.html) on our Documentation.
To install NEST GPU see the [NEST GPU Installation Intructions](https://nest-gpu.readthedocs.io/en/latest/installation/index.html) on our Documentation.

## Citing NEST GPU
If you use NEST GPU in your work, please cite the publications in our [publication list](https://nest-gpu.readthedocs.io/en/latest/publications.html).
52 changes: 27 additions & 25 deletions python/hpc_benchmark/hpc_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,39 +102,41 @@
mpi_id = ngpu.HostId()
mpi_np = ngpu.HostNum()

def rank_print(message):
"""Prints message and attaches MPI rank"""
print(f"MPI RANK {mpi_id}: {message}")

rank_print("Simulation with {} MPI processes".format(mpi_np))


###############################################################################
# Parameter section
# Define all relevant parameters: changes should be made here


params = {
'scale': 1., # scaling factor of the network size
# total network size = scale*11250 neurons
'seed': args.seed, # seed for random number generation
'simtime': 250., # total simulation time in ms
'presimtime': 50., # simulation time until reaching equilibrium
'dt': 0.1, # simulation step
'stdp': False, # enable plastic connections [feature not properlyly implemented yet!]
'record_spikes': True, # switch to record spikes of excitatory
# neurons to file
'show_plot': False, # switch to show plot at the end of simulation
# disabled by default for benchmarking
'scale': 1., # scaling factor of the network size
# total network size = scale*11250 neurons
'seed': args.seed, # seed for random number generation
'simtime': 250., # total simulation time in ms
'presimtime': 50., # simulation time until reaching equilibrium
'dt': 0.1, # simulation step
'stdp': False, # enable plastic connections [feature not properlyly implemented yet!]
'record_spikes': False, # switch to record spikes of excitatory
# neurons to file
'show_plot': False, # switch to show plot at the end of simulation
# disabled by default for benchmarking
'raster_plot': False, # when record_spikes=True, depicts a raster plot
'path_name': args.path, # path where all files will have to be written
'log_file': 'log', # naming scheme for the log files
'path_name': args.path, # path where all files will have to be written
'log_file': 'log', # naming scheme for the log files
'use_all_to_all': False, # Connect using all to all rule
'check_conns': False, # Get ConnectionId objects after build. VERY SLOW!
'use_dc_input': False, # Use DC input instead of Poisson generators
'check_conns': False, # Get ConnectionId objects after build. VERY SLOW!
'use_dc_input': False, # Use DC input instead of Poisson generators
'verbose_log': False, # Enable verbose output per MPI process
}


def rank_print(message):
"""Prints message and attaches MPI rank"""
if params['verbose_log']:
print(f"MPI RANK {mpi_id}: {message}")

rank_print("Simulation with {} MPI processes".format(mpi_np))


def lambertwm1(x):
"""Wrapper for LambertWm1 function"""
# Using scipy to mimic the gsl_sf_lambert_Wm1 function.
Expand Down Expand Up @@ -312,7 +314,7 @@ def build_network():
syn_dict_ex = {'weight': JE_pA, 'delay': brunel_params['delay']}

if mpi_id==0:
print("Synaptic weights: JE={}; JI={}".format(JE_pA, JE_pA*brunel_params['g']))
rank_print("Synaptic weights: JE={}; JI={}".format(JE_pA, JE_pA*brunel_params['g']))

if not params["use_dc_input"]:
rank_print('Connecting stimulus generators.')
Expand Down Expand Up @@ -474,12 +476,12 @@ def run_simulation():
json.dump(info_dict, f, indent=4)

def my_connect(source, target, conn_dict, syn_dict):
print("MY id {} LOCAL Source {} {} | Target {} {}".format(mpi_id, source.i0, source.n, target.i0, target.n))
rank_print("MY id {} LOCAL Source {} {} | Target {} {}".format(mpi_id, source.i0, source.n, target.i0, target.n))
ngpu.Connect(source, target, conn_dict, syn_dict)


def my_remoteconnect(source_host, source, target_host, target, conn_dict, syn_dict):
print("MY id {} REMOTE Source {} {} {} | Target {} {} {}".format(mpi_id, source_host, source.i0, source.n, target_host, target.i0, target.n))
rank_print("MY id {} REMOTE Source {} {} {} | Target {} {} {}".format(mpi_id, source_host, source.i0, source.n, target_host, target.i0, target.n))
ngpu.RemoteConnect(source_host, source, target_host, target, conn_dict, syn_dict)


Expand Down