diff --git a/RHEL8-x86_64/2022b/macchinettaSwitch.o b/RHEL8-x86_64/2022b/macchinettaSwitch.o index c8f289c..2d9f511 100644 Binary files a/RHEL8-x86_64/2022b/macchinettaSwitch.o and b/RHEL8-x86_64/2022b/macchinettaSwitch.o differ diff --git a/RHEL8-x86_64/2022b/mcaunlock.m b/RHEL8-x86_64/2022b/mcaunlock.m index 1d97e26..3bcdeeb 100644 --- a/RHEL8-x86_64/2022b/mcaunlock.m +++ b/RHEL8-x86_64/2022b/mcaunlock.m @@ -8,4 +8,4 @@ function mcaunlock; % loosing channel access connections. %mca(0); mocha('mexUnlock'); -disp('mca mex-file is now UNLOCKED'); +%disp('mca mex-file is now UNLOCKED'); diff --git a/RHEL8-x86_64/2022b/mocha.mexa64 b/RHEL8-x86_64/2022b/mocha.mexa64 index 7b65116..44c3821 100755 Binary files a/RHEL8-x86_64/2022b/mocha.mexa64 and b/RHEL8-x86_64/2022b/mocha.mexa64 differ diff --git a/RHEL8-x86_64/2023a/macchinettaSwitch.o b/RHEL8-x86_64/2023a/macchinettaSwitch.o index ca9bb97..2d9f511 100644 Binary files a/RHEL8-x86_64/2023a/macchinettaSwitch.o and b/RHEL8-x86_64/2023a/macchinettaSwitch.o differ diff --git a/RHEL8-x86_64/2023a/mocha.mexa64 b/RHEL8-x86_64/2023a/mocha.mexa64 index d6c607c..85117d5 100755 Binary files a/RHEL8-x86_64/2023a/mocha.mexa64 and b/RHEL8-x86_64/2023a/mocha.mexa64 differ diff --git a/each_matlab_1clean.sh b/each_matlab_1clean.sh new file mode 100644 index 0000000..8b7ec0a --- /dev/null +++ b/each_matlab_1clean.sh @@ -0,0 +1,32 @@ +ca office network +counter=0 + +vgcc=10.4.0 +for vmat in 2024a 2023b 2023a 2022b 2022a +do + printf "\n\n\n=======================================================================\n" + let counter++ + echo Step $counter + printf "=======================================================================\n" + module unload matlab + module load matlab/$vmat + module unload gcc + module load gcc/$vgcc + module list + make -f makefile_rel_1.21-gcc-$vgcc clean +done + +vgcc=7.3.0 +for vmat in 2021b 2021a 2020b 2020a 2019b 2019a 2018b 2018a +do + printf "\n\n\n=======================================================================\n" + let counter++ + echo Step $counter + printf "=======================================================================\n" + module unload matlab + module load matlab/$vmat + module unload gcc + module load gcc/$vgcc + module list + make -f makefile_rel_1.21-gcc-$vgcc clean +done diff --git a/each_matlab_2make.sh b/each_matlab_2make.sh new file mode 100644 index 0000000..4ccbe0c --- /dev/null +++ b/each_matlab_2make.sh @@ -0,0 +1,38 @@ +ca office network +counter=0 + +vgcc=10.4.0 +for vmat in 2024a 2023b 2023a 2022b 2022a +do + printf "\n\n\n=======================================================================\n" + let counter++ + echo Step $counter + printf "=======================================================================\n" + module unload matlab + module load matlab/$vmat + module unload gcc + module load gcc/$vgcc + module list + make -f makefile_rel_1.21-gcc-$vgcc + #matlab -batch "cd RHEL8-x86_64/$vmat;disp(mocha('version'));example" +done + +vgcc=7.3.0 +for vmat in 2021b 2021a 2020b 2020a 2019b 2019a 2018b 2018a +do + printf "\n\n\n=======================================================================\n" + let counter++ + echo Step $counter + printf "=======================================================================\n" + module unload matlab + module load matlab/$vmat + module unload gcc + module load gcc/$vgcc + module list + make -f makefile_rel_1.21-gcc-$vgcc + #if [[ "$vmat" =~ ^(2019a|2019b|2020a|2020b|2021a|2021b)$ ]]; then + # matlab -batch "cd RHEL8-x86_64/$vmat;disp(mocha('version'));example" + #else + # matlab -nodisplay -nosplash -nodesktop -r "cd RHEL8-x86_64/$vmat;disp(mocha('version'));example;exit" + #fi +done diff --git a/each_matlab_3test.sh b/each_matlab_3test.sh new file mode 100644 index 0000000..6c662bf --- /dev/null +++ b/each_matlab_3test.sh @@ -0,0 +1,38 @@ +ca office network +counter=0 + +vgcc=10.4.0 +for vmat in 2024a 2023b 2023a 2022b 2022a +do + printf "\n\n\n=======================================================================\n" + let counter++ + echo Step $counter + printf "=======================================================================\n" + module unload matlab + module load matlab/$vmat + module unload gcc + module load gcc/$vgcc + module list + #make -f makefile_rel_1.21-gcc-$vgcc + matlab -batch "cd RHEL8-x86_64/$vmat;disp(mocha('version'));example" +done + +vgcc=7.3.0 +for vmat in 2021b 2021a 2020b 2020a 2019b 2019a 2018b 2018a +do + printf "\n\n\n=======================================================================\n" + let counter++ + echo Step $counter + printf "=======================================================================\n" + module unload matlab + module load matlab/$vmat + module unload gcc + module load gcc/$vgcc + module list + #make -f makefile_rel_1.21-gcc-$vgcc + if [[ "$vmat" =~ ^(2019a|2019b|2020a|2020b|2021a|2021b)$ ]]; then + matlab -batch "cd RHEL8-x86_64/$vmat;disp(mocha('version'));example" + else + matlab -nodisplay -nosplash -nodesktop -r "cd RHEL8-x86_64/$vmat;disp(mocha('version'));example;exit" + fi +done diff --git a/each_matlab_4install.sh b/each_matlab_4install.sh new file mode 100644 index 0000000..0f20a52 --- /dev/null +++ b/each_matlab_4install.sh @@ -0,0 +1,38 @@ +ca office network +counter=0 + +vgcc=10.4.0 +for vmat in 2024a 2023b 2023a 2022b 2022a +do + printf "\n\n\n=======================================================================\n" + let counter++ + echo Step $counter + printf "=======================================================================\n" + module unload matlab + module load matlab/$vmat + module unload gcc + module load gcc/$vgcc + module list + make -f makefile_rel_1.21-gcc-$vgcc install + #matlab -batch "cd RHEL8-x86_64/$vmat;disp(mocha('version'));example" +done + +vgcc=7.3.0 +for vmat in 2021b 2021a 2020b 2020a 2019b 2019a 2018b 2018a +do + printf "\n\n\n=======================================================================\n" + let counter++ + echo Step $counter + printf "=======================================================================\n" + module unload matlab + module load matlab/$vmat + module unload gcc + module load gcc/$vgcc + module list + make -f makefile_rel_1.21-gcc-$vgcc install + #if [[ "$vmat" =~ ^(2019a|2019b|2020a|2020b|2021a|2021b)$ ]]; then + # matlab -batch "cd RHEL8-x86_64/$vmat;disp(mocha('version'));example" + #else + # matlab -nodisplay -nosplash -nodesktop -r "cd RHEL8-x86_64/$vmat;disp(mocha('version'));example;exit" + #fi +done diff --git a/each_matlab_5deploy.sh b/each_matlab_5deploy.sh new file mode 100644 index 0000000..fab5042 --- /dev/null +++ b/each_matlab_5deploy.sh @@ -0,0 +1,32 @@ +ca office network +counter=0 +vcaf=1.21.0 +vgcc=10.4.0 +for vmat in 2024a 2023b 2023a 2022b 2022a +do + printf "\n\n\n=======================================================================\n" + let counter++ + echo Step $counter + printf "=======================================================================\n" + module unload matlab + module load matlab/$vmat + module unload gcc + module load gcc/$vgcc + module list + source /opt/psi/Cafe/cafe-matlab/setup.sh $vmat $vgcc $vcaf +done + +vgcc=7.3.0 +for vmat in 2021b 2021a 2020b 2020a 2019b 2019a 2018b 2018a +do + printf "\n\n\n=======================================================================\n" + let counter++ + echo Step $counter + printf "=======================================================================\n" + module unload matlab + module load matlab/$vmat + module unload gcc + module load gcc/$vgcc + module list + source /opt/psi/Cafe/cafe-matlab/setup.sh $vmat $vgcc $vcaf +done diff --git a/each_matlab_6modulefiles.sh b/each_matlab_6modulefiles.sh new file mode 100644 index 0000000..fab5042 --- /dev/null +++ b/each_matlab_6modulefiles.sh @@ -0,0 +1,32 @@ +ca office network +counter=0 +vcaf=1.21.0 +vgcc=10.4.0 +for vmat in 2024a 2023b 2023a 2022b 2022a +do + printf "\n\n\n=======================================================================\n" + let counter++ + echo Step $counter + printf "=======================================================================\n" + module unload matlab + module load matlab/$vmat + module unload gcc + module load gcc/$vgcc + module list + source /opt/psi/Cafe/cafe-matlab/setup.sh $vmat $vgcc $vcaf +done + +vgcc=7.3.0 +for vmat in 2021b 2021a 2020b 2020a 2019b 2019a 2018b 2018a +do + printf "\n\n\n=======================================================================\n" + let counter++ + echo Step $counter + printf "=======================================================================\n" + module unload matlab + module load matlab/$vmat + module unload gcc + module load gcc/$vgcc + module list + source /opt/psi/Cafe/cafe-matlab/setup.sh $vmat $vgcc $vcaf +done diff --git a/macchinettaSwitch.cpp b/macchinettaSwitch.cpp index 52369e5..08aa0cb 100644 --- a/macchinettaSwitch.cpp +++ b/macchinettaSwitch.cpp @@ -501,7 +501,7 @@ void macchinettaFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prh break; case MOCHA_VERSION: - plhs[0]=mxCreateString((char *) "mocha-1.21.0 : 10 July 2024; Contact: Felix Armborst"); + plhs[0]=mxCreateString((char *) "mocha-1.21.0 : 12 July 2024; Contact: Felix Armborst"); break; case SHOW: diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000..fc04611 --- /dev/null +++ b/setup.sh @@ -0,0 +1,36 @@ +echo "$0 $1 $2 $#" + +if [ "$#" -ne 3 ];then + echo "Wrong number of arguments" + echo "arg1 is matlab version, e.g., 2024a" + echo "arg2 is gcc version, e.g., 10.4.0" + echo "arg3 is cafe-mocha version, e.g., 1.20.1" + return +fi + +vmatlab=$1 + +if [ "${#vmatlab}" -ne 5 ];then + echo "Your input matlab version $vmatlab is invalid; a valid example is 2024a" + return +fi + +vgcc=$2 +vmocha=$3 +vrhel=${RHREL} + + +new_dir="/opt/psi/Cafe/cafe-matlab/$vmatlab-$vrhel-gcc-$vgcc-cafe-$vmocha/libexec" +src_dir="/opt/gfa/cafe/mocha/mocha-$vmocha-gcc-$vgcc/lib/$vrhel-x86_64/$vmatlab" + +echo "new Dir: $new_dir" +echo "src Dir: $src_dir" + +mkdir -p $new_dir +# cp mocha mex file +cp $src_dir/* $new_dir +# cp mca/ca scripts +cp /afs/psi.ch/project/cafe/gitlab/CAFE/mocha/scripts/* $new_dir +ls -la $new_dir +rm -f /opt/psi/Cafe/cafe-matlab/$vmatlab +ln -s $vmatlab-$vrhel-gcc-$vgcc-cafe-$vmocha /opt/psi/Cafe/cafe-matlab/$vmatlab