Quantum ESPRESSOは、オープンソースの第一原理計算ソフトウェアです。 QEのビルド・テスト・ポテンシャルの作成あたりまでやります。
ここでは、Intel compiler及びIntelMKLを使った並列計算用のビルド方法を書きます。 OpenMPは使っていません。
mkdir -p mod_mdoc | |
cd mod_mdoc | |
for i in {01..20} | |
do | |
filename=`printf "tomo_%02d.mrc.mdoc" ${i}` | |
outfilename=`printf "tomo_%02d.mod.mrc.mdoc" ${i}` | |
grep -v DateTime ../${filename} > ${outfilename} | |
# echo ${filename} | |
done |
#include "Callback.hpp" | |
#include <iostream> | |
IntHolderCallback::IntHolderCallback(iMethod method, void *user_data) | |
{ | |
this->_method = method; | |
this->_user_data = user_data; | |
} | |
int |
#include <cstdio> | |
void func(int a, int b, int c) { | |
std::printf("%d %d %d\n", a, b, c); | |
} | |
int main(void) | |
{ | |
int i = 0; | |
func(i++, i++, i++); |
#include <string> | |
#include <iostream> | |
#include "H5Cpp.h" | |
#define MAX_NAME_LENGTH 32 | |
const std::string FileName("SimpleCompound.h5"); | |
const std::string DatasetName("PersonalInformation"); | |
const std::string member_age("Age"); | |
const std::string member_sex("Sex"); | |
const std::string member_name("Name"); |
#include <stdio.h> | |
/* | |
This source is testing for address layout randomization. | |
If ASLR is enabled, output of this program will be variable. | |
*/ | |
int main(void) | |
{ | |
printf("%p\n", main); |
*.eps | |
*.png | |
*.dat |
OPT_FLAG=-O3 | |
all: matrix.x | |
matrix.x: matrix.cpp | |
g++ -std=c++11 $(OPT_FLAG) matrix.cpp -o matrix.x | |
.PHONY: run | |
run: matrix.x | |
./matrix.x |
#include <mach-o/loader.h> | |
#include <cstdio> | |
void print_filetype(const uint32_t filetype) | |
{ | |
const char *msg; | |
switch(filetype) { | |
case MH_OBJECT: | |
msg = "MH_OBJECT"; | |
break; |
#include <mach-o/arch.h> | |
#include <iostream> | |
int main(void) | |
{ | |
const NXArchInfo *pNXArchInfo = NXGetLocalArchInfo(); | |
std::cout << pNXArchInfo->name << std::endl; | |
std::cout << pNXArchInfo->description << std::endl; | |
return 0; | |
} |