Skip to content

Commit 0eca6dc

Browse files
committed
update amica
1 parent 1a42c54 commit 0eca6dc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+2580
-101
lines changed

code/plugins/reformat_plugin.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def reformat_plugin_dir(plugin_input_dir, plugin_name, order, plugin_type='wiki'
3232
for file in files:
3333
if file.endswith('.jpg') or file.endswith('.png'):
3434
shutil.copyfile(os.path.join(root, file), os.path.join(plugin_output_dir, file))
35+
3536
# if plugin is 'imat', copy the Docs directory recursively to the output directory
3637
if plugin_name == 'imat':
3738
shutil.copytree(os.path.join(plugin_input_dir, 'Docs'), os.path.join(plugin_output_dir, 'Docs'), dirs_exist_ok=True)
@@ -57,6 +58,13 @@ def reformat_plugin_dir(plugin_input_dir, plugin_name, order, plugin_type='wiki'
5758

5859
if plugin_type == 'wiki':
5960
wiki_plugin_input_dir = plugin_input_dir + '.wiki'
61+
62+
# copy all .jpg and .png files from wiki input to output dir
63+
for root, dirs, files in os.walk(wiki_plugin_input_dir):
64+
for file in files:
65+
if file.endswith('.jpg') or file.endswith('.png'):
66+
shutil.copyfile(os.path.join(root, file), os.path.join(plugin_output_dir, file))
67+
6068
for root, dirs, files in os.walk(wiki_plugin_input_dir):
6169
for file in files:
6270
if file.endswith('.md') and not file.startswith('index') and not file.startswith('Home'):

code/plugins/update_plugins.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ def update_repo(repo, order, plugin_type='readme'):
3636
# if 'github' not in current directory, create it
3737
if not os.path.exists('github'):
3838
os.makedirs('github')
39-
wiki_plugins = ['SIFT', 'get_chanlocs', 'NFT', 'PACT', 'nsgportal', 'clean_rawdata']
40-
readme_plugins = ['ARfitStudio', 'roiconnect', 'EEG-BIDS', 'trimOutlier', 'groupSIFT', 'nwbio', 'ICLabel', 'dipfit', 'eegstats', 'PowPowCAT', 'PACTools', 'zapline-plus', 'amica', 'fMRIb', 'relica', 'std_dipoleDensity', 'imat', 'viewprops', 'cleanline','NIMA', 'firfilt']
39+
wiki_plugins = ['SIFT', 'get_chanlocs', 'NFT', 'PACT', 'nsgportal', 'clean_rawdata', 'amica']
40+
readme_plugins = ['ARfitStudio', 'roiconnect', 'EEG-BIDS', 'trimOutlier', 'groupSIFT', 'nwbio', 'ICLabel', 'dipfit', 'eegstats', 'PowPowCAT', 'PACTools', 'zapline-plus', 'fMRIb', 'relica', 'std_dipoleDensity', 'imat', 'viewprops', 'cleanline','NIMA', 'firfilt']
4141
ordering = ['ICLabel', 'dipfit', 'EEG-BIDS', 'roiconnect', 'amica', 'cleanline', 'clean_rawdata', 'SIFT', 'zapline-plus', 'eegstats', 'trimOutlier', 'fMRIb', 'imat', 'nwbio', 'NIMA', 'PACT', 'NFT', 'PACTools', 'ARfitStudio', 'PowPowCAT', 'relica', 'std_dipoleDensity', 'viewprops', 'firfilt', 'groupSIFT', 'get_chanlocs', 'nsgportal']
4242

4343
if len(sys.argv) == 1:
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
---
2+
layout: default
3+
title: AMICA-Compilation-instructions
4+
long_title: AMICA-Compilation-instructions
5+
parent: amica
6+
grand_parent: Plugins
7+
---
8+
# How to compile with Intel Fortran on Windows
9+
10+
1. Install Intel OneAPI Base Toolkit for Windows.
11+
2. Install Intel OneAPI HPC Toolkit for Windows.
12+
3. Open Intel OneAPI command window (in Start menu, 32 or 64 bit as appropriate). Change to directory with Amica code, and compile Amica with the command (/F sets the stack size):
13+
14+
> mpif90 /Qopenmp /Qmkl /F2147483648 /DMKL /fpp /O3 /exe:amica15mkl.exe funmod2.f90 amica15.f90
15+
16+
4. Test:
17+
18+
> .\amica15mkl.exe .\amicadefs.param
19+
20+
5. The files impi.dll and libfabric.dll should be copied to executable folder when running outside OneAPI command window. Search OneAPI mpi directory for locations.
21+
22+
23+
# THow to compile with Intel Fortran on Mac
24+
25+
0. These are old instructions. Try using Intel OneAPI modifiying the commands similar to the instructions for Windows above.
26+
1. Install Intel Fortran compiler for Mac/Linux (free demo).
27+
See https://software.intel.com/en-us/intel-parallel-studio-xe
28+
29+
2. Compile MPICH2 setting environmental vars CC, CXX, FC, and F77 to icc and ifort. Set $FBIN to Intel Fortran bin directory.
30+
31+
i) Download the mpich-3.2 code from: http://www.mpich.org/static/downloads/3.2/mpich-3.2.tar.gz
32+
33+
ii) Compile mpich-3.2:
34+
35+
$ cp /Users/$USER/downloads/mpich-3.2.tar.gz .
36+
$ setenv CC $FBIN/icc
37+
$ setenv CXX $FBIN/icc
38+
$ setenv F77 $FBIN/ifort
39+
$ setenv FC $FBIN/ifort
40+
$ tar xvf mpich-3.2.tar.gz
41+
$ cd mpich-3.2
42+
$ ./configure --prefix=/Users/$USER/mpich-3.2-install
43+
$ make
44+
$ make install
45+
46+
3. Compile Amica with the command:
47+
48+
$ ~/mpich-3.2-install/bin/mpif90 -L/Users/$USER/mpich-3.2-install/lib/ -I/Users/$USER/mpich-3.2-install/include/ -qopenmp -mkl -static-intel -O3 -fpp -DMKL amica15.f90 funmod2.f90 -o amica15mac
49+
50+
4. Test:
51+
52+
i) Download Sample EEG Data (Memorize.fdt and amicadefs.param) from: https://sccn.ucsd.edu/~jason/amica_web.html
53+
54+
ii) Test binary:
55+
56+
$ ./amica15mac ./amicadefs.param
57+
58+
59+
# How to compile with Intel Fortran on Ubuntu
60+
61+
0. These are old instructions. Try using Intel OneAPI modifiying the commands similar to the instructions for Windows above.
62+
1. Install Intel Fortran compiler for Linux.
63+
2. Compile MPICH2 setting environmental vars CC, CXX, FC, and F77 to icc and ifort.
64+
3. Compile Amica with the command:
65+
66+
$ /home/jason/mpich2-3.2-install/bin/mpif90 -I/opt/intel/mkl/include/ -fpp -qopenmp -O3 -mkl -static -static-intel -DMKL funmod2.f90 amica15.f90 -o amica15ub
67+
68+
4. Test:
69+
70+
$ ./amica15ub ./amicadefs.param
71+
72+
73+
# How to compile with Intel Fortran on Expanse HPC
74+
75+
1. load appropriate modules:
76+
77+
```
78+
module purge
79+
module load cpu/0.15.4 intel intel-mkl mvapich2
80+
```
81+
82+
2. Compile Amica with the command:
83+
84+
```
85+
mpif90 -static-intel -fpp -O3 -march=core-avx2 -heap-arrays \
86+
-qopenmp -mkl -DMKL -o amica15ex funmod2.f90 amica17.f90
87+
```
88+
89+
3. Test:
90+
```
91+
$ ./amica17nsg ./amicadefs.param
92+
```
93+
94+
4. Run on compute partition:
95+
96+
```
97+
<Edit amicadefs.param file line to: maxthreads 4>
98+
$ module load cpu/0.15.4 slurm intel intel-mkl mvapich2
99+
$ export OMP_NUM_THREADS=4 ; export SRUN_CPUS_PER_TASK=4 ; export MV2_ENABLE_AFFINITY=0
100+
$ srun --partition=compute --nodes=<NUM_NODES> --tasks-per-node=32 --cpus-per-task=4 \
101+
--mem=249208M --account=<ACCOUNT> --export=ALL -t 04:00:00 ./amica17nsg ./amicadefs.param
102+
<If job fails, reduce block_size in amicadefs.param. Increase block_size to speed up.>
103+
```

0 commit comments

Comments
 (0)