Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120095272
main.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Jul 1, 22:07
Size
532 B
Mime Type
text/x-c
Expires
Thu, Jul 3, 22:07 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27137790
Attached To
rPHPCSHALLOWWATER PHPC project - Shallow water simulation 2019
main.cpp
View Options
#include <omp.h>
#include <iostream>
#include <chrono>
#include "Simulation.h"
int main(int argc, char *argv[]) {
if (argc < 2) {
std::cerr << "Please specify the data directory" << std::endl;
}
#pragma omp parallel
{
int t = omp_get_thread_num();
printf("Hello world from %d!\n",t);
}
Simulation sim(argv[1], 4001, 500, 0.005);
sim.compute();
std::cout << "Perf. = " << sim.get_flops_performance()/1e9 << "Gflops" << std::endl;
sim.save("../Sol.bin");
return 0;
}
Event Timeline
Log In to Comment